|
@@ -63,7 +63,10 @@ static void show_help(struct ts *ts) {
|
63
|
63
|
printf(" -s server_addr | default: disabled (format 1.2.3.4:2233)\n");
|
64
|
64
|
printf(" -U server_user | default: %s\n", ts->camd35.user);
|
65
|
65
|
printf(" -P server_pass | default: %s\n", ts->camd35.pass);
|
66
|
|
- printf(" -y usec_delay | Sleep X usec between sending ECM/EMM packets to OSCAM. default: %d\n", ts->packet_delay);
|
|
66
|
+ printf(" -y usec_delay | Sleep X usec between sending ECM/EMM packets to OSCAM. Default: %d\n", ts->packet_delay);
|
|
67
|
+ printf("\n");
|
|
68
|
+ printf(" EMM options:\n");
|
|
69
|
+ printf(" -E | Process only EMMs without decoding input stream. Default: %s\n", ts->emm_only ? "true" : "false");
|
67
|
70
|
printf("\n");
|
68
|
71
|
printf(" Filtering options:\n");
|
69
|
72
|
printf(" -e | EMM send (default: %s).\n", ts->emm_send ? "enabled" : "disabled");
|
|
@@ -107,7 +110,7 @@ static int parse_io_param(struct io *io, char *opt, int open_flags, mode_t open_
|
107
|
110
|
|
108
|
111
|
static void parse_options(struct ts *ts, int argc, char **argv) {
|
109
|
112
|
int j, i, ca_err = 0, server_err = 1, input_addr_err = 0, output_addr_err = 0, output_intf_err = 0, ident_err = 0;
|
110
|
|
- while ((j = getopt(argc, argv, "i:d:l:L:c:s:I:O:o:t:U:P:y:ezpD:hR")) != -1) {
|
|
113
|
+ while ((j = getopt(argc, argv, "i:d:l:L:c:s:I:O:o:t:U:P:y:eEzpD:hR")) != -1) {
|
111
|
114
|
char *p = NULL;
|
112
|
115
|
switch (j) {
|
113
|
116
|
case 'i':
|
|
@@ -191,6 +194,10 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
191
|
194
|
case 'e':
|
192
|
195
|
ts->emm_send = !ts->emm_send;
|
193
|
196
|
break;
|
|
197
|
+ case 'E':
|
|
198
|
+ ts->emm_only = 1;
|
|
199
|
+ ts->emm_send = 1;
|
|
200
|
+ break;
|
194
|
201
|
case 'p':
|
195
|
202
|
ts->pid_filter = !ts->pid_filter;
|
196
|
203
|
break;
|
|
@@ -242,23 +249,30 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
242
|
249
|
} else if (ts->input.type == FILE_IO) {
|
243
|
250
|
ts_LOGf("Input file : %s\n", ts->input.fd == 0 ? "STDIN" : ts->input.fname);
|
244
|
251
|
}
|
245
|
|
- if (ts->output.type == NET_IO) {
|
246
|
|
- ts_LOGf("Output addr: udp://%s:%u/\n", inet_ntoa(ts->output.addr), ts->output.port);
|
247
|
|
- ts_LOGf("Output intf: %s\n", inet_ntoa(ts->output.intf));
|
248
|
|
- ts_LOGf("Output ttl : %d\n", ts->output.ttl);
|
249
|
|
- } else if (ts->output.type == FILE_IO) {
|
250
|
|
- ts_LOGf("Output file: %s\n", ts->output.fd == 1 ? "STDOUT" : ts->output.fname);
|
|
252
|
+ if (!ts->emm_only)
|
|
253
|
+ {
|
|
254
|
+ if (ts->output.type == NET_IO) {
|
|
255
|
+ ts_LOGf("Output addr: udp://%s:%u/\n", inet_ntoa(ts->output.addr), ts->output.port);
|
|
256
|
+ ts_LOGf("Output intf: %s\n", inet_ntoa(ts->output.intf));
|
|
257
|
+ ts_LOGf("Output ttl : %d\n", ts->output.ttl);
|
|
258
|
+ } else if (ts->output.type == FILE_IO) {
|
|
259
|
+ ts_LOGf("Output file: %s\n", ts->output.fd == 1 ? "STDOUT" : ts->output.fname);
|
|
260
|
+ }
|
251
|
261
|
}
|
252
|
262
|
ts_LOGf("Server addr: tcp://%s:%u/\n", inet_ntoa(ts->camd35.server_addr), ts->camd35.server_port);
|
253
|
263
|
ts_LOGf("Server user: %s\n", ts->camd35.user);
|
254
|
264
|
ts_LOGf("Server pass: %s\n", ts->camd35.pass);
|
255
|
265
|
if (ts->packet_delay)
|
256
|
266
|
ts_LOGf("Pkt sleep : %d us (%d ms)\n", ts->packet_delay, ts->packet_delay / 1000);
|
257
|
|
- ts_LOGf("EMM send : %s\n", ts->emm_send ? "enabled" : "disabled");
|
258
|
|
- ts_LOGf("PID filter : %s\n", ts->pid_filter ? "enabled" : "disabled");
|
259
|
267
|
ts_LOGf("TS discont : %s\n", ts->ts_discont ? "report" : "ignore");
|
260
|
268
|
ts->threaded = !(ts->input.type == FILE_IO && ts->input.fd != 0);
|
261
|
|
- ts_LOGf("Decoding : %s\n", ts->threaded ? "threaded" : "single thread");
|
|
269
|
+ if (ts->emm_only) {
|
|
270
|
+ ts_LOGf("EMM only : %s\n", ts->emm_only ? "yes" : "no");
|
|
271
|
+ } else {
|
|
272
|
+ ts_LOGf("EMM send : %s\n", ts->emm_send ? "enabled" : "disabled");
|
|
273
|
+ ts_LOGf("PID filter : %s\n", ts->pid_filter ? "enabled" : "disabled");
|
|
274
|
+ ts_LOGf("Decoding : %s\n", ts->threaded ? "threaded" : "single thread");
|
|
275
|
+ }
|
262
|
276
|
|
263
|
277
|
for (i=0; i<(int)sizeof(ts->ident); i++) {
|
264
|
278
|
if (!ts->ident[i])
|