Browse Source

Add --ecm-only (-v) and --ecm-and-emm-only (-q) options.

Georgi Chorbadzhiyski 11 years ago
parent
commit
dd263a756c
4 changed files with 45 additions and 4 deletions
  1. 6
    0
      ChangeLog
  2. 5
    0
      README
  3. 14
    2
      tsdecrypt.1
  4. 20
    2
      tsdecrypt.c

+ 6
- 0
ChangeLog View File

@@ -1,3 +1,9 @@
1
+now : current
2
+ * Add --ecm-only (-v) option. This allows processing of ECMs but without
3
+   decoding the input stream.
4
+ * Add --ecm-and-emm-only (-q) option. This allows processing of ECMs
5
+   and EMMs but without decoding the input stream.
6
+
1 7
 2012-09-10 : Version 9.0
2 8
  * Add --no-output-on-error (-u) option. By using this option output can be
3 9
    disabled if there is no currently received code word.

+ 5
- 0
README View File

@@ -174,6 +174,8 @@ EMM options:
174 174
 
175 175
 ECM options:
176 176
  -X --ecm-pid <pid>         | Force ECM pid. Default: none
177
+ -v --ecm-only              | Send only ECMs to CAMD, skipping EMMs and without
178
+                            .   decoding the input stream.
177 179
  -H --ecm-report-time <sec> | Report each <sec> how much ECMs and CWs have been
178 180
                             .   processed/skipped. Set <sec> to 0 to disable
179 181
                             .   the reports. Default: 60 sec
@@ -182,6 +184,9 @@ ECM options:
182 184
  -J --cw-warn-time <sec>    | Warn if no valid code word has been received.
183 185
                             .   Set <sec> to 0 to disable. Default: 60 sec
184 186
 
187
+ -q --ecm-and-emm-only      | Send ECMs and EMMs to CAMD but do not decode
188
+                            .   the input stream.
189
+
185 190
 Logging options:
186 191
  -S --syslog                | Log messages using syslog.
187 192
  -l --syslog-host <host>    | Syslog server address. Default: disabled

+ 14
- 2
tsdecrypt.1 View File

@@ -221,10 +221,11 @@ Set EMM pid manually. This option is useful for services that have
221 221
 couple of EMM streams from one CA system. Without this option tsdecrypt
222 222
 always chooses the first stream from the chosen CA system.
223 223
 .TP
224
-\fB\-E\fR, \fB\-\-emm\-only\fR <hierarchy>
224
+\fB\-E\fR, \fB\-\-emm\-only\fR
225 225
 Disable ECM processing and stream output. This option is useful if the EMM
226 226
 stream has very high rate and is interfering with ECM processing. Using
227
-\-\-emm\-only you can run special tsdecrypt dedicated only to card auto update.
227
+\-\-emm\-only you can run special tsdecrypt dedicated only to keeping
228
+card entitlements up to date.
228 229
 .TP
229 230
 \fB\-f\fR, \fB\-\-emm\-report\-time\fR <seconds>
230 231
 Set interval for EMM reports. The default is \fB60\fR seconds. Set to \fB0\fR
@@ -251,6 +252,11 @@ always chooses the first stream from the chosen CA system. Run tsdecrypt
251 252
 with \-\-debug 2 and look at CA descriptors in PMT to see what CA streams
252 253
 are available.
253 254
 .TP
255
+\fB\-v\fR, \fB\-\-ecm\-only\fR
256
+Process ECMs but do not decode the input stream. This option is useful if
257
+you just want to populate you OSCAM DCW cache but do not want to waste CPU
258
+time on stream decoding.
259
+.TP
254 260
 \fB\-H\fR, \fB\-\-ecm\-report\-time\fR <seconds>
255 261
 Set interval for ECM reports. The default is \fB60\fR seconds. Set to \fB0\fR
256 262
 to disable ECM reports.
@@ -269,6 +275,12 @@ reports are not affected by this option.
269 275
 After how much seconds to warn if valid code word was not received.
270 276
 The default is \fB60\fR seconds. Set to \fB0\fR to disable the warning.
271 277
 .TP
278
+\fB\-q\fR, \fB\-\-ecm\-and-emm-only\fR
279
+Process ECMs and EMMs but do not decode the input stream. This option combines
280
+\-\-ecm\-only and \-\-emm\-only options. Use it if you want to populate your
281
+OSCAM DCW cache and keep your card entitlements updated but do not want to
282
+waste CPU time on stream decoding.
283
+.TP
272 284
 .SH DEBUG OPTIONS
273 285
 .PP
274 286
 .TP

+ 20
- 2
tsdecrypt.c View File

@@ -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:RzM:T:W:O:o:t:rk:g:upwxyc:C:Y:Q:A:s:U:P:B:46eZ:Ef:a:X:H:G:KJ:D:jbhVn:m:";
82
+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:46eZ:Ef:a:X:vqH:G:KJ:D:jbhVn:m:";
83 83
 
84
-// Unused short options: aqv01235789
84
+// Unused short options: a01235789
85 85
 static const struct option long_options[] = {
86 86
 	{ "ident",				required_argument, NULL, 'i' },
87 87
 	{ "daemon",				required_argument, NULL, 'd' },
@@ -130,11 +130,14 @@ static const struct option long_options[] = {
130 130
 	{ "emm-filter",			required_argument, NULL, 'a' },
131 131
 
132 132
 	{ "ecm-pid",			required_argument, NULL, 'X' },
133
+	{ "ecm-only",			no_argument,       NULL, 'v' },
133 134
 	{ "ecm-report-time",	required_argument, NULL, 'H' },
134 135
 	{ "ecm-irdeto-type",	required_argument, NULL, 'G' },
135 136
 	{ "ecm-no-log",			no_argument      , NULL, 'K' },
136 137
 	{ "cw-warn-time",		required_argument, NULL, 'J' },
137 138
 
139
+	{ "ecm-and-emm-only",	no_argument,       NULL, 'q' },
140
+
138 141
 	{ "debug",				required_argument, NULL, 'D' },
139 142
 	{ "pid-report",			no_argument,       NULL, 'j' },
140 143
 	{ "bench",				no_argument,       NULL, 'b' },
@@ -231,6 +234,8 @@ static void show_help(struct ts *ts) {
231 234
 	printf("\n");
232 235
 	printf("ECM options:\n");
233 236
 	printf(" -X --ecm-pid <pid>         | Force ECM pid. Default: none\n");
237
+	printf(" -v --ecm-only              | Send only ECMs to CAMD, skipping EMMs and without\n");
238
+	printf("                            .   decoding the input stream.\n");
234 239
 	printf(" -H --ecm-report-time <sec> | Report each <sec> how much ECMs and CWs have been\n");
235 240
 	printf("                            .   processed/skipped. Set <sec> to 0 to disable\n");
236 241
 	printf("                            .   the reports. Default: %d sec\n", ts->ecm_report_interval);
@@ -239,6 +244,9 @@ static void show_help(struct ts *ts) {
239 244
 	printf(" -J --cw-warn-time <sec>    | Warn if no valid code word has been received.\n");
240 245
 	printf("                            .   Set <sec> to 0 to disable. Default: %d sec\n", ts->cw_warn_sec);
241 246
 	printf("\n");
247
+	printf(" -q --ecm-and-emm-only      | Send ECMs and EMMs to CAMD but do not decode\n");
248
+	printf("                            .   the input stream.\n");
249
+	printf("\n");
242 250
 	printf("Logging options:\n");
243 251
 	printf(" -S --syslog                | Log messages using syslog.\n");
244 252
 	printf(" -l --syslog-host <host>    | Syslog server address. Default: disabled\n");
@@ -525,6 +533,11 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
525 533
 			case 'X': // --ecm-pid
526 534
 				ts->forced_ecm_pid = strtoul(optarg, NULL, 0) & 0x1fff;
527 535
 				break;
536
+			case 'v': // --ecm-only
537
+				ts->process_emm = 0;
538
+				ts->process_ecm = 1;
539
+				ts->output_stream = 0;
540
+				break;
528 541
 			case 'H': // --ecm-report-time
529 542
 				ts->ecm_report_interval = strtoul(optarg, NULL, 10);
530 543
 				if (ts->ecm_report_interval > 86400)
@@ -542,6 +555,11 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
542 555
 					ts->cw_warn_sec = 86400;
543 556
 				ts->cw_last_warn= ts->cw_last_warn + ts->cw_warn_sec;
544 557
 				break;
558
+			case 'q': // --ecm-and-emm-only
559
+				ts->process_emm = 1;
560
+				ts->process_ecm = 1;
561
+				ts->output_stream = 0;
562
+				break;
545 563
 
546 564
 			case 'D': // --debug
547 565
 				ts->debug_level = atoi(optarg);

Loading…
Cancel
Save