Migrate PC level tests on new video codec configuration API

Bug: webrtc:10138
Change-Id: I7129857724aafbfae71f36554ef79be78c442cb6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167066
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30362}
diff --git a/video/pc_full_stack_tests.cc b/video/pc_full_stack_tests.cc
index 751eebe..d9915de 100644
--- a/video/pc_full_stack_tests.cc
+++ b/video/pc_full_stack_tests.cc
@@ -41,6 +41,8 @@
     webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::ScreenShareConfig;
 using VideoSimulcastConfig =
     webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoSimulcastConfig;
+using VideoCodecConfig =
+    webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoCodecConfig;
 
 namespace {
 
@@ -137,9 +139,9 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp9CodecName;
-  run_params.video_codec_required_params = {
-      {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile0)}};
+  run_params.video_codecs = {VideoCodecConfig(
+      /*name=*/cricket::kVp9CodecName, /*required_params=*/{
+          {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile0)}})};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -162,9 +164,9 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp9CodecName;
-  run_params.video_codec_required_params = {
-      {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile0)}};
+  run_params.video_codecs = {VideoCodecConfig(
+      /*name=*/cricket::kVp9CodecName, /*required_params=*/{
+          {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile0)}})};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -195,9 +197,9 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp9CodecName;
-  run_params.video_codec_required_params = {
-      {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}};
+  run_params.video_codecs = {VideoCodecConfig(
+      /*name=*/cricket::kVp9CodecName, /*required_params=*/{
+          {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile2)}})};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -250,7 +252,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -271,7 +273,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -298,7 +300,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -330,7 +332,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -353,7 +355,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -377,7 +379,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = true;
   fixture->Run(std::move(run_params));
@@ -401,7 +403,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = true;
   fixture->Run(std::move(run_params));
@@ -426,7 +428,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   run_params.video_encoder_bitrate_multiplier = 1.30;
@@ -456,7 +458,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   run_params.video_encoder_bitrate_multiplier = 1.30;
@@ -480,7 +482,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -503,7 +505,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = true;
   fixture->Run(std::move(run_params));
@@ -526,7 +528,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = true;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -550,7 +552,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = true;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -574,7 +576,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = true;
   fixture->Run(std::move(run_params));
@@ -596,7 +598,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kH264CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kH264CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -623,7 +625,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kH264CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kH264CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -646,7 +648,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kH264CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kH264CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -672,7 +674,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kH264CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kH264CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -695,7 +697,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kH264CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kH264CodecName)};
   run_params.use_flex_fec = true;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -720,7 +722,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kH264CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kH264CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = true;
   fixture->Run(std::move(run_params));
@@ -745,7 +747,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -769,7 +771,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -793,7 +795,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -817,7 +819,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -862,7 +864,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -888,7 +890,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -917,7 +919,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -1069,9 +1071,9 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp9CodecName;
-  run_params.video_codec_required_params = {
-      {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile0)}};
+  run_params.video_codecs = {VideoCodecConfig(
+      /*name=*/cricket::kVp9CodecName, /*required_params=*/{
+          {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile0)}})};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -1093,7 +1095,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -1114,7 +1116,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   run_params.use_conference_mode = true;
@@ -1140,7 +1142,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -1163,7 +1165,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   run_params.use_conference_mode = true;
@@ -1401,9 +1403,9 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp9CodecName;
-  run_params.video_codec_required_params = {
-      {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile0)}};
+  run_params.video_codecs = {VideoCodecConfig(
+      /*name=*/cricket::kVp9CodecName, /*required_params=*/{
+          {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile0)}})};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -1431,9 +1433,9 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp9CodecName;
-  run_params.video_codec_required_params = {
-      {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile0)}};
+  run_params.video_codecs = {VideoCodecConfig(
+      /*name=*/cricket::kVp9CodecName, /*required_params=*/{
+          {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile0)}})};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -1460,9 +1462,9 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp9CodecName;
-  run_params.video_codec_required_params = {
-      {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile0)}};
+  run_params.video_codecs = {VideoCodecConfig(
+      /*name=*/cricket::kVp9CodecName, /*required_params=*/{
+          {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile0)}})};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -1489,9 +1491,9 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp9CodecName;
-  run_params.video_codec_required_params = {
-      {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile0)}};
+  run_params.video_codecs = {VideoCodecConfig(
+      /*name=*/cricket::kVp9CodecName, /*required_params=*/{
+          {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile0)}})};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -1518,9 +1520,9 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp9CodecName;
-  run_params.video_codec_required_params = {
-      {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile0)}};
+  run_params.video_codecs = {VideoCodecConfig(
+      /*name=*/cricket::kVp9CodecName, /*required_params=*/{
+          {kVP9FmtpProfileId, VP9ProfileToString(VP9Profile::kProfile0)}})};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -1647,7 +1649,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -1672,7 +1674,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -1697,7 +1699,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));
@@ -1722,7 +1724,7 @@
       },
       [](PeerConfigurer* bob) {});
   RunParams run_params(TimeDelta::seconds(kTestDurationSec));
-  run_params.video_codec_name = cricket::kVp8CodecName;
+  run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
   run_params.use_flex_fec = false;
   run_params.use_ulp_fec = false;
   fixture->Run(std::move(run_params));