diff --git a/test/pc/e2e/peer_configurer.cc b/test/pc/e2e/peer_configurer.cc index 688aa0efde..adc3e4f299 100644 --- a/test/pc/e2e/peer_configurer.cc +++ b/test/pc/e2e/peer_configurer.cc @@ -61,13 +61,13 @@ std::string DefaultNamesProvider::GenerateNameInternal() { } PeerParamsPreprocessor::PeerParamsPreprocessor() - : peer_names_provider("peer_", kDefaultNames) {} + : peer_names_provider_("peer_", kDefaultNames) {} void PeerParamsPreprocessor::SetDefaultValuesForMissingParams( PeerConfigurerImpl& peer) { Params* params = peer.params(); ConfigurableParams* configurable_params = peer.configurable_params(); - peer_names_provider.MaybeSetName(params->name); + peer_names_provider_.MaybeSetName(params->name); DefaultNamesProvider video_stream_names_provider(*params->name + "_auto_video_stream_label_"); for (size_t i = 0; i < configurable_params->video_configs.size(); ++i) { @@ -99,22 +99,17 @@ void PeerParamsPreprocessor::ValidateParams(const PeerConfigurerImpl& peer) { { RTC_CHECK(p.name); - bool inserted = peer_names.insert(p.name.value()).second; + bool inserted = peer_names_.insert(p.name.value()).second; RTC_CHECK(inserted) << "Duplicate name=" << p.name.value(); } - if (p.audio_config) { - media_streams_count++; - } - media_streams_count += peer.configurable_params().video_configs.size(); - // Validate that all video stream labels are unique and sync groups are // valid. for (const VideoConfig& video_config : peer.configurable_params().video_configs) { RTC_CHECK(video_config.stream_label); bool inserted = - video_labels.insert(video_config.stream_label.value()).second; + video_labels_.insert(video_config.stream_label.value()).second; RTC_CHECK(inserted) << "Duplicate video_config.stream_label=" << video_config.stream_label.value(); @@ -131,7 +126,7 @@ void PeerParamsPreprocessor::ValidateParams(const PeerConfigurerImpl& peer) { // more than two streams is supported. if (video_config.sync_group.has_value()) { bool sync_group_inserted = - video_sync_groups.insert(video_config.sync_group.value()).second; + video_sync_groups_.insert(video_config.sync_group.value()).second; RTC_CHECK(sync_group_inserted) << "Sync group shouldn't consist of more than two streams (one " "video and one audio). Duplicate video_config.sync_group=" @@ -159,14 +154,14 @@ void PeerParamsPreprocessor::ValidateParams(const PeerConfigurerImpl& peer) { } if (p.audio_config) { bool inserted = - audio_labels.insert(p.audio_config->stream_label.value()).second; + audio_labels_.insert(p.audio_config->stream_label.value()).second; RTC_CHECK(inserted) << "Duplicate audio_config.stream_label=" << p.audio_config->stream_label.value(); // TODO(bugs.webrtc.org/4762): remove this check after synchronization of // more than two streams is supported. if (p.audio_config->sync_group.has_value()) { bool sync_group_inserted = - audio_sync_groups.insert(p.audio_config->sync_group.value()).second; + audio_sync_groups_.insert(p.audio_config->sync_group.value()).second; RTC_CHECK(sync_group_inserted) << "Sync group shouldn't consist of more than two streams (one " "video and one audio). Duplicate audio_config.sync_group=" diff --git a/test/pc/e2e/peer_configurer.h b/test/pc/e2e/peer_configurer.h index 0c13380a5b..8c316120c1 100644 --- a/test/pc/e2e/peer_configurer.h +++ b/test/pc/e2e/peer_configurer.h @@ -325,14 +325,13 @@ class PeerParamsPreprocessor { void ValidateParams(const PeerConfigurerImpl& peer); private: - DefaultNamesProvider peer_names_provider; + DefaultNamesProvider peer_names_provider_; - std::set peer_names; - std::set video_labels; - std::set audio_labels; - std::set video_sync_groups; - std::set audio_sync_groups; - int media_streams_count = 0; + std::set peer_names_; + std::set video_labels_; + std::set audio_labels_; + std::set video_sync_groups_; + std::set audio_sync_groups_; }; } // namespace webrtc_pc_e2e