Add command-line flag for setting the max number of packets in the buffer.

There is currently no way to set this for simulations in neteq_rtpplay.

Bug: webrtc:9667
Change-Id: I34f34565538bd3c378cdb9d355f5173c3517d59a
Reviewed-on: https://webrtc-review.googlesource.com/c/105982
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25171}
This commit is contained in:
Ivo Creusen
2018-10-15 13:27:26 +02:00
committed by Commit Bot
parent c84cd950b7
commit d2d2ecb4a8

View File

@ -132,6 +132,9 @@ DEFINE_bool(pythonplot,
false,
"Generates a python script for plotting the delay profile");
DEFINE_bool(concealment_events, false, "Prints concealment events");
DEFINE_int(max_nr_packets_in_buffer,
50,
"Maximum allowed number of packets in the buffer");
// Maps a codec type to a printable name string.
std::string CodecName(NetEqDecoder codec) {
@ -459,6 +462,7 @@ std::unique_ptr<NetEqTest> NetEqTestFactory::InitializeTest(
callbacks.simulation_ended_callback = stats_plotter_.get();
NetEq::Config config;
config.sample_rate_hz = *sample_rate_hz;
config.max_packets_in_buffer = FLAG_max_nr_packets_in_buffer;
return absl::make_unique<NetEqTest>(config, codecs, ext_codecs_,
std::move(input), std::move(output),
callbacks);