|
@@ -113,9 +113,9 @@ void run_benchmark(void) {
|
113
|
113
|
puts("* Done *");
|
114
|
114
|
}
|
115
|
115
|
|
116
|
|
-static const char short_options[] = "i:d:N:Sl:L:F:I:RzM:W:O:o:t:rk:g:pwxyc:C:A:s:U:P:B:eZ:Ef:X:H:G:KJ:D:jbhV";
|
|
116
|
+static const char short_options[] = "i:d:N:Sl:L:F:I:RzM:T:W:O:o:t:rk:g:pwxyc:C:A:s:U:P:B:eZ:Ef:X:H:G:KJ:D:jbhV";
|
117
|
117
|
|
118
|
|
-// Unused short options: QTYamnquv0123456789
|
|
118
|
+// Unused short options: QYamnquv0123456789
|
119
|
119
|
static const struct option long_options[] = {
|
120
|
120
|
{ "ident", required_argument, NULL, 'i' },
|
121
|
121
|
{ "daemon", required_argument, NULL, 'd' },
|
|
@@ -129,6 +129,7 @@ static const struct option long_options[] = {
|
129
|
129
|
{ "input-rtp", no_argument, NULL, 'R' },
|
130
|
130
|
{ "input-ignore-disc", no_argument, NULL, 'z' },
|
131
|
131
|
{ "input-service", required_argument, NULL, 'M' },
|
|
132
|
+ { "input-buffer", required_argument, NULL, 'T' },
|
132
|
133
|
{ "input-dump", required_argument, NULL, 'W' },
|
133
|
134
|
|
134
|
135
|
{ "output", required_argument, NULL, 'O' },
|
|
@@ -191,6 +192,7 @@ static void show_help(struct ts *ts) {
|
191
|
192
|
printf(" -R --input-rtp | Enable RTP input\n");
|
192
|
193
|
printf(" -z --input-ignore-disc | Do not report discontinuty errors in input.\n");
|
193
|
194
|
printf(" -M --input-service <srvid> | Choose service id when input is MPTS.\n");
|
|
195
|
+ printf(" -T --input-buffer <ms> | Set input buffer time in ms. Default: %u\n", ts->input_buffer_time);
|
194
|
196
|
printf(" -W --input-dump <filename> | Save input stream in file.\n");
|
195
|
197
|
printf("\n");
|
196
|
198
|
printf("Output options:\n");
|
|
@@ -330,6 +332,9 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
330
|
332
|
case 'M':
|
331
|
333
|
ts->forced_service_id = strtoul(optarg, NULL, 0) & 0xffff;
|
332
|
334
|
break;
|
|
335
|
+ case 'T':
|
|
336
|
+ ts->input_buffer_time = strtoul(optarg, NULL, 0);
|
|
337
|
+ break;
|
333
|
338
|
case 'W':
|
334
|
339
|
ts->input_dump_filename = optarg;
|
335
|
340
|
break;
|
|
@@ -549,6 +554,9 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
|
549
|
554
|
ts_LOGf("Input addr : %s://%s:%u/\n",
|
550
|
555
|
ts->rtp_input ? "rtp" : "udp",
|
551
|
556
|
inet_ntoa(ts->input.addr), ts->input.port);
|
|
557
|
+ if (ts->input_buffer_time) {
|
|
558
|
+ ts_LOGf("Input buff : %u ms\n", ts->input_buffer_time);
|
|
559
|
+ }
|
552
|
560
|
} else if (ts->input.type == FILE_IO) {
|
553
|
561
|
ts_LOGf("Input file : %s\n", ts->input.fd == 0 ? "STDIN" : ts->input.fname);
|
554
|
562
|
}
|