int sfc_enabled;
int sfc_position;
int sfc_priority;
+ int sfc_grace;
char *sfc_name;
/*
int satip_satconf_get_priority
( satip_frontend_t *lfe, mpegts_mux_t *mm );
+int satip_satconf_get_grace
+ ( satip_frontend_t *lfe, mpegts_mux_t *mm );
+
int satip_satconf_get_position
( satip_frontend_t *lfe, mpegts_mux_t *mm );
satip_satconf_find_ele( satip_frontend_t *lfe, mpegts_mux_t *mux )
{
satip_satconf_t *sfc;
+ satip_frontend_t *lfe2;
+
+ if (lfe->sf_master) {
+ TAILQ_FOREACH(lfe2, &lfe->sf_device->sd_frontends, sf_link)
+ if (lfe2->sf_number != lfe->sf_number &&
+ lfe2->sf_number == lfe->sf_master &&
+ lfe2->sf_master == 0) {
+ lfe = lfe2;
+ goto found;
+ }
+ return 0;
+ }
+found:
TAILQ_FOREACH(sfc, &lfe->sf_satconf, sfc_link) {
if (idnode_set_exists(sfc->sfc_networks, &mux->mm_network->mn_id))
return sfc;
return sfc ? sfc->sfc_priority : 0;
}
+int
+satip_satconf_get_grace
+ ( satip_frontend_t *lfe, mpegts_mux_t *mm )
+{
+ satip_satconf_t *sfc = satip_satconf_find_ele(lfe, mm);
+ return sfc ? sfc->sfc_grace : 0;
+}
+
int
satip_satconf_get_position
( satip_frontend_t *lfe, mpegts_mux_t *mm )
{
satip_satconf_t *sfc;
- satip_frontend_t *lfe2;
- if (lfe->sf_master) {
- TAILQ_FOREACH(lfe2, &lfe->sf_device->sd_frontends, sf_link)
- if (lfe2->sf_number != lfe->sf_number &&
- lfe2->sf_number == lfe->sf_master &&
- lfe2->sf_master == 0) {
- lfe = lfe2;
- goto found;
- }
- return 0;
- }
-found:
sfc = satip_satconf_find_ele(lfe, mm);
return sfc && sfc->sfc_enabled ? sfc->sfc_position : 0;
}
.off = offsetof(satip_satconf_t, sfc_priority),
.opts = PO_ADVANCED,
},
+ {
+ .type = PT_INT,
+ .id = "timeout",
+ .name = "Timeout (seconds)",
+ .off = offsetof(satip_satconf_t, sfc_grace),
+ .opts = PO_ADVANCED,
+ .def.i = 10
+ },
{
.type = PT_INT,
.id = "position",
sfc->sfc_networks = idnode_set_create(0);
sfc->sfc_lfe = lfe;
sfc->sfc_position = position + 1;
+ sfc->sfc_grace = 10;
TAILQ_INSERT_TAIL(&lfe->sf_satconf, sfc, sfc_link);
if (conf)
idnode_load(&sfc->sfc_id, conf);