From d2d2ecb4a8c5035a49e120851d222ea8de3d6573 Mon Sep 17 00:00:00 2001 From: Ivo Creusen Date: Mon, 15 Oct 2018 13:27:26 +0200 Subject: [PATCH] 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 Commit-Queue: Ivo Creusen Cr-Commit-Position: refs/heads/master@{#25171} --- modules/audio_coding/neteq/tools/neteq_test_factory.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/audio_coding/neteq/tools/neteq_test_factory.cc b/modules/audio_coding/neteq/tools/neteq_test_factory.cc index 9c447cc6c6..df3a9f0c9c 100644 --- a/modules/audio_coding/neteq/tools/neteq_test_factory.cc +++ b/modules/audio_coding/neteq/tools/neteq_test_factory.cc @@ -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 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(config, codecs, ext_codecs_, std::move(input), std::move(output), callbacks);