GNOME Bugzilla – Bug 586097
GStreamer DVB tuning too quick for some devices
Last modified: 2009-07-16 19:09:05 UTC
Please describe the problem: The dvb source in gstreamer-plugins-bad goes from the FE_SET_FRONTEND ioctl to the FE_READ_STATUS ioctls too quickly. My device (Afatech AF9013 DVB-T) takes about 1 second to tune to a channel. The way gstdvbsrc.c is coded at the moment in gst_dvbsrc_tune() it only allows for about 500ms before it gives up. By increasing the length of time waited at the FE_READ_STATUS cycle, things are slower but at least my device does eventually tune. I've noted that other players use a poll() to perform this step instead of a fixed length of time to tune. Steps to reproduce: 1. Get a DVB device that takes > 500ms to tune. 2. Run: gst-launch playbin 'uri=dvb://BLAH' Actual results: Gives up trying to tune very quickly and returns. Expected results: Tunes to selected station Does this happen every time? Yes Other information:
Created attachment 136986 [details] [review] Patch to fix Increase the time to wait for tuning to 5 sec. Also check for status and jump out of loop when success is detected. (I formatted this against commit 29aa30d9. SORRY!)
commit b9890a2bf724cafb561c47df2ff48cc3ae4f0e89 Author: Austin Lund <austin.lund@gmail.com> Date: Fri Jun 19 20:13:53 2009 +1000 Increased the length of time for tuning in gstdvbsrc.c. Some devices take a while to tune and 500ms was too short to detect successful tuning. As well as waiting for 5 seconds each 100ms the status is checked and the loop is broken out of when tuning has suceeded.