|
@@ -72,6 +72,7 @@ static const struct option long_options[] = {
|
72
|
72
|
{ "emm-only", no_argument, NULL, 'E' },
|
73
|
73
|
{ "emm-report-time", required_argument, NULL, 'f' },
|
74
|
74
|
|
|
75
|
+ { "ecm-pid", required_argument, NULL, 'X' },
|
75
|
76
|
{ "ecm-irdeto-type", required_argument, NULL, 'G' },
|
76
|
77
|
|
77
|
78
|
{ "debug", required_argument, NULL, 'D' },
|
|
@@ -129,6 +130,7 @@ static void show_help(struct ts *ts) {
|
129
|
130
|
printf(" | Set <sec> to 0 to disable reporting. Default: %d\n", ts->camd35.emm_count_report_interval);
|
130
|
131
|
printf("\n");
|
131
|
132
|
printf("ECM options:\n");
|
|
133
|
+ printf(" -X --ecm-pid <pid> | Force ECM pid. Default: none\n");
|
132
|
134
|
printf(" -G --ecm-irdeto-type <int> | Process only IRDETO ECMs with selected type (0,1,2,3). Default: %d\n", ts->irdeto_ecm);
|
133
|
135
|
printf("\n");
|
134
|
136
|
printf("Misc options:\n");
|
|
@@ -164,7 +166,7 @@ static int parse_io_param(struct io *io, char *opt, int open_flags, mode_t open_
|
164
|
166
|
|
165
|
167
|
static void parse_options(struct ts *ts, int argc, char **argv) {
|
166
|
168
|
int j, i, ca_err = 0, server_err = 1, input_addr_err = 0, output_addr_err = 0, output_intf_err = 0, ident_err = 0;
|
167
|
|
- while ( (j = getopt_long(argc, argv, "i:d:l:L:I:RzO:o:t:pc:s:U:P:y:eZ:Ef:G:D:h", long_options, NULL)) != -1 ) {
|
|
169
|
+ while ( (j = getopt_long(argc, argv, "i:d:l:L:I:RzO:o:t:pc:s:U:P:y:eZ:Ef:X:G:D:h", long_options, NULL)) != -1 ) {
|
168
|
170
|
char *p = NULL;
|
169
|
171
|
switch (j) {
|
170
|
172
|
case 'i':
|
|
@@ -275,6 +277,9 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
275
|
277
|
ts->camd35.emm_count_report_interval = 86400;
|
276
|
278
|
break;
|
277
|
279
|
|
|
280
|
+ case 'X':
|
|
281
|
+ ts->forced_ecm_pid = strtoul(optarg, NULL, 0) & 0x1fff;
|
|
282
|
+ break;
|
278
|
283
|
case 'G':
|
279
|
284
|
ts->irdeto_ecm = atoi(optarg);
|
280
|
285
|
break;
|
|
@@ -332,6 +337,9 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
332
|
337
|
if (ts->forced_emm_pid)
|
333
|
338
|
ts_LOGf("EMM pid : 0x%04x (%d)\n", ts->forced_emm_pid, ts->forced_emm_pid);
|
334
|
339
|
|
|
340
|
+ if (ts->forced_ecm_pid)
|
|
341
|
+ ts_LOGf("ECM pid : 0x%04x (%d)\n", ts->forced_ecm_pid, ts->forced_ecm_pid);
|
|
342
|
+
|
335
|
343
|
if (!ts->emm_only)
|
336
|
344
|
{
|
337
|
345
|
if (ts->output.type == NET_IO) {
|