Use classes from media_configuration.h instead of the ones in PeerConnectionE2EQualityTestFixture.

Classes defined inside the class PeerConnectionE2EQualityTestFixture are replaced by the ones define in media_configuration.h.

Change-Id: I1c025ff10aacf8cbc3df9bfa742a40622fe0807a
Bug: webrtc:14627
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281860
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38568}
diff --git a/api/BUILD.gn b/api/BUILD.gn
index 9768c6d..de839ad 100644
--- a/api/BUILD.gn
+++ b/api/BUILD.gn
@@ -659,9 +659,9 @@
   deps = [
     ":create_frame_generator",
     ":frame_generator_api",
-    ":peer_connection_quality_test_fixture_api",
     "../rtc_base:checks",
     "../test:fileutils",
+    "test/pclf:media_configuration",
   ]
   absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
 }
diff --git a/api/test/create_peer_connection_quality_test_frame_generator.cc b/api/test/create_peer_connection_quality_test_frame_generator.cc
index 29eb41c..a1c5363 100644
--- a/api/test/create_peer_connection_quality_test_frame_generator.cc
+++ b/api/test/create_peer_connection_quality_test_frame_generator.cc
@@ -14,18 +14,13 @@
 #include <vector>
 
 #include "api/test/create_frame_generator.h"
-#include "api/test/peerconnection_quality_test_fixture.h"
+#include "api/test/pclf/media_configuration.h"
 #include "rtc_base/checks.h"
 #include "test/testsupport/file_utils.h"
 
 namespace webrtc {
 namespace webrtc_pc_e2e {
 
-using VideoConfig =
-    ::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
-using ScreenShareConfig = ::webrtc::webrtc_pc_e2e::
-    PeerConnectionE2EQualityTestFixture::ScreenShareConfig;
-
 void ValidateScreenShareConfig(const VideoConfig& video_config,
                                const ScreenShareConfig& screen_share_config) {
   if (screen_share_config.slides_yuv_file_names.empty()) {
diff --git a/api/test/create_peer_connection_quality_test_frame_generator.h b/api/test/create_peer_connection_quality_test_frame_generator.h
index ab3f65a..62043d1 100644
--- a/api/test/create_peer_connection_quality_test_frame_generator.h
+++ b/api/test/create_peer_connection_quality_test_frame_generator.h
@@ -15,7 +15,7 @@
 
 #include "absl/types/optional.h"
 #include "api/test/frame_generator_interface.h"
-#include "api/test/peerconnection_quality_test_fixture.h"
+#include "api/test/pclf/media_configuration.h"
 
 namespace webrtc {
 namespace webrtc_pc_e2e {
@@ -25,19 +25,18 @@
 // FrameGeneratorInterface::OutputType::I420. video_config specifies frame
 // weight and height.
 std::unique_ptr<test::FrameGeneratorInterface> CreateSquareFrameGenerator(
-    const PeerConnectionE2EQualityTestFixture::VideoConfig& video_config,
+    const VideoConfig& video_config,
     absl::optional<test::FrameGeneratorInterface::OutputType> type);
 
 // Creates a frame generator that plays frames from the yuv file.
 std::unique_ptr<test::FrameGeneratorInterface> CreateFromYuvFileFrameGenerator(
-    const PeerConnectionE2EQualityTestFixture::VideoConfig& video_config,
+    const VideoConfig& video_config,
     std::string filename);
 
 // Creates a proper frame generator for testing screen sharing.
 std::unique_ptr<test::FrameGeneratorInterface> CreateScreenShareFrameGenerator(
-    const PeerConnectionE2EQualityTestFixture::VideoConfig& video_config,
-    const PeerConnectionE2EQualityTestFixture::ScreenShareConfig&
-        screen_share_config);
+    const VideoConfig& video_config,
+    const ScreenShareConfig& screen_share_config);
 
 }  // namespace webrtc_pc_e2e
 }  // namespace webrtc
diff --git a/api/test/pclf/BUILD.gn b/api/test/pclf/BUILD.gn
index 6375e45..2183315 100644
--- a/api/test/pclf/BUILD.gn
+++ b/api/test/pclf/BUILD.gn
@@ -88,6 +88,7 @@
     "peer_configurer.h",
   ]
   deps = [
+    ":media_configuration",
     ":media_quality_test_params",
     "../../../api:callfactory_api",
     "../../../api:create_peer_connection_quality_test_frame_generator",
diff --git a/api/test/pclf/media_configuration.cc b/api/test/pclf/media_configuration.cc
index b1694df..56b9e52 100644
--- a/api/test/pclf/media_configuration.cc
+++ b/api/test/pclf/media_configuration.cc
@@ -44,14 +44,6 @@
 
 }  // namespace
 
-ScrollingParams::ScrollingParams(TimeDelta duration,
-                                 size_t source_width,
-                                 size_t source_height)
-    : duration(duration),
-      source_width(source_width),
-      source_height(source_height) {
-  RTC_CHECK_GT(duration.ms(), 0);
-}
 ScreenShareConfig::ScreenShareConfig(TimeDelta slide_change_interval)
     : slide_change_interval(slide_change_interval) {
   RTC_CHECK_GT(slide_change_interval.ms(), 0);
diff --git a/api/test/pclf/media_configuration.h b/api/test/pclf/media_configuration.h
index c6ce1607..8e841a2 100644
--- a/api/test/pclf/media_configuration.h
+++ b/api/test/pclf/media_configuration.h
@@ -58,6 +58,9 @@
 namespace webrtc {
 namespace webrtc_pc_e2e {
 
+constexpr size_t kDefaultSlidesWidth = 1850;
+constexpr size_t kDefaultSlidesHeight = 1110;
+
 // The index of required capturing device in OS provided list of video
 // devices. On Linux and Windows the list will be obtained via
 // webrtc::VideoCaptureModule::DeviceInfo, on Mac OS via
@@ -83,16 +86,12 @@
 // `duration` must be less or equal to
 // `ScreenShareConfig::slide_change_interval`.
 struct ScrollingParams {
-  ScrollingParams(TimeDelta duration,
-                  size_t source_width,
-                  size_t source_height);
-
   // Duration of scrolling.
   TimeDelta duration;
   // Width of source slides video.
-  size_t source_width;
+  size_t source_width = kDefaultSlidesWidth;
   // Height of source slides video.
-  size_t source_height;
+  size_t source_height = kDefaultSlidesHeight;
 };
 
 // Contains screen share video stream properties.
diff --git a/api/test/pclf/peer_configurer.cc b/api/test/pclf/peer_configurer.cc
index c404908..9123583 100644
--- a/api/test/pclf/peer_configurer.cc
+++ b/api/test/pclf/peer_configurer.cc
@@ -13,6 +13,8 @@
 #include <set>
 
 #include "absl/strings/string_view.h"
+#include "api/test/pclf/media_configuration.h"
+#include "api/test/pclf/media_quality_test_params.h"
 #include "api/test/peer_network_dependencies.h"
 #include "modules/video_coding/svc/create_scalability_structure.h"
 #include "modules/video_coding/svc/scalability_mode_util.h"
@@ -23,10 +25,6 @@
 namespace webrtc_pc_e2e {
 namespace {
 
-using AudioConfig = PeerConnectionE2EQualityTestFixture::AudioConfig;
-using VideoConfig = PeerConnectionE2EQualityTestFixture::VideoConfig;
-using RunParams = PeerConnectionE2EQualityTestFixture::RunParams;
-using VideoCodecConfig = PeerConnectionE2EQualityTestFixture::VideoCodecConfig;
 using PeerConfigurer = PeerConnectionE2EQualityTestFixture::PeerConfigurer;
 
 // List of default names of generic participants according to
@@ -111,34 +109,31 @@
   return this;
 }
 
-PeerConfigurer* PeerConfigurerImpl::AddVideoConfig(
-    PeerConnectionE2EQualityTestFixture::VideoConfig config) {
+PeerConfigurer* PeerConfigurerImpl::AddVideoConfig(VideoConfig config) {
   video_sources_.push_back(
       CreateSquareFrameGenerator(config, /*type=*/absl::nullopt));
   configurable_params_->video_configs.push_back(std::move(config));
   return this;
 }
 PeerConfigurer* PeerConfigurerImpl::AddVideoConfig(
-    PeerConnectionE2EQualityTestFixture::VideoConfig config,
+    VideoConfig config,
     std::unique_ptr<test::FrameGeneratorInterface> generator) {
   configurable_params_->video_configs.push_back(std::move(config));
   video_sources_.push_back(std::move(generator));
   return this;
 }
-PeerConfigurer* PeerConfigurerImpl::AddVideoConfig(
-    PeerConnectionE2EQualityTestFixture::VideoConfig config,
-    PeerConnectionE2EQualityTestFixture::CapturingDeviceIndex index) {
+PeerConfigurer* PeerConfigurerImpl::AddVideoConfig(VideoConfig config,
+                                                   CapturingDeviceIndex index) {
   configurable_params_->video_configs.push_back(std::move(config));
   video_sources_.push_back(index);
   return this;
 }
 PeerConfigurer* PeerConfigurerImpl::SetVideoSubscription(
-    PeerConnectionE2EQualityTestFixture::VideoSubscription subscription) {
+    VideoSubscription subscription) {
   configurable_params_->video_subscription = std::move(subscription);
   return this;
 }
-PeerConfigurer* PeerConfigurerImpl::SetAudioConfig(
-    PeerConnectionE2EQualityTestFixture::AudioConfig config) {
+PeerConfigurer* PeerConfigurerImpl::SetAudioConfig(AudioConfig config) {
   params_->audio_config = std::move(config);
   return this;
 }
@@ -200,8 +195,7 @@
   return this;
 }
 PeerConfigurer* PeerConfigurerImpl::SetVideoCodecs(
-    std::vector<PeerConnectionE2EQualityTestFixture::VideoCodecConfig>
-        video_codecs) {
+    std::vector<VideoCodecConfig> video_codecs) {
   params_->video_codecs = std::move(video_codecs);
   return this;
 }
@@ -301,9 +295,7 @@
   }
 
   if (params->video_codecs.empty()) {
-    params->video_codecs.push_back(
-        PeerConnectionE2EQualityTestFixture::VideoCodecConfig(
-            cricket::kVp8CodecName));
+    params->video_codecs.push_back(VideoCodecConfig(cricket::kVp8CodecName));
   }
 }
 
diff --git a/api/test/pclf/peer_configurer.h b/api/test/pclf/peer_configurer.h
index 1c23b1b..e6fc252 100644
--- a/api/test/pclf/peer_configurer.h
+++ b/api/test/pclf/peer_configurer.h
@@ -24,6 +24,7 @@
 #include "api/rtc_event_log/rtc_event_log_factory_interface.h"
 #include "api/task_queue/task_queue_factory.h"
 #include "api/test/create_peer_connection_quality_test_frame_generator.h"
+#include "api/test/pclf/media_configuration.h"
 #include "api/test/pclf/media_quality_test_params.h"
 #include "api/test/peer_network_dependencies.h"
 #include "api/test/peerconnection_quality_test_fixture.h"
@@ -45,7 +46,7 @@
  public:
   using VideoSource =
       absl::variant<std::unique_ptr<test::FrameGeneratorInterface>,
-                    PeerConnectionE2EQualityTestFixture::CapturingDeviceIndex>;
+                    CapturingDeviceIndex>;
 
   explicit PeerConfigurerImpl(
       const PeerNetworkDependencies& network_dependencies);
@@ -116,25 +117,21 @@
 
   // Add new video stream to the call that will be sent from this peer.
   // Default implementation of video frames generator will be used.
-  PeerConfigurer* AddVideoConfig(
-      PeerConnectionE2EQualityTestFixture::VideoConfig config) override;
+  PeerConfigurer* AddVideoConfig(VideoConfig config) override;
   // Add new video stream to the call that will be sent from this peer with
   // provided own implementation of video frames generator.
   PeerConfigurer* AddVideoConfig(
-      PeerConnectionE2EQualityTestFixture::VideoConfig config,
+      VideoConfig config,
       std::unique_ptr<test::FrameGeneratorInterface> generator) override;
   // Add new video stream to the call that will be sent from this peer.
   // Capturing device with specified index will be used to get input video.
   PeerConfigurer* AddVideoConfig(
-      PeerConnectionE2EQualityTestFixture::VideoConfig config,
-      PeerConnectionE2EQualityTestFixture::CapturingDeviceIndex
-          capturing_device_index) override;
+      VideoConfig config,
+      CapturingDeviceIndex capturing_device_index) override;
   // Sets video subscription for the peer. By default subscription will
   // include all streams with `VideoSubscription::kSameAsSendStream`
   // resolution. To override this behavior use this method.
-  PeerConfigurer* SetVideoSubscription(
-      PeerConnectionE2EQualityTestFixture::VideoSubscription subscription)
-      override;
+  PeerConfigurer* SetVideoSubscription(VideoSubscription subscription) override;
   // Set the list of video codecs used by the peer during the test. These
   // codecs will be negotiated in SDP during offer/answer exchange. The order
   // of these codecs during negotiation will be the same as in `video_codecs`.
@@ -142,12 +139,10 @@
   // be negotiated. If some of specified codecs won't be found, the test will
   // crash.
   PeerConfigurer* SetVideoCodecs(
-      std::vector<PeerConnectionE2EQualityTestFixture::VideoCodecConfig>
-          video_codecs) override;
+      std::vector<VideoCodecConfig> video_codecs) override;
   // Set the audio stream for the call from this peer. If this method won't
   // be invoked, this peer will send no audio.
-  PeerConfigurer* SetAudioConfig(
-      PeerConnectionE2EQualityTestFixture::AudioConfig config) override;
+  PeerConfigurer* SetAudioConfig(AudioConfig config) override;
 
   // Set if ULP FEC should be used or not. False by default.
   PeerConfigurer* SetUseUlpFEC(bool value) override;
diff --git a/api/test/peerconnection_quality_test_fixture.h b/api/test/peerconnection_quality_test_fixture.h
index 167170c..9bf0823 100644
--- a/api/test/peerconnection_quality_test_fixture.h
+++ b/api/test/peerconnection_quality_test_fixture.h
@@ -60,9 +60,6 @@
 namespace webrtc {
 namespace webrtc_pc_e2e {
 
-constexpr size_t kDefaultSlidesWidth = 1850;
-constexpr size_t kDefaultSlidesHeight = 1110;
-
 // API is in development. Can be changed/removed without notice.
 class PeerConnectionE2EQualityTestFixture {
  public:
diff --git a/test/pc/e2e/BUILD.gn b/test/pc/e2e/BUILD.gn
index 2a2ef58..92b8f9a 100644
--- a/test/pc/e2e/BUILD.gn
+++ b/test/pc/e2e/BUILD.gn
@@ -170,8 +170,8 @@
     ]
     deps = [
       ":encoded_image_data_injector_api",
-      "../../../api:peer_connection_quality_test_fixture_api",
       "../../../api:video_quality_analyzer_api",
+      "../../../api/test/pclf:media_configuration",
       "../../../api/video:encoded_image",
       "../../../api/video:video_frame",
       "../../../api/video:video_rtp_headers",
@@ -208,7 +208,7 @@
         "analyzer/video/analyzing_video_sinks_helper.h",
       ]
       deps = [
-        "../../../api:peer_connection_quality_test_fixture_api",
+        "../../../api/test/pclf:media_configuration",
         "../../../api/test/video:video_frame_writer",
         "../../../rtc_base:macromagic",
         "../../../rtc_base/synchronization:mutex",
@@ -231,9 +231,9 @@
         ":video_dumping",
         "../..:fixed_fps_video_frame_writer_adapter",
         "../..:test_renderer",
-        "../../../api:peer_connection_quality_test_fixture_api",
         "../../../api:video_quality_analyzer_api",
         "../../../api/numerics",
+        "../../../api/test/pclf:media_configuration",
         "../../../api/test/video:video_frame_writer",
         "../../../api/units:timestamp",
         "../../../api/video:video_frame",
@@ -268,9 +268,9 @@
         "../..:fixed_fps_video_frame_writer_adapter",
         "../..:test_renderer",
         "../../../api:array_view",
-        "../../../api:peer_connection_quality_test_fixture_api",
         "../../../api:stats_observer_interface",
         "../../../api:video_quality_analyzer_api",
+        "../../../api/test/pclf:media_configuration",
         "../../../api/video:video_frame",
         "../../../api/video:video_rtp_headers",
         "../../../api/video_codecs:video_codecs_api",
@@ -297,7 +297,7 @@
         "echo/echo_emulation.h",
       ]
       deps = [
-        "../../../api:peer_connection_quality_test_fixture_api",
+        "../../../api/test/pclf:media_configuration",
         "../../../modules/audio_device:audio_device_impl",
         "../../../rtc_base:swap_queue",
       ]
@@ -315,10 +315,10 @@
         "../../../api:frame_generator_api",
         "../../../api:function_view",
         "../../../api:libjingle_peerconnection_api",
-        "../../../api:peer_connection_quality_test_fixture_api",
         "../../../api:scoped_refptr",
         "../../../api:sequence_checker",
         "../../../api/task_queue:pending_task_safety_flag",
+        "../../../api/test/pclf:media_configuration",
         "../../../api/test/pclf:media_quality_test_params",
         "../../../api/test/pclf:peer_configurer",
         "../../../modules/audio_processing:api",
@@ -352,6 +352,7 @@
         "../../../api:time_controller",
         "../../../api/rtc_event_log:rtc_event_log_factory",
         "../../../api/task_queue:default_task_queue_factory",
+        "../../../api/test/pclf:media_configuration",
         "../../../api/test/pclf:media_quality_test_params",
         "../../../api/test/pclf:peer_configurer",
         "../../../api/transport:field_trial_based_config",
@@ -388,7 +389,7 @@
         "../../../api:create_frame_generator",
         "../../../api:frame_generator_api",
         "../../../api:media_stream_interface",
-        "../../../api:peer_connection_quality_test_fixture_api",
+        "../../../api/test/pclf:media_configuration",
         "../../../api/test/pclf:peer_configurer",
         "../../../api/video:video_frame",
         "../../../pc:session_description",
@@ -468,6 +469,7 @@
         "../../../api/task_queue",
         "../../../api/test/metrics:metric",
         "../../../api/test/metrics:metrics_logger",
+        "../../../api/test/pclf:media_configuration",
         "../../../api/test/pclf:media_quality_test_params",
         "../../../api/test/pclf:peer_configurer",
         "../../../api/units:time_delta",
@@ -519,7 +521,7 @@
       deps = [
         ":analyzing_video_sinks_helper",
         "../..:test_support",
-        "../../../api:peer_connection_quality_test_fixture_api",
+        "../../../api/test/pclf:media_configuration",
       ]
       absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
     }
@@ -535,8 +537,8 @@
         "../..:video_test_support",
         "../../../api:create_frame_generator",
         "../../../api:frame_generator_api",
-        "../../../api:peer_connection_quality_test_fixture_api",
         "../../../api:scoped_refptr",
+        "../../../api/test/pclf:media_configuration",
         "../../../api/units:time_delta",
         "../../../api/units:timestamp",
         "../../../api/video:video_frame",
@@ -586,6 +588,8 @@
         "../../../api/audio_codecs:builtin_audio_decoder_factory",
         "../../../api/audio_codecs:builtin_audio_encoder_factory",
         "../../../api/test/metrics:global_metrics_logger_and_exporter",
+        "../../../api/test/pclf:media_configuration",
+        "../../../api/test/pclf:media_quality_test_params",
         "../../../api/video_codecs:builtin_video_decoder_factory",
         "../../../api/video_codecs:builtin_video_encoder_factory",
         "../../../call:simulated_network",
@@ -626,6 +630,8 @@
         "../../../api:peer_connection_quality_test_fixture_api",
         "../../../api/test/metrics:metrics_logger",
         "../../../api/test/metrics:stdout_metrics_exporter",
+        "../../../api/test/pclf:media_configuration",
+        "../../../api/test/pclf:media_quality_test_params",
         "../../../api/units:time_delta",
       ]
     }
@@ -642,6 +648,8 @@
         "../../../api:network_emulation_manager_api",
         "../../../api:peer_connection_quality_test_fixture_api",
         "../../../api/test/metrics:global_metrics_logger_and_exporter",
+        "../../../api/test/pclf:media_configuration",
+        "../../../api/test/pclf:media_quality_test_params",
         "../../../api/units:time_delta",
         "../../../rtc_base:timeutils",
       ]
@@ -1082,8 +1090,8 @@
     deps = [
       "../../../api:array_view",
       "../../../api:libjingle_peerconnection_api",
-      "../../../api:peer_connection_quality_test_fixture_api",
       "../../../api:rtp_parameters",
+      "../../../api/test/pclf:media_configuration",
       "../../../media:rtc_media_base",
       "../../../p2p:rtc_p2p",
       "../../../pc:sdp_utils",
diff --git a/test/pc/e2e/analyzer/video/analyzing_video_sink.cc b/test/pc/e2e/analyzer/video/analyzing_video_sink.cc
index acf273c..fb221e6 100644
--- a/test/pc/e2e/analyzer/video/analyzing_video_sink.cc
+++ b/test/pc/e2e/analyzer/video/analyzing_video_sink.cc
@@ -16,7 +16,7 @@
 #include "absl/memory/memory.h"
 #include "absl/strings/string_view.h"
 #include "absl/types/optional.h"
-#include "api/test/peerconnection_quality_test_fixture.h"
+#include "api/test/pclf/media_configuration.h"
 #include "api/test/video/video_frame_writer.h"
 #include "api/units/timestamp.h"
 #include "api/video/i420_buffer.h"
@@ -32,13 +32,6 @@
 namespace webrtc {
 namespace webrtc_pc_e2e {
 
-using VideoSubscription = ::webrtc::webrtc_pc_e2e::
-    PeerConnectionE2EQualityTestFixture::VideoSubscription;
-using VideoResolution = ::webrtc::webrtc_pc_e2e::
-    PeerConnectionE2EQualityTestFixture::VideoResolution;
-using VideoConfig =
-    ::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
-
 AnalyzingVideoSink::AnalyzingVideoSink(absl::string_view peer_name,
                                        Clock* clock,
                                        VideoQualityAnalyzerInterface& analyzer,
diff --git a/test/pc/e2e/analyzer/video/analyzing_video_sink.h b/test/pc/e2e/analyzer/video/analyzing_video_sink.h
index af75e0c..1834bbe 100644
--- a/test/pc/e2e/analyzer/video/analyzing_video_sink.h
+++ b/test/pc/e2e/analyzer/video/analyzing_video_sink.h
@@ -18,7 +18,7 @@
 
 #include "absl/strings/string_view.h"
 #include "api/numerics/samples_stats_counter.h"
-#include "api/test/peerconnection_quality_test_fixture.h"
+#include "api/test/pclf/media_configuration.h"
 #include "api/test/video/video_frame_writer.h"
 #include "api/test/video_quality_analyzer_interface.h"
 #include "api/video/video_frame.h"
@@ -44,19 +44,15 @@
     SamplesStatsCounter analyzing_sink_processing_time_ms;
   };
 
-  AnalyzingVideoSink(
-      absl::string_view peer_name,
-      Clock* clock,
-      VideoQualityAnalyzerInterface& analyzer,
-      AnalyzingVideoSinksHelper& sinks_helper,
-      const PeerConnectionE2EQualityTestFixture::VideoSubscription&
-          subscription,
-      bool report_infra_stats);
+  AnalyzingVideoSink(absl::string_view peer_name,
+                     Clock* clock,
+                     VideoQualityAnalyzerInterface& analyzer,
+                     AnalyzingVideoSinksHelper& sinks_helper,
+                     const VideoSubscription& subscription,
+                     bool report_infra_stats);
 
   // Updates subscription used by this peer to render received video.
-  void UpdateSubscription(
-      const PeerConnectionE2EQualityTestFixture::VideoSubscription&
-          subscription);
+  void UpdateSubscription(const VideoSubscription& subscription);
 
   void OnFrame(const VideoFrame& frame) override;
 
@@ -64,16 +60,15 @@
 
  private:
   struct SinksDescriptor {
-    SinksDescriptor(
-        absl::string_view sender_peer_name,
-        const PeerConnectionE2EQualityTestFixture::VideoResolution& resolution)
+    SinksDescriptor(absl::string_view sender_peer_name,
+                    const VideoResolution& resolution)
         : sender_peer_name(sender_peer_name), resolution(resolution) {}
 
     // Required to be able to resolve resolutions on new subscription and
     // understand if we need to recreate `video_frame_writer` and `sinks`.
     std::string sender_peer_name;
     // Resolution which was used to create `video_frame_writer` and `sinks`.
-    PeerConnectionE2EQualityTestFixture::VideoResolution resolution;
+    VideoResolution resolution;
 
     // Is set if dumping of output video was requested;
     test::VideoFrameWriter* video_frame_writer = nullptr;
@@ -82,10 +77,9 @@
 
   // Scales video frame to `required_resolution` if necessary. Crashes if video
   // frame and `required_resolution` have different aspect ratio.
-  VideoFrame ScaleVideoFrame(
-      const VideoFrame& frame,
-      const PeerConnectionE2EQualityTestFixture::VideoResolution&
-          required_resolution) RTC_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
+  VideoFrame ScaleVideoFrame(const VideoFrame& frame,
+                             const VideoResolution& required_resolution)
+      RTC_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
   // Creates full copy of the frame to free any frame owned internal buffers
   // and passes created copy to analyzer. Uses `I420Buffer` to represent
   // frame content.
@@ -101,8 +95,7 @@
   AnalyzingVideoSinksHelper* const sinks_helper_;
 
   mutable Mutex mutex_;
-  PeerConnectionE2EQualityTestFixture::VideoSubscription subscription_
-      RTC_GUARDED_BY(mutex_);
+  VideoSubscription subscription_ RTC_GUARDED_BY(mutex_);
   std::map<std::string, SinksDescriptor> stream_sinks_ RTC_GUARDED_BY(mutex_);
   Stats stats_ RTC_GUARDED_BY(mutex_);
 };
diff --git a/test/pc/e2e/analyzer/video/analyzing_video_sink_test.cc b/test/pc/e2e/analyzer/video/analyzing_video_sink_test.cc
index 4607edd..fe88bc0 100644
--- a/test/pc/e2e/analyzer/video/analyzing_video_sink_test.cc
+++ b/test/pc/e2e/analyzer/video/analyzing_video_sink_test.cc
@@ -19,7 +19,7 @@
 #include "api/scoped_refptr.h"
 #include "api/test/create_frame_generator.h"
 #include "api/test/frame_generator_interface.h"
-#include "api/test/peerconnection_quality_test_fixture.h"
+#include "api/test/pclf/media_configuration.h"
 #include "api/units/time_delta.h"
 #include "api/units/timestamp.h"
 #include "api/video/i420_buffer.h"
@@ -43,15 +43,6 @@
 using ::testing::Ge;
 using ::testing::Test;
 
-using VideoConfig =
-    ::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
-using VideoSubscription = ::webrtc::webrtc_pc_e2e::
-    PeerConnectionE2EQualityTestFixture::VideoSubscription;
-using VideoResolution = ::webrtc::webrtc_pc_e2e::
-    PeerConnectionE2EQualityTestFixture::VideoResolution;
-using VideoDumpOptions = ::webrtc::webrtc_pc_e2e::
-    PeerConnectionE2EQualityTestFixture::VideoDumpOptions;
-
 // Remove files and directories in a directory non-recursively.
 void CleanDir(absl::string_view dir, size_t expected_output_files_count) {
   absl::optional<std::vector<std::string>> dir_content =
diff --git a/test/pc/e2e/analyzer/video/analyzing_video_sinks_helper.cc b/test/pc/e2e/analyzer/video/analyzing_video_sinks_helper.cc
index 64c37e5..70dc4b0 100644
--- a/test/pc/e2e/analyzer/video/analyzing_video_sinks_helper.cc
+++ b/test/pc/e2e/analyzer/video/analyzing_video_sinks_helper.cc
@@ -15,16 +15,13 @@
 #include <utility>
 
 #include "absl/strings/string_view.h"
-#include "api/test/peerconnection_quality_test_fixture.h"
+#include "api/test/pclf/media_configuration.h"
 #include "api/test/video/video_frame_writer.h"
 #include "rtc_base/synchronization/mutex.h"
 
 namespace webrtc {
 namespace webrtc_pc_e2e {
 
-using VideoConfig =
-    ::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
-
 void AnalyzingVideoSinksHelper::AddConfig(absl::string_view sender_peer_name,
                                           VideoConfig config) {
   MutexLock lock(&mutex_);
diff --git a/test/pc/e2e/analyzer/video/analyzing_video_sinks_helper.h b/test/pc/e2e/analyzer/video/analyzing_video_sinks_helper.h
index 38e8ccc..5f38c5a 100644
--- a/test/pc/e2e/analyzer/video/analyzing_video_sinks_helper.h
+++ b/test/pc/e2e/analyzer/video/analyzing_video_sinks_helper.h
@@ -20,7 +20,7 @@
 
 #include "absl/strings/string_view.h"
 #include "absl/types/optional.h"
-#include "api/test/peerconnection_quality_test_fixture.h"
+#include "api/test/pclf/media_configuration.h"
 #include "api/test/video/video_frame_writer.h"
 #include "rtc_base/synchronization/mutex.h"
 #include "rtc_base/thread_annotations.h"
@@ -34,11 +34,9 @@
  public:
   // Adds config in the registry. If config with such stream label was
   // registered before, the new value will override the old one.
-  void AddConfig(absl::string_view sender_peer_name,
-                 PeerConnectionE2EQualityTestFixture::VideoConfig config);
-  absl::optional<
-      std::pair<std::string, PeerConnectionE2EQualityTestFixture::VideoConfig>>
-  GetPeerAndConfig(absl::string_view stream_label);
+  void AddConfig(absl::string_view sender_peer_name, VideoConfig config);
+  absl::optional<std::pair<std::string, VideoConfig>> GetPeerAndConfig(
+      absl::string_view stream_label);
   // Removes video config for specified stream label. If there are no know video
   // config for such stream label - does nothing.
   void RemoveConfig(absl::string_view stream_label);
@@ -63,10 +61,8 @@
 
  private:
   Mutex mutex_;
-  std::map<
-      std::string,
-      std::pair<std::string, PeerConnectionE2EQualityTestFixture::VideoConfig>>
-      video_configs_ RTC_GUARDED_BY(mutex_);
+  std::map<std::string, std::pair<std::string, VideoConfig>> video_configs_
+      RTC_GUARDED_BY(mutex_);
   std::list<std::unique_ptr<test::VideoFrameWriter>> video_writers_
       RTC_GUARDED_BY(mutex_);
 };
diff --git a/test/pc/e2e/analyzer/video/analyzing_video_sinks_helper_test.cc b/test/pc/e2e/analyzer/video/analyzing_video_sinks_helper_test.cc
index 67f8f75..1a820a5 100644
--- a/test/pc/e2e/analyzer/video/analyzing_video_sinks_helper_test.cc
+++ b/test/pc/e2e/analyzer/video/analyzing_video_sinks_helper_test.cc
@@ -14,7 +14,7 @@
 #include <utility>
 
 #include "absl/types/optional.h"
-#include "api/test/peerconnection_quality_test_fixture.h"
+#include "api/test/pclf/media_configuration.h"
 #include "test/gmock.h"
 #include "test/gtest.h"
 
@@ -24,9 +24,6 @@
 
 using ::testing::Eq;
 
-using VideoConfig =
-    ::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
-
 // Asserts equality of the main fields of the video config. We don't compare
 // the full config due to the lack of equality definition for a lot of subtypes.
 void AssertConfigsAreEquals(const VideoConfig& actual,
diff --git a/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.h b/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.h
index 4e76591..476136c 100644
--- a/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.h
+++ b/test/pc/e2e/analyzer/video/quality_analyzing_video_encoder.h
@@ -17,7 +17,7 @@
 #include <vector>
 
 #include "absl/strings/string_view.h"
-#include "api/test/peerconnection_quality_test_fixture.h"
+#include "api/test/pclf/media_configuration.h"
 #include "api/test/video_quality_analyzer_interface.h"
 #include "api/video/video_frame.h"
 #include "api/video_codecs/sdp_video_format.h"
@@ -50,9 +50,8 @@
 class QualityAnalyzingVideoEncoder : public VideoEncoder,
                                      public EncodedImageCallback {
  public:
-  using EmulatedSFUConfigMap = std::map<
-      std::string,
-      absl::optional<PeerConnectionE2EQualityTestFixture::EmulatedSFUConfig>>;
+  using EmulatedSFUConfigMap =
+      std::map<std::string, absl::optional<EmulatedSFUConfig>>;
 
   QualityAnalyzingVideoEncoder(absl::string_view peer_name,
                                std::unique_ptr<VideoEncoder> delegate,
diff --git a/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.cc b/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.cc
index 7ce7932..4bdc601 100644
--- a/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.cc
+++ b/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.cc
@@ -19,6 +19,7 @@
 #include "absl/memory/memory.h"
 #include "absl/strings/string_view.h"
 #include "api/array_view.h"
+#include "api/test/pclf/media_configuration.h"
 #include "api/video/i420_buffer.h"
 #include "rtc_base/checks.h"
 #include "rtc_base/logging.h"
@@ -38,8 +39,6 @@
 
 using EmulatedSFUConfigMap =
     ::webrtc::webrtc_pc_e2e::QualityAnalyzingVideoEncoder::EmulatedSFUConfigMap;
-using VideoSubscription = ::webrtc::webrtc_pc_e2e::
-    PeerConnectionE2EQualityTestFixture::VideoSubscription;
 
 class AnalyzingFramePreprocessor
     : public test::TestVideoCapturer::FramePreprocessor {
@@ -150,7 +149,7 @@
 std::unique_ptr<AnalyzingVideoSink>
 VideoQualityAnalyzerInjectionHelper::CreateVideoSink(
     absl::string_view peer_name,
-    const PeerConnectionE2EQualityTestFixture::VideoSubscription& subscription,
+    const VideoSubscription& subscription,
     bool report_infra_metrics) {
   return std::make_unique<AnalyzingVideoSink>(peer_name, clock_, *analyzer_,
                                               sinks_helper_, subscription,
diff --git a/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.h b/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.h
index db49e05c..6407890 100644
--- a/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.h
+++ b/test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.h
@@ -20,7 +20,7 @@
 
 #include "absl/strings/string_view.h"
 #include "api/array_view.h"
-#include "api/test/peerconnection_quality_test_fixture.h"
+#include "api/test/pclf/media_configuration.h"
 #include "api/test/stats_observer_interface.h"
 #include "api/test/video_quality_analyzer_interface.h"
 #include "api/video/video_frame.h"
@@ -43,7 +43,7 @@
 // VideoQualityAnalyzerInterface into PeerConnection pipeline.
 class VideoQualityAnalyzerInjectionHelper : public StatsObserverInterface {
  public:
-  using VideoConfig = PeerConnectionE2EQualityTestFixture::VideoConfig;
+  using VideoConfig = ::webrtc::webrtc_pc_e2e::VideoConfig;
 
   VideoQualityAnalyzerInjectionHelper(
       Clock* clock,
@@ -83,8 +83,7 @@
   // TODO(titovartem): Remove default value for `report_infra_metrics`.
   std::unique_ptr<AnalyzingVideoSink> CreateVideoSink(
       absl::string_view peer_name,
-      const PeerConnectionE2EQualityTestFixture::VideoSubscription&
-          subscription,
+      const VideoSubscription& subscription,
       bool report_infra_metrics = false);
 
   void Start(std::string test_case_name,
diff --git a/test/pc/e2e/echo/echo_emulation.cc b/test/pc/e2e/echo/echo_emulation.cc
index f2b4be9..8fdabeb 100644
--- a/test/pc/e2e/echo/echo_emulation.cc
+++ b/test/pc/e2e/echo/echo_emulation.cc
@@ -12,6 +12,8 @@
 #include <limits>
 #include <utility>
 
+#include "api/test/pclf/media_configuration.h"
+
 namespace webrtc {
 namespace webrtc_pc_e2e {
 namespace {
@@ -22,7 +24,7 @@
 
 EchoEmulatingCapturer::EchoEmulatingCapturer(
     std::unique_ptr<TestAudioDeviceModule::Capturer> capturer,
-    PeerConnectionE2EQualityTestFixture::EchoEmulationConfig config)
+    EchoEmulationConfig config)
     : delegate_(std::move(capturer)),
       config_(config),
       renderer_queue_(2 * config_.echo_delay.ms() / kSingleBufferDurationMs),
diff --git a/test/pc/e2e/echo/echo_emulation.h b/test/pc/e2e/echo/echo_emulation.h
index d1d41f6..359a481 100644
--- a/test/pc/e2e/echo/echo_emulation.h
+++ b/test/pc/e2e/echo/echo_emulation.h
@@ -16,7 +16,7 @@
 #include <memory>
 #include <vector>
 
-#include "api/test/peerconnection_quality_test_fixture.h"
+#include "api/test/pclf/media_configuration.h"
 #include "modules/audio_device/include/test_audio_device.h"
 #include "rtc_base/swap_queue.h"
 
@@ -29,7 +29,7 @@
  public:
   EchoEmulatingCapturer(
       std::unique_ptr<TestAudioDeviceModule::Capturer> capturer,
-      PeerConnectionE2EQualityTestFixture::EchoEmulationConfig config);
+      EchoEmulationConfig config);
 
   void OnAudioRendered(rtc::ArrayView<const int16_t> data);
 
@@ -41,7 +41,7 @@
 
  private:
   std::unique_ptr<TestAudioDeviceModule::Capturer> delegate_;
-  const PeerConnectionE2EQualityTestFixture::EchoEmulationConfig config_;
+  const EchoEmulationConfig config_;
 
   SwapQueue<std::vector<int16_t>> renderer_queue_;
 
diff --git a/test/pc/e2e/media/media_helper.cc b/test/pc/e2e/media/media_helper.cc
index 4885a28..b4b317a 100644
--- a/test/pc/e2e/media/media_helper.cc
+++ b/test/pc/e2e/media/media_helper.cc
@@ -15,22 +15,13 @@
 #include "absl/types/variant.h"
 #include "api/media_stream_interface.h"
 #include "api/test/create_frame_generator.h"
+#include "api/test/pclf/media_configuration.h"
 #include "test/frame_generator_capturer.h"
 #include "test/platform_video_capturer.h"
 #include "test/testsupport/file_utils.h"
 
 namespace webrtc {
 namespace webrtc_pc_e2e {
-namespace {
-
-using VideoConfig =
-    ::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
-using AudioConfig =
-    ::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::AudioConfig;
-using CapturingDeviceIndex = ::webrtc::webrtc_pc_e2e::
-    PeerConnectionE2EQualityTestFixture::CapturingDeviceIndex;
-
-}  // namespace
 
 void MediaHelper::MaybeAddAudio(TestPeer* peer) {
   if (!peer->params().audio_config) {
diff --git a/test/pc/e2e/media/media_helper.h b/test/pc/e2e/media/media_helper.h
index 42ee7f1..9f0f1f7 100644
--- a/test/pc/e2e/media/media_helper.h
+++ b/test/pc/e2e/media/media_helper.h
@@ -15,8 +15,8 @@
 #include <vector>
 
 #include "api/test/frame_generator_interface.h"
+#include "api/test/pclf/media_configuration.h"
 #include "api/test/pclf/peer_configurer.h"
-#include "api/test/peerconnection_quality_test_fixture.h"
 #include "test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.h"
 #include "test/pc/e2e/media/test_video_capturer_video_track_source.h"
 #include "test/pc/e2e/test_peer.h"
@@ -42,7 +42,7 @@
 
  private:
   std::unique_ptr<test::TestVideoCapturer> CreateVideoCapturer(
-      const PeerConnectionE2EQualityTestFixture::VideoConfig& video_config,
+      const VideoConfig& video_config,
       PeerConfigurerImpl::VideoSource source,
       std::unique_ptr<test::TestVideoCapturer::FramePreprocessor>
           frame_preprocessor);
diff --git a/test/pc/e2e/peer_connection_e2e_smoke_test.cc b/test/pc/e2e/peer_connection_e2e_smoke_test.cc
index cb96546..52c525f 100644
--- a/test/pc/e2e/peer_connection_e2e_smoke_test.cc
+++ b/test/pc/e2e/peer_connection_e2e_smoke_test.cc
@@ -18,6 +18,8 @@
 #include "api/test/create_peerconnection_quality_test_fixture.h"
 #include "api/test/metrics/global_metrics_logger_and_exporter.h"
 #include "api/test/network_emulation_manager.h"
+#include "api/test/pclf/media_configuration.h"
+#include "api/test/pclf/media_quality_test_params.h"
 #include "api/test/peerconnection_quality_test_fixture.h"
 #include "call/simulated_network.h"
 #include "system_wrappers/include/field_trial.h"
@@ -39,21 +41,7 @@
 
 class PeerConnectionE2EQualityTestSmokeTest : public ::testing::Test {
  public:
-  using EmulatedSFUConfig =
-      PeerConnectionE2EQualityTestFixture::EmulatedSFUConfig;
   using PeerConfigurer = PeerConnectionE2EQualityTestFixture::PeerConfigurer;
-  using RunParams = PeerConnectionE2EQualityTestFixture::RunParams;
-  using VideoConfig = PeerConnectionE2EQualityTestFixture::VideoConfig;
-  using VideoCodecConfig =
-      PeerConnectionE2EQualityTestFixture::VideoCodecConfig;
-  using AudioConfig = PeerConnectionE2EQualityTestFixture::AudioConfig;
-  using ScreenShareConfig =
-      PeerConnectionE2EQualityTestFixture::ScreenShareConfig;
-  using ScrollingParams = PeerConnectionE2EQualityTestFixture::ScrollingParams;
-  using VideoSimulcastConfig =
-      PeerConnectionE2EQualityTestFixture::VideoSimulcastConfig;
-  using EchoEmulationConfig =
-      PeerConnectionE2EQualityTestFixture::EchoEmulationConfig;
 
   void SetUp() override {
     network_emulation_ = CreateNetworkEmulationManager();
@@ -400,8 +388,8 @@
     screenshare.content_hint = VideoTrackInterface::ContentHint::kText;
     ScreenShareConfig screen_share_config =
         ScreenShareConfig(TimeDelta::Seconds(2));
-    screen_share_config.scrolling_params = ScrollingParams(
-        TimeDelta::Millis(1800), kDefaultSlidesWidth, kDefaultSlidesHeight);
+    screen_share_config.scrolling_params =
+        ScrollingParams{.duration = TimeDelta::Millis(1800)};
     auto screen_share_frame_generator =
         CreateScreenShareFrameGenerator(screenshare, screen_share_config);
     alice->AddVideoConfig(std::move(screenshare),
diff --git a/test/pc/e2e/peer_connection_quality_test.cc b/test/pc/e2e/peer_connection_quality_test.cc
index e0b0ce9..aa959f9 100644
--- a/test/pc/e2e/peer_connection_quality_test.cc
+++ b/test/pc/e2e/peer_connection_quality_test.cc
@@ -22,6 +22,7 @@
 #include "api/rtc_event_log_output_file.h"
 #include "api/scoped_refptr.h"
 #include "api/test/metrics/metric.h"
+#include "api/test/pclf/media_configuration.h"
 #include "api/test/time_controller.h"
 #include "api/test/video_quality_analyzer_interface.h"
 #include "pc/sdp_utils.h"
@@ -49,8 +50,6 @@
 
 using ::webrtc::test::ImprovementDirection;
 using ::webrtc::test::Unit;
-using VideoConfig =
-    ::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
 
 constexpr TimeDelta kDefaultTimeout = TimeDelta::Seconds(10);
 constexpr char kSignalThreadName[] = "signaling_thread";
diff --git a/test/pc/e2e/peer_connection_quality_test.h b/test/pc/e2e/peer_connection_quality_test.h
index 22c3bbe..1cf0319 100644
--- a/test/pc/e2e/peer_connection_quality_test.h
+++ b/test/pc/e2e/peer_connection_quality_test.h
@@ -19,6 +19,7 @@
 #include "api/task_queue/task_queue_factory.h"
 #include "api/test/audio_quality_analyzer_interface.h"
 #include "api/test/metrics/metrics_logger.h"
+#include "api/test/pclf/media_configuration.h"
 #include "api/test/pclf/media_quality_test_params.h"
 #include "api/test/pclf/peer_configurer.h"
 #include "api/test/peerconnection_quality_test_fixture.h"
@@ -44,10 +45,6 @@
 class PeerConnectionE2EQualityTest
     : public PeerConnectionE2EQualityTestFixture {
  public:
-  using RunParams = PeerConnectionE2EQualityTestFixture::RunParams;
-  using VideoConfig = PeerConnectionE2EQualityTestFixture::VideoConfig;
-  using VideoSimulcastConfig =
-      PeerConnectionE2EQualityTestFixture::VideoSimulcastConfig;
   using PeerConfigurer = PeerConnectionE2EQualityTestFixture::PeerConfigurer;
   using QualityMetricsReporter =
       PeerConnectionE2EQualityTestFixture::QualityMetricsReporter;
diff --git a/test/pc/e2e/peer_connection_quality_test_metric_names_test.cc b/test/pc/e2e/peer_connection_quality_test_metric_names_test.cc
index a8775e2..195cbc8 100644
--- a/test/pc/e2e/peer_connection_quality_test_metric_names_test.cc
+++ b/test/pc/e2e/peer_connection_quality_test_metric_names_test.cc
@@ -17,6 +17,8 @@
 #include "api/test/metrics/metrics_logger.h"
 #include "api/test/metrics/stdout_metrics_exporter.h"
 #include "api/test/network_emulation_manager.h"
+#include "api/test/pclf/media_configuration.h"
+#include "api/test/pclf/media_quality_test_params.h"
 #include "api/test/peerconnection_quality_test_fixture.h"
 #include "api/units/time_delta.h"
 #include "test/gmock.h"
@@ -37,16 +39,8 @@
 using ::webrtc::test::MetricsExporter;
 using ::webrtc::test::StdoutMetricsExporter;
 using ::webrtc::test::Unit;
-using RunParams =
-    ::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::RunParams;
-using VideoConfig =
-    ::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
-using AudioConfig =
-    ::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::AudioConfig;
 using PeerConfigurer = ::webrtc::webrtc_pc_e2e::
     PeerConnectionE2EQualityTestFixture::PeerConfigurer;
-using VideoCodecConfig = ::webrtc::webrtc_pc_e2e::
-    PeerConnectionE2EQualityTestFixture::VideoCodecConfig;
 
 // Adds a peer with some audio and video (the client should not care about
 // details about audio and video configs).
diff --git a/test/pc/e2e/peer_connection_quality_test_test.cc b/test/pc/e2e/peer_connection_quality_test_test.cc
index 704fafd..2511bd2 100644
--- a/test/pc/e2e/peer_connection_quality_test_test.cc
+++ b/test/pc/e2e/peer_connection_quality_test_test.cc
@@ -18,6 +18,8 @@
 #include "api/test/create_network_emulation_manager.h"
 #include "api/test/metrics/global_metrics_logger_and_exporter.h"
 #include "api/test/network_emulation_manager.h"
+#include "api/test/pclf/media_configuration.h"
+#include "api/test/pclf/media_quality_test_params.h"
 #include "api/test/peerconnection_quality_test_fixture.h"
 #include "api/units/time_delta.h"
 #include "rtc_base/time_utils.h"
@@ -33,14 +35,8 @@
 using ::testing::Eq;
 using ::testing::Test;
 
-using RunParams =
-    ::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::RunParams;
-using VideoConfig =
-    ::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
 using PeerConfigurer = ::webrtc::webrtc_pc_e2e::
     PeerConnectionE2EQualityTestFixture::PeerConfigurer;
-using VideoDumpOptions = ::webrtc::webrtc_pc_e2e::
-    PeerConnectionE2EQualityTestFixture::VideoDumpOptions;
 
 // Remove files and directories in a directory non-recursively.
 void CleanDir(absl::string_view dir, size_t expected_output_files_count) {
diff --git a/test/pc/e2e/sdp/sdp_changer.cc b/test/pc/e2e/sdp/sdp_changer.cc
index b3ee3b7..af55f29 100644
--- a/test/pc/e2e/sdp/sdp_changer.cc
+++ b/test/pc/e2e/sdp/sdp_changer.cc
@@ -14,6 +14,7 @@
 
 #include "absl/memory/memory.h"
 #include "api/jsep_session_description.h"
+#include "api/test/pclf/media_configuration.h"
 #include "media/base/media_constants.h"
 #include "p2p/base/p2p_constants.h"
 #include "pc/sdp_utils.h"
@@ -23,8 +24,6 @@
 namespace webrtc_pc_e2e {
 namespace {
 
-using VideoCodecConfig = PeerConnectionE2EQualityTestFixture::VideoCodecConfig;
-
 std::string CodecRequiredParamsToString(
     const std::map<std::string, std::string>& codec_required_params) {
   rtc::StringBuilder out;
@@ -167,7 +166,7 @@
 
 LocalAndRemoteSdp SignalingInterceptor::PatchOffer(
     std::unique_ptr<SessionDescriptionInterface> offer,
-    const PeerConnectionE2EQualityTestFixture::VideoCodecConfig& first_codec) {
+    const VideoCodecConfig& first_codec) {
   for (auto& content : offer->description()->contents()) {
     context_.mids_order.push_back(content.mid());
     cricket::MediaContentDescription* media_desc = content.media_description();
@@ -364,7 +363,7 @@
 
 LocalAndRemoteSdp SignalingInterceptor::PatchAnswer(
     std::unique_ptr<SessionDescriptionInterface> answer,
-    const PeerConnectionE2EQualityTestFixture::VideoCodecConfig& first_codec) {
+    const VideoCodecConfig& first_codec) {
   for (auto& content : answer->description()->contents()) {
     cricket::MediaContentDescription* media_desc = content.media_description();
     if (media_desc->type() != cricket::MediaType::MEDIA_TYPE_VIDEO) {
diff --git a/test/pc/e2e/sdp/sdp_changer.h b/test/pc/e2e/sdp/sdp_changer.h
index 115ed5b..6f68d03 100644
--- a/test/pc/e2e/sdp/sdp_changer.h
+++ b/test/pc/e2e/sdp/sdp_changer.h
@@ -20,7 +20,7 @@
 #include "api/array_view.h"
 #include "api/jsep.h"
 #include "api/rtp_parameters.h"
-#include "api/test/peerconnection_quality_test_fixture.h"
+#include "api/test/pclf/media_configuration.h"
 #include "media/base/rid_description.h"
 #include "pc/session_description.h"
 #include "pc/simulcast_description.h"
@@ -40,8 +40,7 @@
 // vector and they will be added in the same order, as they were in
 // `supported_codecs`.
 std::vector<RtpCodecCapability> FilterVideoCodecCapabilities(
-    rtc::ArrayView<const PeerConnectionE2EQualityTestFixture::VideoCodecConfig>
-        video_codecs,
+    rtc::ArrayView<const VideoCodecConfig> video_codecs,
     bool use_rtx,
     bool use_ulpfec,
     bool use_flexfec,
@@ -77,10 +76,10 @@
 
   LocalAndRemoteSdp PatchOffer(
       std::unique_ptr<SessionDescriptionInterface> offer,
-      const PeerConnectionE2EQualityTestFixture::VideoCodecConfig& first_codec);
+      const VideoCodecConfig& first_codec);
   LocalAndRemoteSdp PatchAnswer(
       std::unique_ptr<SessionDescriptionInterface> answer,
-      const PeerConnectionE2EQualityTestFixture::VideoCodecConfig& first_codec);
+      const VideoCodecConfig& first_codec);
 
   std::vector<std::unique_ptr<IceCandidateInterface>> PatchOffererIceCandidates(
       rtc::ArrayView<const IceCandidateInterface* const> candidates);
diff --git a/test/pc/e2e/test_peer.cc b/test/pc/e2e/test_peer.cc
index d978f10..3e01c03 100644
--- a/test/pc/e2e/test_peer.cc
+++ b/test/pc/e2e/test_peer.cc
@@ -15,17 +15,13 @@
 #include "absl/memory/memory.h"
 #include "absl/strings/string_view.h"
 #include "api/scoped_refptr.h"
+#include "api/test/pclf/media_configuration.h"
 #include "modules/audio_processing/include/audio_processing.h"
 
 namespace webrtc {
 namespace webrtc_pc_e2e {
 namespace {
 
-using VideoSubscription = ::webrtc::webrtc_pc_e2e::
-    PeerConnectionE2EQualityTestFixture::VideoSubscription;
-using VideoConfig =
-    ::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
-
 class SetRemoteDescriptionCallback
     : public webrtc::SetRemoteDescriptionObserverInterface {
  public:
diff --git a/test/pc/e2e/test_peer.h b/test/pc/e2e/test_peer.h
index 57bfba1..dc4a699 100644
--- a/test/pc/e2e/test_peer.h
+++ b/test/pc/e2e/test_peer.h
@@ -22,9 +22,9 @@
 #include "api/set_remote_description_observer_interface.h"
 #include "api/task_queue/pending_task_safety_flag.h"
 #include "api/test/frame_generator_interface.h"
+#include "api/test/pclf/media_configuration.h"
 #include "api/test/pclf/media_quality_test_params.h"
 #include "api/test/pclf/peer_configurer.h"
-#include "api/test/peerconnection_quality_test_fixture.h"
 #include "pc/peer_connection_wrapper.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/synchronization/mutex.h"
@@ -41,12 +41,11 @@
   const Params& params() const { return params_; }
 
   ConfigurableParams configurable_params() const;
-  void AddVideoConfig(PeerConnectionE2EQualityTestFixture::VideoConfig config);
+  void AddVideoConfig(VideoConfig config);
   // Removes video config with specified name. Crashes if the config with
   // specified name isn't found.
   void RemoveVideoConfig(absl::string_view stream_label);
-  void SetVideoSubscription(
-      PeerConnectionE2EQualityTestFixture::VideoSubscription subscription);
+  void SetVideoSubscription(VideoSubscription subscription);
 
   void GetStats(RTCStatsCollectorCallback* callback) override;
 
diff --git a/test/pc/e2e/test_peer_factory.cc b/test/pc/e2e/test_peer_factory.cc
index 72455f1..389fa3f 100644
--- a/test/pc/e2e/test_peer_factory.cc
+++ b/test/pc/e2e/test_peer_factory.cc
@@ -15,6 +15,7 @@
 #include "absl/strings/string_view.h"
 #include "api/task_queue/default_task_queue_factory.h"
 #include "api/test/create_time_controller.h"
+#include "api/test/pclf/media_configuration.h"
 #include "api/test/pclf/peer_configurer.h"
 #include "api/test/time_controller.h"
 #include "api/transport/field_trial_based_config.h"
@@ -33,12 +34,6 @@
 namespace webrtc_pc_e2e {
 namespace {
 
-using AudioConfig =
-    ::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::AudioConfig;
-using VideoConfig =
-    ::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
-using EchoEmulationConfig = ::webrtc::webrtc_pc_e2e::
-    PeerConnectionE2EQualityTestFixture::EchoEmulationConfig;
 using EmulatedSFUConfigMap =
     ::webrtc::webrtc_pc_e2e::QualityAnalyzingVideoEncoder::EmulatedSFUConfigMap;
 
@@ -298,8 +293,7 @@
     std::unique_ptr<PeerConfigurerImpl> configurer,
     std::unique_ptr<MockPeerConnectionObserver> observer,
     absl::optional<RemotePeerAudioConfig> remote_audio_config,
-    absl::optional<PeerConnectionE2EQualityTestFixture::EchoEmulationConfig>
-        echo_emulation_config) {
+    absl::optional<EchoEmulationConfig> echo_emulation_config) {
   std::unique_ptr<InjectableComponents> components =
       configurer->ReleaseComponents();
   std::unique_ptr<Params> params = configurer->ReleaseParams();
diff --git a/test/pc/e2e/test_peer_factory.h b/test/pc/e2e/test_peer_factory.h
index e1abd0d..1b9530b 100644
--- a/test/pc/e2e/test_peer_factory.h
+++ b/test/pc/e2e/test_peer_factory.h
@@ -18,6 +18,7 @@
 
 #include "absl/strings/string_view.h"
 #include "api/rtc_event_log/rtc_event_log_factory.h"
+#include "api/test/pclf/media_configuration.h"
 #include "api/test/pclf/media_quality_test_params.h"
 #include "api/test/pclf/peer_configurer.h"
 #include "api/test/peerconnection_quality_test_fixture.h"
@@ -31,13 +32,12 @@
 namespace webrtc_pc_e2e {
 
 struct RemotePeerAudioConfig {
-  explicit RemotePeerAudioConfig(
-      PeerConnectionE2EQualityTestFixture::AudioConfig config)
+  explicit RemotePeerAudioConfig(AudioConfig config)
       : sampling_frequency_in_hz(config.sampling_frequency_in_hz),
         output_file_name(config.output_dump_file_name) {}
 
   static absl::optional<RemotePeerAudioConfig> Create(
-      absl::optional<PeerConnectionE2EQualityTestFixture::AudioConfig> config);
+      absl::optional<AudioConfig> config);
 
   int sampling_frequency_in_hz;
   absl::optional<std::string> output_file_name;
@@ -70,8 +70,7 @@
       std::unique_ptr<PeerConfigurerImpl> configurer,
       std::unique_ptr<MockPeerConnectionObserver> observer,
       absl::optional<RemotePeerAudioConfig> remote_audio_config,
-      absl::optional<PeerConnectionE2EQualityTestFixture::EchoEmulationConfig>
-          echo_emulation_config);
+      absl::optional<EchoEmulationConfig> echo_emulation_config);
 
  private:
   rtc::Thread* signaling_thread_;