[gst-devel] My First Plugin - Help please

Tim-Philipp Müller t.i.m at zen.co.uk
Tue Feb 3 13:27:49 CET 2009


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






More information about the gstreamer-devel mailing list