Switching from playbin to uridecodebin (glupload & audio)

Matthew Waters ystreet00 at gmail.com
Fri Sep 16 12:26:43 UTC 2016


On 16/09/16 20:10, Gottfried Haider wrote:
> Hello all,
>
> I have this pipeline as part of Processing's glvideo library, that
> works great - but doesn't play audio:
>
> uridecodebin uri=... ! glupload name=glup ! glcolorconvert !
> capsfilter name=filter ! fakesink name=vsink
>
> So I tried this instead
>
> uridecodebin uri=... name=decoder ! queue ! audioconvert !
> audioresample ! autoaudiosink sync=false decoder. ! queue ! glupload
> name=glup ! glcolorconvert ! capsfilter name=filter ! fakesink
> name=vsink sync=false
>
> which just hang. (The particular mp4 file I was testing this with had
> not audio track if that matters.)
>
>
> Should the second pipeline work in theory? Any other things I could
> try to get something like a playbin-like source element that would
> also play audio tracks, if the source has one? I uploaded a dot file
> of the second pipeline on OS X  for you to look at[1].

If the file didn't have an audio track that means that the audio output
part of the pipeline would not be linked to uridecodebin and thus when
prerolling would never get a buffer and would never complete the state
change to paused.  A backtrace of all threads would probably show that
the audiosink is stuck on the preroll cond/lock.

Your options are to either use playbin with the video-sink property set
to your custom video branch or if you're set on using uridecodebin, you
will have to selectively add the audio part of the pipeline if there is
an audio pad exposed by uridecodebin.  See the following example which
uses decodebin but the same idea is valid for uridecodebin:
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-components-decodebin.html.

Cheers
-Matt

> (If the pipeline looks right it might just be that the audio decoding
> hits this bug [2] on OS X.)
>
>
> Thanks in advance
> Gottfried
>
>
> [1] https://bugzilla.gnome.org/show_bug.cgi?id=768630
> [2] https://sukzessiv.net/~gohai/gstreamer/uridecode-audio.png
>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 484 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160916/2d70ff77/attachment.sig>


More information about the gstreamer-devel mailing list