|
@@ -103,7 +103,7 @@ void run_benchmark(void) {
|
103
|
103
|
puts("* Done *");
|
104
|
104
|
}
|
105
|
105
|
|
106
|
|
-// Unused short options: ABFQTWYagjkmnqruvwxy0123456789
|
|
106
|
+// Unused short options: ABFQTWYagjkmnqruv0123456789
|
107
|
107
|
static const struct option long_options[] = {
|
108
|
108
|
{ "ident", required_argument, NULL, 'i' },
|
109
|
109
|
{ "daemon", required_argument, NULL, 'd' },
|
|
@@ -121,6 +121,9 @@ static const struct option long_options[] = {
|
121
|
121
|
{ "output-intf", required_argument, NULL, 'o' },
|
122
|
122
|
{ "output-ttl", required_argument, NULL, 't' },
|
123
|
123
|
{ "output-filter", no_argument, NULL, 'p' },
|
|
124
|
+ { "output-nit-pass", no_argument, NULL, 'y' },
|
|
125
|
+ { "output-eit-pass", no_argument, NULL, 'w' },
|
|
126
|
+ { "output-tdt-pass", no_argument, NULL, 'x' },
|
124
|
127
|
|
125
|
128
|
{ "ca-system", required_argument, NULL, 'c' },
|
126
|
129
|
{ "caid", required_argument, NULL, 'C' },
|
|
@@ -179,6 +182,9 @@ static void show_help(struct ts *ts) {
|
179
|
182
|
printf(" -o --output-intf <addr> | Set multicast output interface. Default: %s\n", inet_ntoa(ts->output.intf));
|
180
|
183
|
printf(" -t --output-ttl <ttl> | Set multicast ttl. Default: %d\n", ts->output.ttl);
|
181
|
184
|
printf(" -p --output-filter | Enable or disable output filter. Default: %s\n", ts->pid_filter ? "enabled" : "disabled");
|
|
185
|
+ printf(" -y --output-nit-pass | Pass through NIT.\n");
|
|
186
|
+ printf(" -w --output-eit-pass | Pass through EIT (EPG).\n");
|
|
187
|
+ printf(" -x --output-tdt-pass | Pass through TDT/TOT.\n");
|
182
|
188
|
printf("\n");
|
183
|
189
|
printf("CA options:\n");
|
184
|
190
|
printf(" -c --ca-system <ca_sys> | Process input EMM/ECM from <ca_sys>.\n");
|
|
@@ -250,7 +256,7 @@ static int parse_io_param(struct io *io, char *opt, int open_flags, mode_t open_
|
250
|
256
|
|
251
|
257
|
static void parse_options(struct ts *ts, int argc, char **argv) {
|
252
|
258
|
int j, i, ca_err = 0, server_err = 1, input_addr_err = 0, output_addr_err = 0, output_intf_err = 0, ident_err = 0;
|
253
|
|
- while ( (j = getopt_long(argc, argv, "i:d:N:Sl:L:I:RzM:O:o:t:pc:C:s:U:P:eZ:Ef:X:H:G:KJ:D:bhV", long_options, NULL)) != -1 ) {
|
|
259
|
+ while ( (j = getopt_long(argc, argv, "i:d:N:Sl:L:I:RzM:O:o:t:pwxyc:C:s:U:P:eZ:Ef:X:H:G:KJ:D:bhV", long_options, NULL)) != -1 ) {
|
254
|
260
|
char *p = NULL;
|
255
|
261
|
switch (j) {
|
256
|
262
|
case 'i':
|
|
@@ -309,7 +315,15 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
309
|
315
|
case 'p':
|
310
|
316
|
ts->pid_filter = !ts->pid_filter;
|
311
|
317
|
break;
|
312
|
|
-
|
|
318
|
+ case 'y':
|
|
319
|
+ ts->nit_passthrough = !ts->nit_passthrough;
|
|
320
|
+ break;
|
|
321
|
+ case 'w':
|
|
322
|
+ ts->eit_passthrough = !ts->eit_passthrough;
|
|
323
|
+ break;
|
|
324
|
+ case 'x':
|
|
325
|
+ ts->tdt_passthrough = !ts->tdt_passthrough;
|
|
326
|
+ break;
|
313
|
327
|
case 'c':
|
314
|
328
|
if (strcasecmp("IRDETO", optarg) == 0)
|
315
|
329
|
ts->req_CA_sys = CA_IRDETO;
|
|
@@ -472,7 +486,18 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
472
|
486
|
} else if (ts->output.type == FILE_IO) {
|
473
|
487
|
ts_LOGf("Output file: %s\n", ts->output.fd == 1 ? "STDOUT" : ts->output.fname);
|
474
|
488
|
}
|
475
|
|
- ts_LOGf("PID filter : %s\n", ts->pid_filter ? "enabled" : "disabled");
|
|
489
|
+ ts_LOGf("Out filter : %s (%s)\n",
|
|
490
|
+ ts->pid_filter ? "enabled" : "disabled",
|
|
491
|
+ ts->pid_filter ? "output only service related PIDs" : "output everything"
|
|
492
|
+ );
|
|
493
|
+ if (ts->pid_filter) {
|
|
494
|
+ if (ts->nit_passthrough)
|
|
495
|
+ ts_LOGf("Out filter : Pass through NIT.\n");
|
|
496
|
+ if (ts->eit_passthrough)
|
|
497
|
+ ts_LOGf("Out filter : Pass through EIT (EPG).\n");
|
|
498
|
+ if (ts->tdt_passthrough)
|
|
499
|
+ ts_LOGf("Out filter : Pass through TDT/TOT.\n");
|
|
500
|
+ }
|
476
|
501
|
}
|
477
|
502
|
ts_LOGf("Server addr: tcp://%s:%u/\n", inet_ntoa(ts->camd35.server_addr), ts->camd35.server_port);
|
478
|
503
|
ts_LOGf("Server user: %s\n", ts->camd35.user);
|