|
@@ -65,6 +65,7 @@ static const struct option long_options[] = {
|
65
|
65
|
{ "input", required_argument, NULL, 'I' },
|
66
|
66
|
{ "input-rtp", no_argument, NULL, 'R' },
|
67
|
67
|
{ "input-ignore-disc", no_argument, NULL, 'z' },
|
|
68
|
+ { "service", required_argument, NULL, 'M' },
|
68
|
69
|
|
69
|
70
|
{ "output", required_argument, NULL, 'O' },
|
70
|
71
|
{ "output-intf", required_argument, NULL, 'o' },
|
|
@@ -118,6 +119,7 @@ static void show_help(struct ts *ts) {
|
118
|
119
|
printf(" . -I - (read from stdin) (default)\n");
|
119
|
120
|
printf(" -R --input-rtp | Enable RTP input\n");
|
120
|
121
|
printf(" -z --input-ignore-disc | Do not report discontinuty errors in input.\n");
|
|
122
|
+ printf(" -M --service <service_id> | Choose service id when input is MPTS.\n");
|
121
|
123
|
printf("\n");
|
122
|
124
|
printf("Output options:\n");
|
123
|
125
|
printf(" -O --output <dest> | Where to send output. File or multicast address.\n");
|
|
@@ -199,7 +201,7 @@ static int parse_io_param(struct io *io, char *opt, int open_flags, mode_t open_
|
199
|
201
|
|
200
|
202
|
static void parse_options(struct ts *ts, int argc, char **argv) {
|
201
|
203
|
int j, i, ca_err = 0, server_err = 1, input_addr_err = 0, output_addr_err = 0, output_intf_err = 0, ident_err = 0;
|
202
|
|
- while ( (j = getopt_long(argc, argv, "i:d:N:l:L:I:RzO:o:t:pc:C:s:U:P:y:eZ:Ef:X:H:G:KJ:D:hV", long_options, NULL)) != -1 ) {
|
|
204
|
+ while ( (j = getopt_long(argc, argv, "i:d:N:l:L:I:RzM:O:o:t:pc:C:s:U:P:y:eZ:Ef:X:H:G:KJ:D:hV", long_options, NULL)) != -1 ) {
|
203
|
205
|
char *p = NULL;
|
204
|
206
|
switch (j) {
|
205
|
207
|
case 'i':
|
|
@@ -239,6 +241,9 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
239
|
241
|
case 'z':
|
240
|
242
|
ts->ts_discont = !ts->ts_discont;
|
241
|
243
|
break;
|
|
244
|
+ case 'M':
|
|
245
|
+ ts->forced_service_id = strtoul(optarg, NULL, 0) & 0xffff;
|
|
246
|
+ break;
|
242
|
247
|
|
243
|
248
|
case 'O':
|
244
|
249
|
output_addr_err = parse_io_param(&ts->output, optarg,
|
|
@@ -404,6 +409,9 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
404
|
409
|
} else if (ts->input.type == FILE_IO) {
|
405
|
410
|
ts_LOGf("Input file : %s\n", ts->input.fd == 0 ? "STDIN" : ts->input.fname);
|
406
|
411
|
}
|
|
412
|
+ if (ts->forced_service_id)
|
|
413
|
+ ts_LOGf("Service id : 0x%04x (%d)\n",
|
|
414
|
+ ts->forced_service_id, ts->forced_service_id);
|
407
|
415
|
if (ts->req_CA_sys == CA_IRDETO)
|
408
|
416
|
ts_LOGf("Irdeto ECM : %d\n", ts->irdeto_ecm);
|
409
|
417
|
|