My First Plugin - Help please

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

My First Plugin - Help please

Daniel Laird

I am trying to write my first video sink plugin.

 

I have read the manual and used the autogenerate tool to generate my component. (MyFramedVideo)

 

I have created a class that use GST_BOILERPLATE and extends GST_TYPE_VIDEO_SINK.

 

The plugin builds and installs onto my devices rootfs.

I then run gst-inspect and I keep getting the same error:

****

(gst-inspect-0.10:535): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstMyFramedVideo.so': /usr/lib/gstreamer-0.10/libgstMyFramedVideo.so: undefined symbol: gst_base_sink_get_type

****

 

What am I doing wrong? I have looked at a great many other plugins and make files and I do not seem very different!! I can see that this symbol is in gstcoreelements.so but no one else seems to need to add -lgstcorelements.  Also If I try this it all builds and this error never appears but gst-inspect just hangs.

 

Really hope someone can help

Many thanks

Daniel Laird


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: My First Plugin - Help please

Tim-Philipp Müller-2
On Tue, 2009-02-03 at 11:06 +0100, Daniel James Laird wrote:

Hi,

> I then run gst-inspect and I keep getting the same error:
>
> (gst-inspect-0.10:535): GStreamer-WARNING **: Failed to load plugin
> '/usr/lib/gstreamer-0.10/libgstMyFramedVideo.so': /usr/lib/gstreamer-0.10/libgstMyFramedVideo.so: undefined symbol: gst_base_sink_get_type

You need to link to libgstbase-0.10.so in addition to
libgstreamer-0.10.so. Add gstreamer-base-0.10 to your pkg-config module
list (or the PKG_CHECK_MODULES in configure.ac).

You can also check with ldd -r /path/to/your/libgstMyFramedVideo.so.

Cheers
 -Tim




------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: My First Plugin - Help please

Daniel Laird
Cool,
That solved that issue.  The problem now is that it does not show up as a plugin at all.
using gst-inspect to list plugins.

I cannot work out when I should use BOILERPLATE_FULL and when I should use GST_PLUGIN_DEFINE and gst_element_register as I cannot get a GST_BOILERPLATE_FULL and GstVideoSink to register.  
Am I missing something really obvious? The manual is a bit vague at this point and any help would be appreciated.  

Daniel Laird

-----Original Message-----
From: Tim-Philipp Müller [mailto:[hidden email]]
Sent: 2009 Feb 03 11:01
To: [hidden email]
Subject: Re: [gst-devel] My First Plugin - Help please

On Tue, 2009-02-03 at 11:06 +0100, Daniel James Laird wrote:

Hi,

> I then run gst-inspect and I keep getting the same error:
>
> (gst-inspect-0.10:535): GStreamer-WARNING **: Failed to load plugin
> '/usr/lib/gstreamer-0.10/libgstMyFramedVideo.so': /usr/lib/gstreamer-0.10/libgstMyFramedVideo.so: undefined symbol: gst_base_sink_get_type

You need to link to libgstbase-0.10.so in addition to
libgstreamer-0.10.so. Add gstreamer-base-0.10 to your pkg-config module
list (or the PKG_CHECK_MODULES in configure.ac).

You can also check with ldd -r /path/to/your/libgstMyFramedVideo.so.

Cheers
 -Tim




------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: My First Plugin - Help please

Ionut Dediu
Just wanted to point out that the docs are really scarce on beginner specific information. (please don't refer me to the 2 official manuals). Btw, every mature technology acknowledges itself by providing at least one printed book on the subject. While there are dozens of books about DirectShow NOTHING is available yet for gstreamer. Could we (hello worlds out there on gstreamer) hope to see a Gstreamer book any time soon? If not a "for Dummies" kind of book, at least a GStreamer Internals explained.
Thanks,
Ionut

--- On Tue, 2/3/09, Daniel James Laird <[hidden email]> wrote:
From: Daniel James Laird <[hidden email]>
Subject: Re: [gst-devel] My First Plugin - Help please
To: "Discussion of the development of GStreamer" <[hidden email]>
Date: Tuesday, February 3, 2009, 12:05 PM

Cool,
That solved that issue. The problem now is that it does not show up as a
plugin at all.
using gst-inspect to list plugins.

I cannot work out when I should use BOILERPLATE_FULL and when I should use
GST_PLUGIN_DEFINE and gst_element_register as I cannot get a
GST_BOILERPLATE_FULL and GstVideoSink to register.
Am I missing something really obvious? The manual is a bit vague at this point
and any help would be appreciated.

Daniel Laird

-----Original Message-----
From: Tim-Philipp Müller [mailto:[hidden email]]
Sent: 2009 Feb 03 11:01
To: [hidden email]
Subject: Re: [gst-devel] My First Plugin - Help please

On Tue, 2009-02-03 at 11:06 +0100, Daniel James Laird wrote:

Hi,

> I then run gst-inspect and I keep getting the same error:
>
> (gst-inspect-0.10:535): GStreamer-WARNING **: Failed to load plugin
> '/usr/lib/gstreamer-0.10/libgstMyFramedVideo..so':
/usr/lib/gstreamer-0.10/libgstMyFramedVideo.so: undefined symbol:
gst_base_sink_get_type

You need to link to libgstbase-0.10.so in addition to
libgstreamer-0.10.so. Add gstreamer-base-0.10 to your pkg-config module
list (or the PKG_CHECK_MODULES in configure.ac).

You can also check with ldd -r /path/to/your/libgstMyFramedVideo.so.

Cheers
-Tim




------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge..net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge..net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: My First Plugin - Help please

Tim-Philipp Müller-2
In reply to this post by Daniel Laird
On Tue, 2009-02-03 at 13:05 +0100, Daniel James Laird wrote:

> That solved that issue.  The problem now is that it does not show up as a plugin at all.
> using gst-inspect to list plugins.

Try:

 $ GST_DEBUG=*:2 gst-inspect-0.10 /path/to/yourplugin.so

(or *:3 if the above didn't show any warnings).

Make sure the license string in your plugin's GST_PLUGIN_DEFINE() is one
of the 'approved' strings (Use "Proprietary" if in doubt).

> I cannot work out when I should use BOILERPLATE_FULL and when I should
>  use GST_PLUGIN_DEFINE and gst_element_register as I cannot get a
>  GST_BOILERPLATE_FULL and GstVideoSink to register.  Am I missing
>  something really obvious? The manual is a bit vague at this point and
>  any help would be appreciated.

You absolutely need the GST_PLUGIN_DEFINE() block. In it you will
reference a plugin_init() function, which you also need. In the
plugin_init() function you call gst_element_register() for each element
you want to register. In order to do this, you need a GType. You *can*
use GST_BOILERPLATE* if you like (it will define a foo_bar_get_type()
function for you), but you don't have to if you prefer to do the
_get_type() function yourself.

Cheers
 -Tim



------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: My First Plugin - Help please

Daniel Laird
Thanks that solved it,

I am now busy trying to work out the following debug message:
GStreamer-WARNING **: Element myframedvideo0 has an ALWAYS template sink, but no pad of the same name

Any pointers appreciated!  
But I am now past the initial hurdles, many thanks for the help

Daniel Laird

-----Original Message-----
From: Tim-Philipp Müller [mailto:[hidden email]]
Sent: 2009 Feb 03 12:28
To: [hidden email]
Subject: Re: [gst-devel] My First Plugin - Help please

On Tue, 2009-02-03 at 13:05 +0100, Daniel James Laird wrote:

> That solved that issue.  The problem now is that it does not show up as a plugin at all.
> using gst-inspect to list plugins.

Try:

 $ GST_DEBUG=*:2 gst-inspect-0.10 /path/to/yourplugin.so

(or *:3 if the above didn't show any warnings).

Make sure the license string in your plugin's GST_PLUGIN_DEFINE() is one
of the 'approved' strings (Use "Proprietary" if in doubt).

> I cannot work out when I should use BOILERPLATE_FULL and when I should
>  use GST_PLUGIN_DEFINE and gst_element_register as I cannot get a
>  GST_BOILERPLATE_FULL and GstVideoSink to register.  Am I missing
>  something really obvious? The manual is a bit vague at this point and
>  any help would be appreciated.

You absolutely need the GST_PLUGIN_DEFINE() block. In it you will
reference a plugin_init() function, which you also need. In the
plugin_init() function you call gst_element_register() for each element
you want to register. In order to do this, you need a GType. You *can*
use GST_BOILERPLATE* if you like (it will define a foo_bar_get_type()
function for you), but you don't have to if you prefer to do the
_get_type() function yourself.

Cheers
 -Tim



------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: [gst-embedded] My First Plugin - Help please

LIANG ZHAO-2
In reply to this post by Daniel Laird
do you add libgstbase.so as your sink lib dependency?
 
Zhao Liang

From: Daniel James Laird [mailto:[hidden email]]
Sent: Tuesday, February 03, 2009 6:07 PM
To: [hidden email]
Cc: [hidden email]
Subject: [gst-embedded] My First Plugin - Help please

I am trying to write my first video sink plugin.

 

I have read the manual and used the autogenerate tool to generate my component. (MyFramedVideo)

 

I have created a class that use GST_BOILERPLATE and extends GST_TYPE_VIDEO_SINK.

 

The plugin builds and installs onto my devices rootfs.

I then run gst-inspect and I keep getting the same error:

****

(gst-inspect-0.10:535): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstMyFramedVideo.so': /usr/lib/gstreamer-0.10/libgstMyFramedVideo.so: undefined symbol: gst_base_sink_get_type

****

 

What am I doing wrong? I have looked at a great many other plugins and make files and I do not seem very different!! I can see that this symbol is in gstcoreelements.so but no one else seems to need to add -lgstcorelements.  Also If I try this it all builds and this error never appears but gst-inspect just hangs.

 

Really hope someone can help

Many thanks

Daniel Laird


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: My First Plugin - Help please

LIANG ZHAO-2
In reply to this post by Daniel Laird
Maybe you don't create pad when init, and just add template into class.

Try to create pad in element init. Example:

  srcpad = gst_pad_new_from_static_template (&srctemplate, "src");
  gst_element_add_pad (GST_ELEMENT (elem), srcpad);

Zhao Liang

-----Original Message-----
From: Daniel James Laird [mailto:[hidden email]]
Sent: Tuesday, February 03, 2009 9:34 PM
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] My First Plugin - Help please

Thanks that solved it,

I am now busy trying to work out the following debug message:
GStreamer-WARNING **: Element myframedvideo0 has an ALWAYS template sink, but no pad of the same name

Any pointers appreciated!  
But I am now past the initial hurdles, many thanks for the help

Daniel Laird

-----Original Message-----
From: Tim-Philipp Müller [mailto:[hidden email]]
Sent: 2009 Feb 03 12:28
To: [hidden email]
Subject: Re: [gst-devel] My First Plugin - Help please

On Tue, 2009-02-03 at 13:05 +0100, Daniel James Laird wrote:

> That solved that issue.  The problem now is that it does not show up as a plugin at all.
> using gst-inspect to list plugins.

Try:

 $ GST_DEBUG=*:2 gst-inspect-0.10 /path/to/yourplugin.so

(or *:3 if the above didn't show any warnings).

Make sure the license string in your plugin's GST_PLUGIN_DEFINE() is one of the 'approved' strings (Use "Proprietary" if in doubt).

> I cannot work out when I should use BOILERPLATE_FULL and when I should  
> use GST_PLUGIN_DEFINE and gst_element_register as I cannot get a  
> GST_BOILERPLATE_FULL and GstVideoSink to register.  Am I missing  
> something really obvious? The manual is a bit vague at this point and  
> any help would be appreciated.

You absolutely need the GST_PLUGIN_DEFINE() block. In it you will reference a plugin_init() function, which you also need. In the
plugin_init() function you call gst_element_register() for each element you want to register. In order to do this, you need a GType. You *can* use GST_BOILERPLATE* if you like (it will define a foo_bar_get_type() function for you), but you don't have to if you prefer to do the
_get_type() function yourself.

Cheers
 -Tim



------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

GMainLoop in a separate thread

oscar.ostlund@gmail.com
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: My First Plugin - Help please

Rahul Verma
In reply to this post by Daniel Laird
Hi,


>I am now busy trying to work out the following debug message:
>GStreamer-WARNING **: Element myframedvideo0 has an ALWAYS template sink, >but no pad of the same name

>Any pointers appreciated!  
>But I am now past the initial hurdles, many thanks for the help

I think this warning is because in you sink pad template, you must have mentioned the presence field of the pad as GST_PAD_ALWAYS and then not added a sink pad to your element.

If you are sure that your element will have a sink pad, it is advisable to add a pad. If you are not sure about the presence of the pad, use GST_PAD_SOMETIMES in the presence field of the template. But to have buffer flow in the pipeline, you need pads connected to downstream pads.

Rahul Verma


SASKEN BUSINESS DISCLAIMER
-------------------------
This message may contain confidential, proprietary or legally privileged information. In
case you are not the original intended Recipient of the message, you must not, directly or
indirectly, use, Disclose, distribute, print, or copy any part of this message and you are
requested to delete it and inform the sender. Any views expressed in this message are
those of the individual sender unless otherwise stated. Nothing contained in this message
shall be construed as an offer or acceptance of any offer by Sasken Communication
Technologies Limited ("Sasken") unless sent with that express intent and with due
authority of Sasken. Sasken has taken enough precautions to prevent the spread of
viruses. However the company accepts no liability for any damage caused by any virus
transmitted by this email


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GMainLoop in a separate thread

Tim-Philipp Müller-2
In reply to this post by oscar.ostlund@gmail.com
On Tue, 2009-02-03 at 22:26 -0500, Oscar Östlund wrote:

Hi,

(please don't start a new thread as reply to another message.)

> I would like to know if it is possible to put the GMainLoop in a  
> separate thread in order to "forget" about it ?
>
> I am writing an application that has it own loop mecanism and I would  
> prefer not having to use the GMainLoop...
>
> Or should I add a new source to my gmainloop and run everything else  
> from there ??

You don't have to use a GMainLoop at all. You just need to make sure you
handle messages on the pipeline bus somehow. You can do this by
regularly calling gst_bus_pop() if you like. The GSource/GMainLoop
integration stuff is just a bonus for Gtk+/GUI applications.

Cheers
 -Tim



------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GMainLoop in a separate thread

oscar.ostlund@gmail.com
CONTENTS DELETED
The author has deleted this message.