bouquets: add --nobat debug option
This commit is contained in:
parent
6bcecff056
commit
3ba5bb9d0b
2 changed files with 17 additions and 6 deletions
|
@ -81,6 +81,8 @@ typedef struct dvb_bat {
|
|||
|
||||
SKEL_DECLARE(mpegts_table_state_skel, struct mpegts_table_state);
|
||||
|
||||
int dvb_bouquets_parse = 1;
|
||||
|
||||
static int
|
||||
psi_parse_pmt(mpegts_mux_t *mux, mpegts_service_t *t, const uint8_t *ptr, int len);
|
||||
|
||||
|
@ -386,6 +388,7 @@ dvb_bat_find_service( dvb_bat_id_t *bi, mpegts_service_t *s,
|
|||
{
|
||||
dvb_bat_svc_t *bs;
|
||||
|
||||
assert(bi);
|
||||
TAILQ_FOREACH(bs, &bi->services, link)
|
||||
if (bs->svc == s)
|
||||
break;
|
||||
|
@ -525,6 +528,9 @@ dvb_freesat_regions
|
|||
dvb_freesat_region_t *fr;
|
||||
int r;
|
||||
|
||||
if (!bi)
|
||||
return;
|
||||
|
||||
while (len > 5) {
|
||||
id = (ptr[0] << 8) | ptr[1];
|
||||
/* language: ptr[2-4]: 'eng' */
|
||||
|
@ -728,8 +734,6 @@ dvb_bskyb_local_channels
|
|||
if (len < 2)
|
||||
return;
|
||||
|
||||
assert(bi);
|
||||
|
||||
regionid = (ptr[1] != 0xff) ? ptr[1] : 0xffff;
|
||||
|
||||
#if 0
|
||||
|
@ -1319,7 +1323,8 @@ dvb_nit_callback
|
|||
}
|
||||
|
||||
/* BAT ID lookup */
|
||||
if (tableid == 0x4A || tableid == DVB_FASTSCAN_NIT_BASE) {
|
||||
if (dvb_bouquets_parse &&
|
||||
(tableid == 0x4A || tableid == DVB_FASTSCAN_NIT_BASE)) {
|
||||
if ((b = mt->mt_bat) == NULL) {
|
||||
b = calloc(1, sizeof(*b));
|
||||
mt->mt_bat = b;
|
||||
|
@ -1490,7 +1495,7 @@ lcn:
|
|||
break;
|
||||
case DVB_DESC_FREESAT_LCN:
|
||||
#if ENABLE_MPEGTS_DVB
|
||||
if (tableid == 0x4A && priv == PRIV_FSAT) {
|
||||
if (bi && tableid == 0x4A && priv == PRIV_FSAT) {
|
||||
dvb_freesat_local_channels(bi, mt->mt_name, dptr, dlen);
|
||||
bi->freesat = 1;
|
||||
}
|
||||
|
@ -1498,7 +1503,7 @@ lcn:
|
|||
break;
|
||||
case DVB_DESC_BSKYB_LCN:
|
||||
#if ENABLE_MPEGTS_DVB
|
||||
if (tableid == 0x4A && priv == 2) {
|
||||
if (bi && tableid == 0x4A && priv == 2) {
|
||||
dvb_bskyb_local_channels(bi, mt->mt_name, dptr, dlen, mux);
|
||||
bi->bskyb = 1;
|
||||
}
|
||||
|
|
|
@ -439,6 +439,7 @@ main(int argc, char **argv)
|
|||
const char *log_debug = NULL, *log_trace = NULL;
|
||||
char buf[512];
|
||||
FILE *pidfile = NULL;
|
||||
extern int dvb_bouquets_parse;
|
||||
|
||||
main_tid = pthread_self();
|
||||
|
||||
|
@ -473,7 +474,8 @@ main(int argc, char **argv)
|
|||
opt_xspf = 0,
|
||||
opt_dbus = 0,
|
||||
opt_dbus_session = 0,
|
||||
opt_nobackup = 0;
|
||||
opt_nobackup = 0,
|
||||
opt_nobat = 0;
|
||||
const char *opt_config = NULL,
|
||||
*opt_user = NULL,
|
||||
*opt_group = NULL,
|
||||
|
@ -552,6 +554,8 @@ main(int argc, char **argv)
|
|||
{ 'D', "dump", "Enable coredumps for daemon", OPT_BOOL, &opt_dump },
|
||||
{ 0, "noacl", "Disable all access control checks",
|
||||
OPT_BOOL, &opt_noacl },
|
||||
{ 0, "nobat", "Disable DVB bouquets",
|
||||
OPT_BOOL, &opt_nobat },
|
||||
{ 'j', "join", "Subscribe to a service permanently",
|
||||
OPT_STR, &opt_subscribe },
|
||||
|
||||
|
@ -606,6 +610,8 @@ main(int argc, char **argv)
|
|||
}
|
||||
|
||||
/* Additional cmdline processing */
|
||||
if (opt_nobat)
|
||||
dvb_bouquets_parse = 0;
|
||||
#if ENABLE_LINUXDVB
|
||||
if (!opt_dvb_adapters) {
|
||||
adapter_mask = ~0;
|
||||
|
|
Loading…
Add table
Reference in a new issue