Add construtor from required fields for VideoConfig in PC E2E framework

Bug: webrtc:10138
Change-Id: I84d09cb75e76fcd1ce871f2a9d0c11a309add593
Reviewed-on: https://webrtc-review.googlesource.com/c/124984
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26902}
This commit is contained in:
Artem Titov
2019-02-28 13:19:12 +01:00
committed by Commit Bot
parent 3481db2090
commit c58c01d6d4
2 changed files with 8 additions and 11 deletions

View File

@ -112,9 +112,12 @@ class PeerConnectionE2EQualityTestFixture {
// Contains properties of single video stream. // Contains properties of single video stream.
struct VideoConfig { struct VideoConfig {
size_t width; VideoConfig(size_t width, size_t height, int32_t fps)
size_t height; : width(width), height(height), fps(fps) {}
int32_t fps;
const size_t width;
const size_t height;
const int32_t fps;
// Have to be unique among all specified configs for all peers in the call. // Have to be unique among all specified configs for all peers in the call.
// Will be auto generated if omitted. // Will be auto generated if omitted.
absl::optional<std::string> stream_label; absl::optional<std::string> stream_label;

View File

@ -61,10 +61,7 @@ TEST(PeerConnectionE2EQualityTestSmokeTest, RunWithEmulatedNetwork) {
PeerConnectionE2EQualityTestFixture::InjectableComponents; PeerConnectionE2EQualityTestFixture::InjectableComponents;
auto alice_params = absl::make_unique<Params>(); auto alice_params = absl::make_unique<Params>();
VideoConfig alice_video_config; VideoConfig alice_video_config(1280, 720, 30);
alice_video_config.width = 1280;
alice_video_config.height = 720;
alice_video_config.fps = 30;
alice_video_config.stream_label = "alice-video"; alice_video_config.stream_label = "alice-video";
alice_video_config.generator = VideoGeneratorType::kDefault; alice_video_config.generator = VideoGeneratorType::kDefault;
@ -74,10 +71,7 @@ TEST(PeerConnectionE2EQualityTestSmokeTest, RunWithEmulatedNetwork) {
alice_params->audio_config->audio_options = cricket::AudioOptions(); alice_params->audio_config->audio_options = cricket::AudioOptions();
auto bob_params = absl::make_unique<Params>(); auto bob_params = absl::make_unique<Params>();
VideoConfig bob_video_config; VideoConfig bob_video_config(1280, 720, 30);
bob_video_config.width = 1280;
bob_video_config.height = 720;
bob_video_config.fps = 30;
bob_video_config.stream_label = "bob-video"; bob_video_config.stream_label = "bob-video";
bob_video_config.generator = VideoGeneratorType::kDefault; bob_video_config.generator = VideoGeneratorType::kDefault;