[gst-devel] How can make playbin use my decoder to play some files

Tim Muller t.i.m at zen.co.uk
Tue May 8 12:02:45 CEST 2007

Gtxia <xia_guangtai at visualon.com> wrote :

> I am developing some decoder that are compatible with gstreamer
> framework. Now I can use the functions such as gst_element_factory_make
> to create my own decoder and add it a pipleline. It can play some file
> with my own decoder well, but when I test my decoder with playbin, it
> always complains "Message: don't know how to handle EMPTY
> Error: You do not have a decoder installed to handle this file. You
> might need to install the necessary plugins." What kind of functions
> that I must implement to eliminate this complains.

Check the following things:

 - your element sets up template caps with the right caps

 - the typefind element typefinds the stream in question
   to caps that are compatible with your element
   (make sure ... ! typefind ! yourdecoder  works)

 - your element has a rank that's higher than any other
   already existing decoder

 - if you have _getcaps() functions make sure they
   return sensible things (for a decoder, you usually
   don't need one for the sink pad and for the source
   pad you usually set one up implicitly via
   gst_pad_use_fixed_caps(), and then you do
   gst_pad_set_caps() when you start decoding; also,
   don't forget to set the right caps on the buffers
   you push out).

That's all that comes to mind right now. There are plenty of decoders in our repositories, might be worth looking at some of the code to see what they do differently.

Also, you can run get a  GST_DEBUG=*:5 debug log and grep the output for the word 'empty', then you'll see what exactly it does, ie. which caps it tries to intersect etc.


More information about the gstreamer-devel mailing list