Allow union initiliazation for webrtc::webrtc_pc_e2e::AudioConfig.
Change-Id: If7f4ac960528099111dd4e195f5934084bde564a Bug: b/379255467 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368340 Commit-Queue: Jeremy Leconte <jleconte@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43406}
This commit is contained in:
parent
b2fc13d094
commit
dd8d2ab890
@ -220,9 +220,6 @@ VideoConfig::VideoConfig(absl::string_view stream_label,
|
||||
int32_t fps)
|
||||
: width(width), height(height), fps(fps), stream_label(stream_label) {}
|
||||
|
||||
AudioConfig::AudioConfig(absl::string_view stream_label)
|
||||
: stream_label(stream_label) {}
|
||||
|
||||
VideoCodecConfig::VideoCodecConfig(absl::string_view name)
|
||||
: name(name), required_params() {}
|
||||
|
||||
|
||||
@ -348,9 +348,6 @@ struct VideoConfig {
|
||||
|
||||
// Contains properties for audio in the call.
|
||||
struct AudioConfig {
|
||||
AudioConfig() = default;
|
||||
explicit AudioConfig(absl::string_view stream_label);
|
||||
|
||||
// Have to be unique among all specified configs for all peers in the call.
|
||||
// Will be auto generated if omitted.
|
||||
std::optional<std::string> stream_label;
|
||||
|
||||
@ -404,10 +404,11 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Svc) {
|
||||
simulcast.emulated_sfu_config = EmulatedSFUConfig(1);
|
||||
alice->AddVideoConfig(std::move(simulcast));
|
||||
|
||||
AudioConfig audio("alice-audio");
|
||||
audio.input_file_name =
|
||||
test::ResourcePath("pc_quality_smoke_test_alice_source", "wav");
|
||||
alice->SetAudioConfig(std::move(audio));
|
||||
alice->SetAudioConfig({
|
||||
.stream_label = "alice-audio",
|
||||
.input_file_name =
|
||||
test::ResourcePath("pc_quality_smoke_test_alice_source", "wav"),
|
||||
});
|
||||
alice->SetVideoCodecs({VideoCodecConfig(cricket::kVp9CodecName)});
|
||||
});
|
||||
AddPeer(network_links.second, [](PeerConfigurer* bob) {
|
||||
|
||||
@ -52,8 +52,8 @@ void AddDefaultAudioVideoPeer(
|
||||
absl::string_view video_stream_label,
|
||||
const PeerNetworkDependencies& network_dependencies,
|
||||
PeerConnectionE2EQualityTestFixture& fixture) {
|
||||
AudioConfig audio{std::string(audio_stream_label)};
|
||||
audio.sync_group = std::string(peer_name);
|
||||
AudioConfig audio{.stream_label = std::string(audio_stream_label),
|
||||
.sync_group = std::string(peer_name)};
|
||||
VideoConfig video(std::string(video_stream_label), 320, 180, 15);
|
||||
video.sync_group = std::string(peer_name);
|
||||
auto peer = std::make_unique<PeerConfigurer>(network_dependencies);
|
||||
|
||||
@ -53,8 +53,8 @@ void AddDefaultAudioVideoPeer(
|
||||
absl::string_view video_stream_label,
|
||||
const PeerNetworkDependencies& network_dependencies,
|
||||
PeerConnectionE2EQualityTestFixture& fixture) {
|
||||
AudioConfig audio{std::string(audio_stream_label)};
|
||||
audio.sync_group = std::string(peer_name);
|
||||
AudioConfig audio{.stream_label = std::string(audio_stream_label),
|
||||
.sync_group = std::string(peer_name)};
|
||||
VideoConfig video(std::string(video_stream_label), 320, 180, 15);
|
||||
video.sync_group = std::string(peer_name);
|
||||
auto peer = std::make_unique<PeerConfigurer>(network_dependencies);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user