GNOME Bugzilla – Bug 619679
[gstdvbsrc] gst_dvbsrc_tune() should poll interface instead of looping
Last modified: 2011-05-26 08:13:26 UTC
Created attachment 161981 [details] [review] Patch to change to poll Instead of just guessing the duration of tuning and sleeping for that long, the frontend should be polled to check for changes in the tuning status. Attached a patch which does this. It has a lot of whitespace changes as some for loops are removed.
Ok I am looking at it. Thanks for the patch.
The biggest problem with this patch is that it could loop forever if the status changes within the timeout (20 seconds) but the change is not to a signal locking state. For example, you might change between getting the sync state and not having sync every few seconds which will reset the loop each time provided the state changes within the time-out (20 seconds). The better option would probably be to have a hard time-out (say 60 seconds) and if sync isn't achieved by then, return FALSE. However, this would complicate the poll call as the time-out would have to be calculated each time around the loop.
Bug 641204 seems to be further iteration of this work. Noting for reference
Comment on attachment 161981 [details] [review] Patch to change to poll This should also use GstPoll if possible, let's track this further in bug #641204.
*** This bug has been marked as a duplicate of bug 641204 ***