GNOME Bugzilla – Bug 726156
watchdog: Add handling of paused state
Last modified: 2014-05-03 07:51:34 UTC
This patch makes the watchdog element handle paused state by ignoring the timeout when the entire pipeline is paused. It also makes it possible to disable the timeout by setting it to 0.
Created attachment 271578 [details] [review] Suggested change
It might be simpler to just remove the timeout GSource in the PLAYING_TO_PAUSED state change, and add it again in PAUSED_TO_PLAYING.
Then we would miss the case where the pipeline hangs during pre rolling. This happens in our case if there are a lot of audio frames missing in the beginning of the stream.
Created attachment 271588 [details] [review] Update of previous patch.
More testing shows that this solution may deadlock.
Comment on attachment 271588 [details] [review] Update of previous patch. Let's mark it needs-work then :) How can it deadlock?
(In reply to comment #3) > Then we would miss the case where the pipeline hangs during pre rolling. This > happens in our case if there are a lot of audio frames missing in the beginning > of the stream. You could add the timeout already in READY to PAUSED then to catch this case, but remove the timeout in PLAYING to PAUSED (and add it again in PAUSED to PLAYING).
I have reworked the patch now. The previously mentioned deadlock was caused by bad lock handling in an other component in a special case.
Created attachment 272386 [details] [review] Updated patch
commit 6a7315c38280bde976d904fe817c0b1e695ada5f Author: Per x Johansson <perxjoh@axis.com> Date: Wed Mar 19 09:22:08 2014 +0100 watchdog: Add handling of PAUSED state Also allow disabling the timeout by setting it to 0. https://bugzilla.gnome.org/show_bug.cgi?id=726156