playbin with fakesink as audio-sink will not complete PLAYING to PAUSED state change

philippe renon philippe_renon at
Thu Aug 24 23:17:50 UTC 2017

I am writing a python player using playbin. GStreamer version is 1.12.2.
Pausing and playing work well until I disable audio.

To disable audio, I set the audio-sink property of the playbin to a fakesink (as indicated in the playbin documentation).The pipeline is created with:        self.pipeline = Gst.ElementFactory.make("playbin", "player")
        self.pipeline.set_property("audio-sink", Gst.ElementFactory.make("fakesink"))
When the playbin is configured as such, changing state from PLAYING to PAUSED will not complete (although video is effectively "paused").Neither ASYNC_DONE nor STATE_CHANGED messages are posted on the bus.
Once in that state, going back to PLAYING state will also not complete.

Same happens with playbin3.
While writing this message, I tried to set the "sync" property of the fakesink to true and everything started to work as expected!!!
Still, playbins should not just go in that indeterminate state if a plain fakesink is used as audio sink.Or, at least, the playbin doc should mention that the fakesink must be synchronized.
PS: There must be a better way to disable audio ? With the fakesink approach, the whole audio playing branch is constructed, which is a waste.
PPS: The goal of disabling audio was to investigate video glitches when unpausing. I'll post another message about that.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list