Remove function that takes command-line arguments directly

This function is obsolete now that config-based functions are available.
The command-line parsing should not happen here but in the executable
that uses these functions.

Bug: webrtc:11005
Change-Id: I618d12503123e3e1fd6e572a045372c622043a75
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167860
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30421}
diff --git a/api/test/neteq_simulator_factory.cc b/api/test/neteq_simulator_factory.cc
index b4917f4..fe056be 100644
--- a/api/test/neteq_simulator_factory.cc
+++ b/api/test/neteq_simulator_factory.cc
@@ -19,16 +19,6 @@
 #include "modules/audio_coding/neteq/tools/neteq_test_factory.h"
 #include "rtc_base/checks.h"
 
-ABSL_FLAG(std::string,
-          replacement_audio_file,
-          "",
-          "A PCM file that will be used to populate dummy"
-          " RTP packets");
-ABSL_FLAG(int,
-          max_nr_packets_in_buffer,
-          50,
-          "Maximum allowed number of packets in the buffer");
-
 namespace webrtc {
 namespace test {
 
@@ -37,23 +27,6 @@
 
 NetEqSimulatorFactory::~NetEqSimulatorFactory() = default;
 
-std::unique_ptr<NetEqSimulator> NetEqSimulatorFactory::CreateSimulator(
-    int argc,
-    char* argv[]) {
-  std::vector<char*> args = absl::ParseCommandLine(argc, argv);
-  RTC_CHECK_EQ(args.size(), 3)
-      << "Wrong number of input arguments. Expected 3, got " << args.size();
-  // TODO(ivoc) Stop (ab)using command-line flags in this function.
-  const std::string output_audio_filename(args[2]);
-  NetEqTestFactory::Config config;
-  config.replacement_audio_file = absl::GetFlag(FLAGS_replacement_audio_file);
-  config.max_nr_packets_in_buffer =
-      absl::GetFlag(FLAGS_max_nr_packets_in_buffer);
-  config.output_audio_filename = output_audio_filename;
-  return factory_->InitializeTestFromFile(/*input_file_name=*/args[1],
-                                          /*factory=*/nullptr, config);
-}
-
 std::unique_ptr<NetEqSimulator> NetEqSimulatorFactory::CreateSimulatorFromFile(
     absl::string_view event_log_filename,
     absl::string_view replacement_audio_filename,
diff --git a/api/test/neteq_simulator_factory.h b/api/test/neteq_simulator_factory.h
index af747f6..925b4f4 100644
--- a/api/test/neteq_simulator_factory.h
+++ b/api/test/neteq_simulator_factory.h
@@ -44,8 +44,6 @@
     // A custom NetEqFactory can be used.
     NetEqFactory* neteq_factory = nullptr;
   };
-  // This function takes the same arguments as the neteq_rtpplay utility.
-  std::unique_ptr<NetEqSimulator> CreateSimulator(int argc, char* argv[]);
   std::unique_ptr<NetEqSimulator> CreateSimulatorFromFile(
       absl::string_view event_log_filename,
       absl::string_view replacement_audio_filename,