static gboolean
gst_dvbsrc_tune_fe (GstDvbSrc * object)
{
- GstPoll *poll_set;
- GstPollFD fe_fd;
fe_status_t status;
struct dtv_properties props;
struct dtv_property dvb_prop[NUM_DTV_PROPS];
g_mutex_lock (&object->tune_mutex);
- gst_poll_fd_init (&fe_fd);
- fe_fd.fd = object->fd_frontend;
- poll_set = gst_poll_new (TRUE);
-
- if (!gst_poll_add_fd (poll_set, &fe_fd)) {
- GST_WARNING_OBJECT (object, "Could not add frontend fd to poll set");
- goto fail;
- }
-
- gst_poll_fd_ctl_read (poll_set, &fe_fd, TRUE);
-
memset (dvb_prop, 0, sizeof (dvb_prop));
dvb_prop[0].cmd = DTV_CLEAR;
g_signal_emit (object, gst_dvbsrc_signals[SIGNAL_TUNING_DONE], 0);
GST_DEBUG_OBJECT (object, "Successfully set frontend tuning params");
- gst_poll_free (poll_set);
g_mutex_unlock (&object->tune_mutex);
return TRUE;
g_signal_emit (object, gst_dvbsrc_signals[SIGNAL_TUNING_FAIL], 0);
fail:
GST_WARNING_OBJECT (object, "Could not tune to desired frequency");
- gst_poll_free (poll_set);
g_mutex_unlock (&object->tune_mutex);
return FALSE;
}