|
@@ -61,6 +61,7 @@ static void show_help(struct ts *ts) {
|
61
|
61
|
printf(" -s server_addr | default: disabled (format 1.2.3.4:2233)\n");
|
62
|
62
|
printf(" -U server_user | default: %s\n", ts->camd35.user);
|
63
|
63
|
printf(" -P server_pass | default: %s\n", ts->camd35.pass);
|
|
64
|
+ printf(" -y usec_delay | Sleep X usec between sending ECM/EMM packets to OSCAM. default: %d\n", ts->packet_delay);
|
64
|
65
|
printf("\n");
|
65
|
66
|
printf(" Filtering options:\n");
|
66
|
67
|
printf(" -e | EMM send (default: %s).\n", ts->emm_send ? "enabled" : "disabled");
|
|
@@ -104,7 +105,7 @@ static int parse_io_param(struct io *io, char *opt, int open_flags, mode_t open_
|
104
|
105
|
|
105
|
106
|
static void parse_options(struct ts *ts, int argc, char **argv) {
|
106
|
107
|
int j, i, ca_err = 0, server_err = 1, input_addr_err = 0, output_addr_err = 0, output_intf_err = 0, ident_err = 0;
|
107
|
|
- while ((j = getopt(argc, argv, "i:d:l:L:c:s:I:O:o:t:U:P:ezpD:h")) != -1) {
|
|
108
|
+ while ((j = getopt(argc, argv, "i:d:l:L:c:s:I:O:o:t:U:P:y:ezpD:h")) != -1) {
|
108
|
109
|
char *p = NULL;
|
109
|
110
|
switch (j) {
|
110
|
111
|
case 'i':
|
|
@@ -173,6 +174,11 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
173
|
174
|
strncpy(ts->camd35.pass, optarg, sizeof(ts->camd35.pass) - 1);
|
174
|
175
|
ts->camd35.pass[sizeof(ts->camd35.pass) - 1] = 0;
|
175
|
176
|
break;
|
|
177
|
+ case 'y':
|
|
178
|
+ ts->packet_delay = atoi(optarg);
|
|
179
|
+ if (ts->packet_delay < 0 || ts->packet_delay > 1000000)
|
|
180
|
+ ts->packet_delay = 0;
|
|
181
|
+ break;
|
176
|
182
|
|
177
|
183
|
case 'z':
|
178
|
184
|
ts->ts_discont = !ts->ts_discont;
|
|
@@ -239,6 +245,8 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
239
|
245
|
ts_LOGf("Server addr: tcp://%s:%u/\n", inet_ntoa(ts->camd35.server_addr), ts->camd35.server_port);
|
240
|
246
|
ts_LOGf("Server user: %s\n", ts->camd35.user);
|
241
|
247
|
ts_LOGf("Server pass: %s\n", ts->camd35.pass);
|
|
248
|
+ if (ts->packet_delay)
|
|
249
|
+ ts_LOGf("Pkt sleep : %d us (%d ms)\n", ts->packet_delay, ts->packet_delay / 1000);
|
242
|
250
|
ts_LOGf("EMM send : %s\n", ts->emm_send ? "enabled" : "disabled");
|
243
|
251
|
ts_LOGf("PID filter : %s\n", ts->pid_filter ? "enabled" : "disabled");
|
244
|
252
|
ts_LOGf("TS discont : %s\n", ts->ts_discont ? "report" : "ignore");
|