GNOME Bugzilla – Bug 142810
spider chooses ffdemux_mpeg (marginal) instead of mpegdemux (primary)
Last modified: 2004-12-22 21:47:04 UTC
using the following pipelines : gst-launch-0.8 filesrc location=CVS/GSTREAMER/CDXA-VCD/Karaoke\ FR\ -\ Thierry\ hazard\ -\ Le\ jerk.mpg ! cdxaparse ! spider ! xvimagesink gst-launch-0.8 filesrc location=CVS/GSTREAMER/CDXA-VCD/Karaoke\ FR\ -\ Thierry\ hazard\ -\ Le\ jerk.mpg ! cdxaparse ! spider ! osssink audio and video are ok -v tells me it uses mpegdemux using this pipeline, gst-player or even totem : gst-launch-0.8 filesrc location=CVS/GSTREAMER/CDXA-VCD/Karaoke\ FR\ -\ Thierry\ hazard\ -\ Le\ jerk.mpg ! spider ! xvimagesink image is corrupted, i have no sound at all (mpeg2dec decoding error) -v tells me it uses ffdemux_mpeg ronald asked me to put it as blocker, so be it
The problem is the shortest path algorithm in spider. Some explanation: spider tries to connect based on template caps-calculated shortest path algorithms. FFmpeg has no way of obtaining the supported template caps per plugin, just one bug whole pile of 'em. So what ffmpegdemux does is that it places *all* caps supported by ffmpeg (including CODEC_ID_RAWVIDEO) on the template. One of them allows direct linking to xvimagesink and thus it chooses this one over mpegdemux. Direct: * ffmpeg demuxers need to be temporarily disabled, at least the ones that interfere with GStreamer ones (asf, qt, mpg, avi, possibly more). Indirect: * we need a smarter autoplugger that doesn't use template caps but rather preferred demuxers and actual pad caps.
little note: An autoplugger can't use actual pad caps, because it only knows them after creating the element. It has to use ffdemux_mpeg _before_ knowing if it was right. But isn't it possible to hardcode the supported caps somewhere? I mean we know that ffdemux_mpeg will never support raw video...
That's what I'll do eventually if I have to, but I don't have time to set that up or maintain it right now. I'd rather push ffmpeg people to make that accessible in some way... Short-term, I fixed it by disabling all typefind functions and setting rank to NONE for demuxers/types that we have in gst-plugins.