From: Jaroslav Kysela Date: Mon, 22 May 2017 07:56:20 +0000 (+0200) Subject: config: Add HbbTV enable field X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fcef398b1af92424984feaa4193781ccae27c60;p=thirdparty%2Ftvheadend.git config: Add HbbTV enable field --- diff --git a/src/config.c b/src/config.c index 85ff638bd..a46d0010d 100644 --- a/src/config.c +++ b/src/config.c @@ -2078,6 +2078,14 @@ const idclass_t config_class = { .off = offsetof(config_t, server_name), .group = 1 }, + { + .type = PT_BOOL, + .id = "hbbtv", + .name = N_("Parse HbbTV info"), + .desc = N_("Parse HbbTV information from the services."), + .off = offsetof(config_t, hbbtv), + .group = 1 + }, { .type = PT_INT, .id = "uilevel", diff --git a/src/config.h b/src/config.h index afeaec42a..cef8e4b35 100644 --- a/src/config.h +++ b/src/config.h @@ -30,6 +30,7 @@ typedef struct config { idnode_t idnode; uint32_t version; + int hbbtv; int uilevel; int uilevel_nochange; int ui_quicktips; diff --git a/src/input/mpegts/dvb_psi.c b/src/input/mpegts/dvb_psi.c index 1b0bc1cee..3ea309b3b 100644 --- a/src/input/mpegts/dvb_psi.c +++ b/src/input/mpegts/dvb_psi.c @@ -2337,7 +2337,8 @@ psi_parse_pmt break; case 0x05: - hts_stream_type = SCT_HBBTV; + if (config.hbbtv) + hts_stream_type = SCT_HBBTV; break; case 0x06: diff --git a/src/service.c b/src/service.c index 6d93dda60..b34e2502b 100644 --- a/src/service.c +++ b/src/service.c @@ -49,6 +49,7 @@ #include "esfilter.h" #include "bouquet.h" #include "memoryinfo.h" +#include "config.h" static void service_data_timeout(void *aux); static void service_class_delete(struct idnode *self); @@ -2221,12 +2222,14 @@ void service_load ( service_t *t, htsmsg_t *c ) if(!htsmsg_get_u32(c, "pmt", &u32)) t->s_pmt_pid = u32; - hbbtv = htsmsg_get_map(c, "hbbtv"); - if (hbbtv) { - t->s_hbbtv = htsmsg_copy(hbbtv); - } else { - htsmsg_destroy(t->s_hbbtv); - t->s_hbbtv = NULL; + if (config.hbbtv) { + hbbtv = htsmsg_get_map(c, "hbbtv"); + if (hbbtv) { + t->s_hbbtv = htsmsg_copy(hbbtv); + } else { + htsmsg_destroy(t->s_hbbtv); + t->s_hbbtv = NULL; + } } pthread_mutex_lock(&t->s_stream_mutex);