decodebin3 blocks state changes when one stream ends before the other

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

decodebin3 blocks state changes when one stream ends before the other

jacold
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

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel