#ifndef __TVH_MPEGTS_DVB_H__
#define __TVH_MPEGTS_DVB_H__
-/*
- * Network
- */
-
typedef struct dvb_network
{
mpegts_network_t;
dvb_fe_type_t ln_type;
} dvb_network_t;
+typedef struct dvb_mux
+{
+ mpegts_mux_t;
+
+ /*
+ * Tuning information
+ */
+ dvb_mux_conf_t lm_tuning;
+} dvb_mux_t;
+
+/*
+ * Network
+ */
+
extern const idclass_t dvb_network_class;
extern const idclass_t dvb_network_dvbt_class;
extern const idclass_t dvb_network_dvbc_class;
dvb_network_t *dvb_network_create0
( const char *uuid, const idclass_t *idc, htsmsg_t *conf );
+dvb_mux_t *dvb_network_find_mux
+ ( dvb_network_t *ln, dvb_mux_conf_t *dmc, uint16_t onid, uint16_t tsid );
+
int dvb_network_get_orbital_pos(mpegts_network_t *mn);
/*
*
*/
-typedef struct dvb_mux
-{
- mpegts_mux_t;
-
- /*
- * Tuning information
- */
- dvb_mux_conf_t lm_tuning;
-} dvb_mux_t;
-
extern const idclass_t dvb_mux_dvbt_class;
extern const idclass_t dvb_mux_dvbc_class;
extern const idclass_t dvb_mux_dvbs_class;
#include <dirent.h>
#include <fcntl.h>
-static mpegts_mux_t *
-dvb_network_find_mux
- ( dvb_network_t *ln, dvb_mux_conf_t *dmc, uint16_t onid, uint16_t tsid );
-
/* ****************************************************************************
* Class definition
* ***************************************************************************/
dvb_network_t *ln = o;
dvb_mux_conf_t *dmc;
scanfile_network_t *sfn;
- mpegts_mux_t *mm;
+ dvb_mux_t *mm;
/* Find */
if (!s)
/* Create */
LIST_FOREACH(dmc, &sfn->sfn_muxes, dmc_link) {
if (!(mm = dvb_network_find_mux(ln, dmc, MPEGTS_ONID_NONE, MPEGTS_TSID_NONE))) {
- mm = (mpegts_mux_t*)dvb_mux_create0(o,
- MPEGTS_ONID_NONE,
- MPEGTS_TSID_NONE,
- dmc, NULL, NULL);
+ mm = dvb_mux_create0(o, MPEGTS_ONID_NONE, MPEGTS_TSID_NONE,
+ dmc, NULL, NULL);
if (mm)
- mm->mm_config_save(mm);
+ mm->mm_config_save((mpegts_mux_t *)mm);
#if ENABLE_TRACE
char buf[128];
dvb_mux_conf_str(dmc, buf, sizeof(buf));
return 0;
}
-static mpegts_mux_t *
+dvb_mux_t *
dvb_network_find_mux
( dvb_network_t *ln, dvb_mux_conf_t *dmc, uint16_t onid, uint16_t tsid )
{
/* in the NIT table information and real mux feed */
mm = mm_alt;
}
- return mm;
+ return (dvb_mux_t *)mm;
}
static void
}
ln = (dvb_network_t*)mn;
- mm = (dvb_mux_t *)dvb_network_find_mux(ln, dmc, onid, tsid);
+ mm = dvb_network_find_mux(ln, dmc, onid, tsid);
if (!mm && (ln->mn_autodiscovery || force)) {
cls = dvb_network_mux_class((mpegts_network_t *)ln);
save |= cls == &dvb_mux_dvbt_class && dmc->dmc_fe_type == DVB_TYPE_T;