GNOME Bugzilla – Bug 372428
fakesink audio still checks audio-codec in playbin
Last modified: 2006-11-09 00:29:52 UTC
playbin with fakesink set as audio-sink still refuses to play video's with unsupported audio-codec. Even though it doesn't have to decode it. if a fakesink is set, no decoding should be needed, and thus, no support checks needed.
I don't think this is true, at least not in any even remotely recent versions of gst-plugins-base (What's your gst-plugins-base version?) $ sudo rm /usr/local/lib/gstreamer-0.10/libgstmad.* $ gst-launch-0.10 playbin uri=file:///home/tpm/file-with-mp3-audio.avi Setting pipeline to PAUSED ... Pipeline is PREROLLING ... ** Message: don't know how to handle audio/mpeg, mpegversion=(int)1, layer=(int)3, rate=(int)44100, channels=(int)2 Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock and only the video is played back. Besides, the fact that (if it can) playbin will decode audio even if 'fakesink' is set as audio-sink is not a bug, but intended behaviour. People might use fakesink+handoff signal to get to raw audio data this way. Even if we wanted to change this behaviour (which we don't), we couldn't for compatibility reasons. If you want to prevent audio decoding, the correct way to do this would be to select -1 as the selected audio stream in playbin. There are currently two issues with this: a) I don't think selecting -1 works properly at the moment, see bug #342294 b) whether decoders actually spend time on decoding audio or not depends on how they do buffer allocation internally. Ideally, audio decoders should be using gst_pad_alloc_buffer_and_set_caps() to allocate buffers for decoding. That way they'd get a NOT_LINKED flow return value from the audio selector in playbin and skip the decoding step. If they allocate buffers themselves directly via gst_buffer_new_and_alloc() etc. this won't work. This is something that would need fixing in decoders (feel free to file bugs about this for specific decoders where this doesn't work).