After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 726156 - watchdog: Add handling of paused state
watchdog: Add handling of paused state
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-03-12 08:05 UTC by Per Johansson
Modified: 2014-05-03 07:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Suggested change (3.58 KB, patch)
2014-03-12 08:05 UTC, Per Johansson
none Details | Review
Update of previous patch. (4.03 KB, patch)
2014-03-12 09:58 UTC, Per Johansson
needs-work Details | Review
Updated patch (6.68 KB, patch)
2014-03-19 14:01 UTC, Per Johansson
committed Details | Review

Description Per Johansson 2014-03-12 08:05:10 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.
Comment 1 Per Johansson 2014-03-12 08:05:58 UTC
Created attachment 271578 [details] [review]
Suggested change
Comment 2 Sebastian Dröge (slomo) 2014-03-12 08:17:33 UTC
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.
Comment 3 Per Johansson 2014-03-12 08:24:29 UTC
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.
Comment 4 Per Johansson 2014-03-12 09:58:24 UTC
Created attachment 271588 [details] [review]
Update of previous patch.
Comment 5 Per Johansson 2014-03-14 08:29:10 UTC
More testing shows that this solution may deadlock.
Comment 6 Sebastian Dröge (slomo) 2014-03-15 12:18:11 UTC
Comment on attachment 271588 [details] [review]
Update of previous patch.

Let's mark it needs-work then :) How can it deadlock?
Comment 7 Sebastian Dröge (slomo) 2014-03-15 12:21:57 UTC
(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).
Comment 8 Per Johansson 2014-03-19 13:59:33 UTC
I have reworked the patch now. The previously mentioned deadlock was caused by bad lock handling in an other component in a special case.
Comment 9 Per Johansson 2014-03-19 14:01:43 UTC
Created attachment 272386 [details] [review]
Updated patch
Comment 10 Sebastian Dröge (slomo) 2014-05-03 07:51:18 UTC
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