Antwort: Re: decodebin2 and plugins

Sebastian Dröge sebastian.droege at collabora.co.uk
Tue Sep 6 05:33:44 PDT 2011


On Mon, 2011-09-05 at 15:44 +0200, Steffen.Roeber at hella.com wrote:
> 
> Ok. I did the following: 
> staticgboolean 
> examplefilter_init (GstExampleFilter * examplefilter) 
> { 
>   GST_DEBUG_CATEGORY_INIT (gst_example_filter_debug,"examplefilter",
> 0, "Template examplefilter"); 
> 
>   returngst_element_register (examplefilter, "examplefilter",
> GST_RANK_MARGINAL, GST_ELEMENT_FACTORY_TYPE_DECODER); 
> } 

Look at the docs of gst_element_register() and what the last parameter
should be. You must pass the GType of your new element here. Using
GST_ELEMENT_FACTORY_TYPE_DECODER will never work.

> staticvoidgst_example_filter_base_init (gpointer gclass) 
> { 
>   GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); 
> 
>   gst_element_class_set_details_simple(element_class, 
>     "ExampleFilter", 
>     "Decoder/Video", 
>     "Description", 
>     "Steffen Roeber"); 

Looks good but better use 
Codec/Decoder/Video
which is also used by all other video decoders.

> The _init() functions of my decoder are called. But the
> gst_example_filter_set_capsis not called. I always get a Your
> GStreamer installation is missing a plug-in.message. 
> Whcih function should be called at my Plugin at next? I found that the
> gst_riff_create_video_capsfunction returned 0, because it did not find
> my native fourcc code. How is the fourcc transmitted to my plugin and
> how should I check it? 

To have your element be used by decodebin2 it must have the caps of the
stream it should handle in the sinkpad template and you also need to use
this caps in the demuxer. In this case you have to add a mapping between
the fourcc and the caps to libgstriff.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110906/912f8602/attachment.pgp>


More information about the gstreamer-devel mailing list