]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
config: Add HbbTV enable field
authorJaroslav Kysela <perex@perex.cz>
Mon, 22 May 2017 07:56:20 +0000 (09:56 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 22 May 2017 07:57:00 +0000 (09:57 +0200)
src/config.c
src/config.h
src/input/mpegts/dvb_psi.c
src/service.c

index 85ff638bd6b182edad6a4c6e953853a6d6e0142c..a46d0010d90003d177e4d8013b7ff3b83dd1c0f4 100644 (file)
@@ -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",
index afeaec42a7857f36f82c02ca13fd215861e0b20b..cef8e4b35b5a06c456ca65b194afd6261443e642 100644 (file)
@@ -30,6 +30,7 @@
 typedef struct config {
   idnode_t idnode;
   uint32_t version;
+  int hbbtv;
   int uilevel;
   int uilevel_nochange;
   int ui_quicktips;
index 1b0bc1cee21d0e70c490bb35cb9a046d8625c78b..3ea309b3b5cc59efc38702eaf917ea66b4adf09b 100644 (file)
@@ -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:
index 6d93dda609dbb6977b4ce0f1ddb5b0b5fceaebe9..b34e2502b27fa9673591d886b19620e358d7951f 100644 (file)
@@ -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);