Skip to content

Commit

Permalink
Add --io-latency to roc-send
Browse files Browse the repository at this point in the history
  • Loading branch information
gavv committed Mar 24, 2023
1 parent cafa5a4 commit d65cfbf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tools/roc_send/cmdline.ggo
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ section "Options"

option "reuseaddr" - "enable SO_REUSEADDR when binding sockets" optional

option "io-latency" - "Recording target latency, TIME units"
string optional

option "nbsrc" - "Number of source packets in FEC block"
int optional

Expand Down
7 changes: 7 additions & 0 deletions src/tools/roc_send/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@ int main(int argc, char** argv) {
sender_config.input_sample_spec.channel_mask());
io_config.frame_length = sender_config.internal_frame_length;

if (args.io_latency_given) {
if (!core::parse_duration(args.io_latency_arg, io_config.latency)) {
roc_log(LogError, "invalid --io-latency");
return 1;
}
}

if (args.rate_given) {
if (args.rate_arg <= 0) {
roc_log(LogError, "invalid --rate: should be > 0");
Expand Down

0 comments on commit d65cfbf

Please sign in to comment.