]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
fix tsdebug, fixes #4006
authorJaroslav Kysela <perex@perex.cz>
Mon, 3 Oct 2016 18:00:14 +0000 (20:00 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 3 Oct 2016 18:00:14 +0000 (20:00 +0200)
src/input/mpegts.h
src/input/mpegts/mpegts_input.c
src/tvhlog.c
src/tvhlog.h

index f958131a79e4871ce2e4b4664a0b8973786a668b..aa9a68b13a52632a3db8b797bab1bc4d00c22cfa 100644 (file)
@@ -991,7 +991,7 @@ tsdebug_write(mpegts_mux_t *mm, uint8_t *buf, size_t len)
 #if ENABLE_TSDEBUG
   if (mm && mm->mm_tsdebug_fd2 >= 0)
     if (write(mm->mm_tsdebug_fd2, buf, len) != len)
-      tvherror("tsdebug", "unable to write input data (%i)", errno);
+      tvherror(LS_TSDEBUG, "unable to write input data (%i)", errno);
 #endif
 }
 
index bac147518a4cfaacbdc8e5897d76920f4b3401ca..47b348503196d3d3463ee7ca4c9a732f6fbb3623 100644 (file)
@@ -847,12 +847,12 @@ mpegts_input_started_mux
              buf, (long)mono2sec(mclk()), mi);
     mmi->mmi_mux->mm_tsdebug_fd = tvh_open(path, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
     if (mmi->mmi_mux->mm_tsdebug_fd < 0)
-      tvherror("tsdebug", "unable to create file '%s' (%i)", path, errno);
+      tvherror(LS_TSDEBUG, "unable to create file '%s' (%i)", path, errno);
     snprintf(path, sizeof(path), "%s/%s-%li-%p-input.ts", tvheadend_tsdebug,
              buf, (long)mono2sec(mclk()), mi);
     mmi->mmi_mux->mm_tsdebug_fd2 = tvh_open(path, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
     if (mmi->mmi_mux->mm_tsdebug_fd2 < 0)
-      tvherror("tsdebug", "unable to create file '%s' (%i)", path, errno);
+      tvherror(LS_TSDEBUG, "unable to create file '%s' (%i)", path, errno);
   } else {
     mmi->mmi_mux->mm_tsdebug_fd = -1;
     mmi->mmi_mux->mm_tsdebug_fd2 = -1;
index eb3d545e6169f97d9e26ffb6d31447464adba7e0..24f0e8eec37e6ac005f8095e4dfd19f68cec755a 100644 (file)
@@ -163,6 +163,7 @@ tvhlog_subsys_t tvhlog_subsystems[] = {
   [LS_TIMESHIFT]     = { "timeshift",     N_("Timeshift") },
   [LS_SCANFILE]      = { "scanfile",      N_("Scanfile") },
   [LS_TSFILE]        = { "tsfile",        N_("MPEG-TS File") },
+  [LS_TSDEBUG]       = { "tsdebug",       N_("MPEG-TS Input Debug") },
 };
 
 static void
index f41c2c02b55285ec250fd27c0a2a39ab7a85b28b..d4b277feacef6535030d487e1baf78a9f1b9f176 100644 (file)
@@ -187,6 +187,7 @@ enum {
   LS_TIMESHIFT,
   LS_SCANFILE,
   LS_TSFILE,
+  LS_TSDEBUG,
   LS_LAST     /* keep this last */
 };