]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
parser: make backlog function configurable
authorJaroslav Kysela <perex@perex.cz>
Wed, 3 Feb 2016 09:32:19 +0000 (10:32 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 3 Feb 2016 09:34:17 +0000 (10:34 +0100)
src/config.c
src/config.h
src/parsers/parsers.c

index 53fe535c83a666e093226755268d82e321d4b98a..92f8d98acdafd07c50df1bc408cd5882830476ac 100644 (file)
@@ -2057,15 +2057,23 @@ const idclass_t config_class = {
       .type   = PT_U32,
       .id     = "descrambler_buffer",
       .name   = N_("Descrambler buffer (TS packets)"),
-      .desc   = N_("The number of packets Tvheadend buffers in case "
+      .desc   = N_("The number of MPEG-TS packets Tvheadend buffers in case "
                    "there is a delay receiving CA keys. "),
-                   /* Note: I'm not sure I've explained this very well
-                    * ;)
-                    */
       .off    = offsetof(config_t, descrambler_buffer),
       .opts   = PO_EXPERT,
       .group  = 1
     },
+    {
+      .type   = PT_BOOL,
+      .id     = "parser_backlog",
+      .name   = N_("Use packet backlog"),
+      .desc   = N_("Send previous stream frames to upper layers "
+                   "(before frame start is signalled in the stream). "
+                   "It may cause issues with some clients / players."),
+      .off    = offsetof(config_t, parser_backlog),
+      .opts   = PO_EXPERT,
+      .group  = 1
+    },
     {
       .type   = PT_STR,
       .islist = 1,
index e5d34e857c3cc1e5afa3a0b718ca6034d35b52e6..dae230b6338a88bc06ae2f029274ab4e5caff755 100644 (file)
@@ -51,6 +51,7 @@ typedef struct config {
   uint32_t cookie_expires;
   int dscp;
   uint32_t descrambler_buffer;
+  int parser_backlog;
 } config_t;
 
 extern const idclass_t config_class;
index 5c1845b95e01dcdbca7be91ad29f087b36c74efd..44c72efd03ac0924c981681e99b09362a202fd23 100644 (file)
@@ -36,6 +36,7 @@
 #include "bitstream.h"
 #include "packet.h"
 #include "streaming.h"
+#include "config.h"
 
 /* parser states */
 #define PARSER_APPEND 0
@@ -1341,7 +1342,8 @@ deliver:
       goto deliver;
     }
   }
-  parser_backlog(t, st, pkt);
+  if (config.parser_backlog)
+    parser_backlog(t, st, pkt);
 }
 
 static int