Add ctor with stream label for audio and video configs in PCLF

Bug: None
Change-Id: I8354c53232ee6c4479316a928f657abecbf95b48
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227640
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34644}
This commit is contained in:
Artem Titov
2021-08-04 15:33:23 +02:00
committed by WebRTC LUCI CQ
parent bfcfe034f4
commit b3d29104da
2 changed files with 15 additions and 4 deletions

View File

@ -179,6 +179,14 @@ class PeerConnectionE2EQualityTestFixture {
struct VideoConfig {
VideoConfig(size_t width, size_t height, int32_t fps)
: width(width), height(height), fps(fps) {}
VideoConfig(std::string stream_label,
size_t width,
size_t height,
int32_t fps)
: width(width),
height(height),
fps(fps),
stream_label(std::move(stream_label)) {}
// Video stream width.
const size_t width;
@ -247,6 +255,11 @@ class PeerConnectionE2EQualityTestFixture {
kGenerated,
kFile,
};
AudioConfig() = default;
explicit AudioConfig(std::string stream_label)
: stream_label(std::move(stream_label)) {}
// Have to be unique among all specified configs for all peers in the call.
// Will be auto generated if omitted.
absl::optional<std::string> stream_label;

View File

@ -341,15 +341,13 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Svc) {
std::pair<EmulatedNetworkManagerInterface*, EmulatedNetworkManagerInterface*>
network_links = CreateNetwork();
AddPeer(network_links.first, [](PeerConfigurer* alice) {
VideoConfig simulcast(1280, 720, 15);
simulcast.stream_label = "alice-svc";
VideoConfig simulcast("alice-svc", 1280, 720, 15);
// Because we have network with packets loss we can analyze only the
// highest spatial layer in SVC mode.
simulcast.simulcast_config = VideoSimulcastConfig(2, 1);
alice->AddVideoConfig(std::move(simulcast));
AudioConfig audio;
audio.stream_label = "alice-audio";
AudioConfig audio("alice-audio");
audio.mode = AudioConfig::Mode::kFile;
audio.input_file_name =
test::ResourcePath("pc_quality_smoke_test_alice_source", "wav");