|
@@ -79,9 +79,9 @@ static void LOG_func(const char *msg) {
|
79
|
79
|
LOG(msg);
|
80
|
80
|
}
|
81
|
81
|
|
82
|
|
-static const char short_options[] = "i:d:N:Sl:L:F:I:1:RzM:T:W:O:o:t:rk:g:upwxyc:C:Y:Q:A:s:U:P:B:46eZ:Ef:a:X:vqH:G:KJ:D:jbhVn:m:";
|
|
82
|
+static const char short_options[] = "i:d:N:Sl:L:F:I:1:RzM:T:W:O:o:t:rk:g:upwxyc:C:Y:Q:A:s:U:P:B:46eZ:Ef:a:X:vqH:G:2:KJ:D:jbhVn:m:";
|
83
|
83
|
|
84
|
|
-// Unused short options: 0235789
|
|
84
|
+// Unused short options: 035789
|
85
|
85
|
static const struct option long_options[] = {
|
86
|
86
|
{ "ident", required_argument, NULL, 'i' },
|
87
|
87
|
{ "daemon", required_argument, NULL, 'd' },
|
|
@@ -134,6 +134,7 @@ static const struct option long_options[] = {
|
134
|
134
|
{ "ecm-only", no_argument, NULL, 'v' },
|
135
|
135
|
{ "ecm-report-time", required_argument, NULL, 'H' },
|
136
|
136
|
{ "ecm-irdeto-type", required_argument, NULL, 'G' },
|
|
137
|
+ { "ecm-irdeto-chid", required_argument, NULL, '2' },
|
137
|
138
|
{ "ecm-no-log", no_argument , NULL, 'K' },
|
138
|
139
|
{ "cw-warn-time", required_argument, NULL, 'J' },
|
139
|
140
|
|
|
@@ -242,7 +243,9 @@ static void show_help(struct ts *ts) {
|
242
|
243
|
printf(" -H --ecm-report-time <sec> | Report each <sec> how much ECMs and CWs have been\n");
|
243
|
244
|
printf(" . processed/skipped. Set <sec> to 0 to disable\n");
|
244
|
245
|
printf(" . the reports. Default: %d sec\n", ts->ecm_report_interval);
|
245
|
|
- printf(" -G --ecm-irdeto-type <int> | Process IRDETO ECMs with type X /0-3/. Default: %d\n", ts->irdeto_ecm);
|
|
246
|
+ printf(" -G --ecm-irdeto-type <int> | Process IRDETO ECMs with index X /0-255/\n");
|
|
247
|
+ printf(" . It is better to use --ecm-irdeto-chid option!\n");
|
|
248
|
+ printf(" -2 --ecm-irdeto-chid <int> | Set CHID to filter Irdeto ECMs (Default: 0x0000).\n");
|
246
|
249
|
printf(" -K --ecm-no-log | Disable ECM and code words logging.\n");
|
247
|
250
|
printf(" -J --cw-warn-time <sec> | Warn if no valid code word has been received.\n");
|
248
|
251
|
printf(" . Set <sec> to 0 to disable. Default: %d sec\n", ts->cw_warn_sec);
|
|
@@ -557,7 +560,12 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
557
|
560
|
ts->ecm_report_interval = 86400;
|
558
|
561
|
break;
|
559
|
562
|
case 'G': // --ecm-irdeto-type
|
560
|
|
- ts->irdeto_ecm = atoi(optarg);
|
|
563
|
+ ts->irdeto_ecm_idx = strtoul(optarg, NULL, 0);
|
|
564
|
+ ts->irdeto_ecm_filter_type = IRDETO_FILTER_IDX;
|
|
565
|
+ break;
|
|
566
|
+ case '2': // --ecm-irdeto-chid
|
|
567
|
+ ts->irdeto_ecm_chid = strtoul(optarg, NULL, 0);
|
|
568
|
+ ts->irdeto_ecm_filter_type = IRDETO_FILTER_CHID;
|
561
|
569
|
break;
|
562
|
570
|
case 'K': // --ecm-no-log
|
563
|
571
|
ts->ecm_cw_log = !ts->ecm_cw_log;
|
|
@@ -734,8 +742,12 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
734
|
742
|
if (ts->forced_service_id)
|
735
|
743
|
ts_LOGf("Service id : 0x%04x (%d)\n",
|
736
|
744
|
ts->forced_service_id, ts->forced_service_id);
|
737
|
|
- if (ts->req_CA_sys == CA_IRDETO)
|
738
|
|
- ts_LOGf("Irdeto ECM : %d\n", ts->irdeto_ecm);
|
|
745
|
+ if (ts->req_CA_sys == CA_IRDETO) {
|
|
746
|
+ switch (ts->irdeto_ecm_filter_type) {
|
|
747
|
+ case IRDETO_FILTER_IDX : ts_LOGf("Irdeto ECM : Index: 0x%02x (%d)\n", ts->irdeto_ecm_idx, ts->irdeto_ecm_idx); break;
|
|
748
|
+ case IRDETO_FILTER_CHID: ts_LOGf("Irdeto ECM : CHID: 0x%04x (%d)\n", ts->irdeto_ecm_chid, ts->irdeto_ecm_chid); break;
|
|
749
|
+ }
|
|
750
|
+ }
|
739
|
751
|
|
740
|
752
|
if (ts->output_stream) {
|
741
|
753
|
if (ts->output.type == NET_IO) {
|