|
@@ -69,9 +69,9 @@ static void LOG_func(const char *msg) {
|
69
|
69
|
LOG(msg);
|
70
|
70
|
}
|
71
|
71
|
|
72
|
|
-static const char short_options[] = "i:d:N:Sl:L:F:I:RzM:T:W:O:o:t:rk:g:pwxyc:C:Y:Q:A:s:U:P:B:eZ:Ef:X:H:G:KJ:D:jbhV";
|
|
72
|
+static const char short_options[] = "i:d:N:Sl:L:F:I:RzM:T:W:O:o:t:rk:g:upwxyc:C:Y:Q:A:s:U:P:B:eZ:Ef:X:H:G:KJ:D:jbhV";
|
73
|
73
|
|
74
|
|
-// Unused short options: amnquv0123456789
|
|
74
|
+// Unused short options: amnqv0123456789
|
75
|
75
|
static const struct option long_options[] = {
|
76
|
76
|
{ "ident", required_argument, NULL, 'i' },
|
77
|
77
|
{ "daemon", required_argument, NULL, 'd' },
|
|
@@ -95,6 +95,7 @@ static const struct option long_options[] = {
|
95
|
95
|
{ "output-rtp-ssrc", required_argument, NULL, 'k' },
|
96
|
96
|
{ "output-tos", required_argument, NULL, 'g' },
|
97
|
97
|
{ "output-filter", no_argument, NULL, 'p' },
|
|
98
|
+ { "no-output-on-error", no_argument, NULL, 'u' },
|
98
|
99
|
{ "no-output-filter", no_argument, NULL, 'p' },
|
99
|
100
|
{ "output-nit-pass", no_argument, NULL, 'y' },
|
100
|
101
|
{ "output-eit-pass", no_argument, NULL, 'w' },
|
|
@@ -163,6 +164,7 @@ static void show_help(struct ts *ts) {
|
163
|
164
|
printf(" -r --output-rtp | Enable RTP output.\n");
|
164
|
165
|
printf(" -k --output-rtp-ssrc <id> | Set RTP SSRC. Default: %u\n", ts->rtp_ssrc);
|
165
|
166
|
printf(" -g --output-tos <tos> | Set TOS value of output packets. Default: none\n");
|
|
167
|
+ printf(" -u --no-output-on-error | Do not output data when the code word is missing.\n");
|
166
|
168
|
printf(" -p --no-output-filter | Disable output filtering. Default: %s\n", ts->pid_filter ? "enabled" : "disabled");
|
167
|
169
|
printf(" -y --output-nit-pass | Pass through NIT.\n");
|
168
|
170
|
printf(" -w --output-eit-pass | Pass through EIT (EPG).\n");
|
|
@@ -322,6 +324,9 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
322
|
324
|
case 'g': // --output-tos
|
323
|
325
|
ts->output.tos = (uint8_t)strtol(optarg, NULL, 0);
|
324
|
326
|
break;
|
|
327
|
+ case 'u': // --no-output-on-error
|
|
328
|
+ ts->no_output_on_error = !ts->no_output_on_error;
|
|
329
|
+ break;
|
325
|
330
|
case 'p': // --no-output-filter
|
326
|
331
|
ts->pid_filter = 0;
|
327
|
332
|
break;
|
|
@@ -628,9 +633,10 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
628
|
633
|
} else if (ts->output.type == FILE_IO) {
|
629
|
634
|
ts_LOGf("Output file: %s\n", ts->output.fd == 1 ? "STDOUT" : ts->output.fname);
|
630
|
635
|
}
|
631
|
|
- ts_LOGf("Out filter : %s (%s)\n",
|
|
636
|
+ ts_LOGf("Out filter : %s (%s)%s\n",
|
632
|
637
|
ts->pid_filter ? "enabled" : "disabled",
|
633
|
|
- ts->pid_filter ? "output only service related PIDs" : "output everything"
|
|
638
|
+ ts->pid_filter ? "output only service related PIDs" : "output everything",
|
|
639
|
+ ts->no_output_on_error ? " (No output on CW error)" : ""
|
634
|
640
|
);
|
635
|
641
|
if (ts->pid_filter) {
|
636
|
642
|
if (ts->nit_passthrough)
|