Move code for setting field trials from NetEqTestFactory to the main function in neteq_rtpplay.
It is problematic to set field trials more than once, so to avoid running into problems, this functionality has been placed in the main function of neteq_rtpplay. Bug: webrtc:9667 Change-Id: Ib9b9990f30a1715b50889dbfc4d74787bcbe5dae Reviewed-on: https://webrtc-review.googlesource.com/98541 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Minyue Li <minyue@webrtc.org> Commit-Queue: Ivo Creusen <ivoc@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24673}
This commit is contained in:
@ -344,6 +344,8 @@ if (rtc_include_tests) {
|
||||
deps = [
|
||||
":neteq_simulator_api",
|
||||
"../modules/audio_coding:neteq_test_factory",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:rtc_base_approved",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
]
|
||||
}
|
||||
|
||||
@ -12,6 +12,8 @@
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "modules/audio_coding/neteq/tools/neteq_test_factory.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/flags.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
@ -24,7 +26,11 @@ NetEqSimulatorFactory::~NetEqSimulatorFactory() = default;
|
||||
std::unique_ptr<NetEqSimulator> NetEqSimulatorFactory::CreateSimulator(
|
||||
int argc,
|
||||
char* argv[]) {
|
||||
return factory_->InitializeTest(argc, argv);
|
||||
RTC_CHECK(!rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true))
|
||||
<< "Error while parsing command-line flags";
|
||||
RTC_CHECK_EQ(argc, 3) << "Wrong number of input arguments. Expected 3, got "
|
||||
<< argc;
|
||||
return factory_->InitializeTest(argv[1], argv[2]);
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
|
||||
Reference in New Issue
Block a user