[gst-devel] gst-ffmpeg & decodebin

Tom Cooksey thomas.cooksey at trolltech.com
Wed Feb 6 19:33:59 CET 2008


> Hi Tom,
> There is a list defining the rank on a per codec basis in one of the
> gst-ffmpeg header files if I remember correctly. The reason it got
> disabled back in the day was because if you tried seeking in a mp3 file
> using that decoder you would get an error and the application would
> crash. This might not be the case anymore with the new mp3parse element
> taking care of the seeking, but I don't think anyone has verified.
Yep, got it - gstffmpegdec.c:2301 & gstffmpegdemux.c:1505. At 
gstffmpegdemux:1502 there's a comment saying:

   /* Set the rank of demuxers know to work to MARGINAL.
     * Set demuxers for which we already have another implementation to NONE
     * Set All others to NONE*/

My personal view point is that this is the wrong behaviour. Only demuxers 
known _not_ to work should have rank set to NONE, and others should be given 
MARGINAL. Give GStreamer a fighting chance to play the file. IMO, an 
occasional segfault for some people is better than never playing the media. 
As mentioned, if a user does experience a segfault, they can just install 
another plugin with a higher rank. It might also highlight bugs in ffmpeg & 
encorage them to be fixed. :-)

> If you are using gst-ffmpeg in your project you can of course change the
> rank of any of the codecs easily for your own build/setup if you so
> prefer.

Well... This is tricky. Qt is using GStreamer as it's default phonon back end 
(for Linux.. at the moment), so all Qt applications using phonon on Linux 
will be using GStreamer. I don't want to run into the situation where someone 
writes a media player using phonon, but nobody uses it becuse it can't play a 
file mplayer, xine or vlc can play. I've been told the KDE devs have written 
their own phonon back-end for xinelib - so I'm not sure which phonon backend 
KDE applications will be using. For Qt/Embedded, we have to use GStreamer 
because we're seeing a lot of embedded boards shipping with GStreamer decode 
elements which use hardware acceleration specific to those boards.


Cheers,

Tom





More information about the gstreamer-devel mailing list