From b9890a2bf724cafb561c47df2ff48cc3ae4f0e89 Mon Sep 17 00:00:00 2001 From: Austin Lund Date: Fri, 19 Jun 2009 20:13:53 +1000 Subject: 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. --- sys/dvb/gstdvbsrc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/dvb') diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c index 37b46f42..fd76a4ea 100644 --- a/sys/dvb/gstdvbsrc.c +++ b/sys/dvb/gstdvbsrc.c @@ -1326,13 +1326,15 @@ gst_dvbsrc_tune (GstDvbSrc * object) #endif g_warning ("Error tuning channel: %s", strerror (errno)); } - for (i = 0; i < 5; i++) { + for (i = 0; i < 50; i++) { usleep (100000); if (ioctl (object->fd_frontend, FE_READ_STATUS, &status) == -1) { perror ("FE_READ_STATUS"); break; } GST_LOG_OBJECT (object, "status == 0x%02x", status); + if (status & FE_HAS_LOCK) + break; } if (status & FE_HAS_LOCK) break; -- cgit v1.2.1