}
+/**
+ *
+ */
+static int
+dvb_grace_period(th_transport_t *t)
+{
+ return 10;
+}
+
+
/**
* Find a transport based on 'serviceid' on the given mux
*
t->tht_dvb_service_id = sid;
t->tht_pmt_pid = pmt_pid;
- t->tht_start_feed = dvb_transport_start;
- t->tht_refresh_feed = dvb_transport_refresh;
- t->tht_stop_feed = dvb_transport_stop;
- t->tht_config_save = dvb_transport_save;
+ t->tht_start_feed = dvb_transport_start;
+ t->tht_refresh_feed = dvb_transport_refresh;
+ t->tht_stop_feed = dvb_transport_stop;
+ t->tht_config_save = dvb_transport_save;
t->tht_setsourceinfo = dvb_transport_setsourceinfo;
- t->tht_dvb_mux_instance = tdmi;
t->tht_quality_index = dvb_transport_quality;
+ t->tht_grace_period = dvb_grace_period;
+ t->tht_dvb_mux_instance = tdmi;
LIST_INSERT_HEAD(&tdmi->tdmi_transports, t, tht_group_link);
pthread_mutex_lock(&t->tht_stream_mutex);
}
+/**
+ *
+ */
+static int
+iptv_grace_period(th_transport_t *t)
+{
+ return 3;
+}
+
+
/**
*
*/
t->tht_config_save = iptv_transport_save;
t->tht_setsourceinfo = iptv_transport_setsourceinfo;
t->tht_quality_index = iptv_transport_quality;
+ t->tht_grace_period = iptv_grace_period;
t->tht_iptv_fd = -1;
LIST_INSERT_HEAD(&iptv_all_transports, t, tht_group_link);
{
th_stream_t *st;
int r, err;
+ int timeout = 2;
+ struct timespec to;
lock_assert(&global_lock);
cwc_transport_start(t);
capmt_transport_start(t);
- int timeout = 10;
+ if(t->tht_grace_period != NULL)
+ timeout = t->tht_grace_period(t);
+
gtimer_arm(&t->tht_receive_timer, transport_data_timeout, t, timeout);
pthread_mutex_lock(&t->tht_stream_mutex);
- struct timespec to;
-
to.tv_sec = time(NULL) + timeout;
to.tv_nsec = 0;
int (*tht_quality_index)(struct th_transport *t);
+ int (*tht_grace_period)(struct th_transport *t);
/*
* Per source type structs
}
+/**
+ *
+ */
+static int
+v4l_grace_period(th_transport_t *t)
+{
+ return 2;
+}
+
+
/**
* Generate a descriptive name for the source
*/
t->tht_config_save = v4l_transport_save;
t->tht_setsourceinfo = v4l_transport_setsourceinfo;
t->tht_quality_index = v4l_transport_quality;
+ t->tht_grace_period = v4l_grace_period;
t->tht_iptv_fd = -1;
pthread_mutex_lock(&t->tht_stream_mutex);