mpegts: start adding routines for creation of muxes from UI
This includes a new routine that operates using a full htsmsg_t config rather than dvb_mux_conf (used for auto-detection).
This commit is contained in:
parent
2abe546e32
commit
6dc3b71ce7
3 changed files with 60 additions and 0 deletions
|
@ -176,6 +176,8 @@ struct mpegts_network
|
|||
(mpegts_mux_t*, uint16_t onid, uint16_t tsid, dvb_mux_conf_t *conf);
|
||||
mpegts_service_t* (*mn_create_service)
|
||||
(mpegts_mux_t*, uint16_t sid, uint16_t pmt_pid);
|
||||
const idclass_t* (*mn_mux_class) (mpegts_network_t*);
|
||||
mpegts_mux_t * (*mn_mux_create2) (mpegts_network_t *mn, htsmsg_t *conf);
|
||||
|
||||
/*
|
||||
* Configuration
|
||||
|
@ -425,6 +427,12 @@ mpegts_network_t *mpegts_network_create0
|
|||
#define mpegts_network_create(t, u, n, c)\
|
||||
(struct t*)mpegts_network_create0(calloc(1, sizeof(struct t)), &t##_class, u, n, c)
|
||||
|
||||
extern const idclass_t mpegts_network_class;
|
||||
|
||||
#define mpegts_network_find(u)\
|
||||
idnode_find(u, &mpegts_network_class)
|
||||
|
||||
|
||||
void mpegts_network_schedule_initial_scan
|
||||
( mpegts_network_t *mm );
|
||||
|
||||
|
|
|
@ -117,6 +117,39 @@ linuxdvb_network_create_service
|
|||
pmt_pid, NULL, NULL);
|
||||
}
|
||||
|
||||
static const idclass_t *
|
||||
linuxdvb_network_mux_class
|
||||
( mpegts_network_t *mn )
|
||||
{
|
||||
extern const idclass_t linuxdvb_mux_dvbt_class;
|
||||
extern const idclass_t linuxdvb_mux_dvbc_class;
|
||||
extern const idclass_t linuxdvb_mux_dvbs_class;
|
||||
extern const idclass_t linuxdvb_mux_atsc_class;
|
||||
linuxdvb_network_t *ln = (linuxdvb_network_t*)mn;
|
||||
switch (ln->ln_type) {
|
||||
case FE_OFDM:
|
||||
return &linuxdvb_mux_dvbt_class;
|
||||
case FE_QAM:
|
||||
return &linuxdvb_mux_dvbc_class;
|
||||
case FE_QPSK:
|
||||
return &linuxdvb_mux_dvbs_class;
|
||||
case FE_ATSC:
|
||||
return &linuxdvb_mux_atsc_class;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static mpegts_mux_t *
|
||||
linuxdvb_network_mux_create2
|
||||
( mpegts_network_t *mn, htsmsg_t *conf )
|
||||
{
|
||||
linuxdvb_network_t *ln = (linuxdvb_network_t*)mn;
|
||||
return (mpegts_mux_t*)
|
||||
linuxdvb_mux_create0(ln, MPEGTS_ONID_NONE, MPEGTS_TSID_NONE,
|
||||
NULL, NULL, conf);
|
||||
}
|
||||
|
||||
/* ****************************************************************************
|
||||
* Creation/Config
|
||||
* ***************************************************************************/
|
||||
|
@ -139,6 +172,8 @@ linuxdvb_network_create0
|
|||
ln->mn_create_mux = linuxdvb_network_create_mux;
|
||||
ln->mn_create_service = linuxdvb_network_create_service;
|
||||
ln->mn_config_save = linuxdvb_network_config_save;
|
||||
ln->mn_mux_class = linuxdvb_network_mux_class;
|
||||
ln->mn_mux_create2 = linuxdvb_network_mux_create2;
|
||||
|
||||
/* No config */
|
||||
if (!conf)
|
||||
|
|
|
@ -82,6 +82,21 @@ mpegts_network_create_service
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static const idclass_t *
|
||||
mpegts_network_mux_class
|
||||
( mpegts_network_t *mn )
|
||||
{
|
||||
extern const idclass_t mpegts_mux_class;
|
||||
return &mpegts_mux_class;
|
||||
}
|
||||
|
||||
static mpegts_mux_t *
|
||||
mpegts_network_mux_create2
|
||||
( mpegts_network_t *mn, htsmsg_t *conf )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* ****************************************************************************
|
||||
* Scanning
|
||||
* ***************************************************************************/
|
||||
|
@ -131,6 +146,8 @@ mpegts_network_create0
|
|||
mn->mn_config_save = mpegts_network_config_save;
|
||||
mn->mn_create_mux = mpegts_network_create_mux;
|
||||
mn->mn_create_service = mpegts_network_create_service;
|
||||
mn->mn_mux_class = mpegts_network_mux_class;
|
||||
mn->mn_mux_create2 = mpegts_network_mux_create2;
|
||||
|
||||
/* Network name */
|
||||
if (netname) mn->mn_network_name = strdup(netname);
|
||||
|
|
Loading…
Add table
Reference in a new issue