decodebin3 blocks state changes when one stream ends before the other
jacold
lord.jacold at gmail.com
Wed Jul 8 13:41:26 UTC 2020
Hi all,
I'm developing an application that is meant to play audio and video from
separate files. I constructed a custom source element that handles two
input files and use it as source in playbin3. Playback works but a problem
arises when one stream ends before the other and application wants to
change the state of the pipeline (e.g. pause).
So when audio input sends EOS and video still plays, EOS is not passed to
audio sink, because decodebin3 waits for all inputs to end. When a
state-change request arrives at such sink, it hangs, waiting for the next
buffer/event to come (because it changes state asynchronously). One could
set "async" param of that sink to FALSE. That will allow it to pause, but
not to play again, as it could not preroll (there's no more data buffers
and EOS event is held by decodebin3).
My idea is to add a property to decodebin3 that allows to pass EOS events
immediately, without waiting for other inputs to end. That seems to resolve
the problem.
What are the dangers of such solution? Why waiting for other inputs before
passing EOS is there in the first place?
Cheers,
Jacold
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200708/b913b007/attachment.htm>
More information about the gstreamer-devel
mailing list