After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 372428 - fakesink audio still checks audio-codec in playbin
fakesink audio still checks audio-codec in playbin
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: dont know
0.10.0
Other Linux
: Normal enhancement
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-11-08 12:19 UTC by Wietse van Aerde
Modified: 2006-11-09 00:29 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14



Description Wietse van Aerde 2006-11-08 12:19:01 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.
Comment 1 Tim-Philipp Müller 2006-11-09 00:29:52 UTC
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).