From: Jaroslav Kysela Date: Wed, 3 Feb 2016 09:32:19 +0000 (+0100) Subject: parser: make backlog function configurable X-Git-Tag: v4.2.1~1086 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c8810d2a13e1eba52f85b7c339746ab30ccb24ad;p=thirdparty%2Ftvheadend.git parser: make backlog function configurable --- diff --git a/src/config.c b/src/config.c index 53fe535c8..92f8d98ac 100644 --- a/src/config.c +++ b/src/config.c @@ -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, diff --git a/src/config.h b/src/config.h index e5d34e857..dae230b63 100644 --- a/src/config.h +++ b/src/config.h @@ -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; diff --git a/src/parsers/parsers.c b/src/parsers/parsers.c index 5c1845b95..44c72efd0 100644 --- a/src/parsers/parsers.c +++ b/src/parsers/parsers.c @@ -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