[PCLF] Remove video_configs and video_subscription from Params
Bug: b/213863770 Change-Id: I0b6758dd52ebe5c2543a8423cff7c6820d9c5320 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260183 Commit-Queue: Artem Titov <titovartem@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36671}
This commit is contained in:

committed by
WebRTC LUCI CQ

parent
cb56827c55
commit
d8e84b1ab1
@ -70,12 +70,8 @@ void PeerParamsPreprocessor::SetDefaultValuesForMissingParams(
|
|||||||
peer_names_provider_.MaybeSetName(params->name);
|
peer_names_provider_.MaybeSetName(params->name);
|
||||||
DefaultNamesProvider video_stream_names_provider(*params->name +
|
DefaultNamesProvider video_stream_names_provider(*params->name +
|
||||||
"_auto_video_stream_label_");
|
"_auto_video_stream_label_");
|
||||||
for (size_t i = 0; i < configurable_params->video_configs.size(); ++i) {
|
for (VideoConfig& config : configurable_params->video_configs) {
|
||||||
video_stream_names_provider.MaybeSetName(
|
video_stream_names_provider.MaybeSetName(config.stream_label);
|
||||||
configurable_params->video_configs[i].stream_label);
|
|
||||||
// TODO(titovartem): remove when downstream will migrate on new API.
|
|
||||||
params->video_configs[i].stream_label =
|
|
||||||
configurable_params->video_configs[i].stream_label;
|
|
||||||
}
|
}
|
||||||
if (params->audio_config) {
|
if (params->audio_config) {
|
||||||
DefaultNamesProvider audio_stream_names_provider(
|
DefaultNamesProvider audio_stream_names_provider(
|
||||||
|
@ -128,16 +128,12 @@ class PeerConfigurerImpl final
|
|||||||
PeerConnectionE2EQualityTestFixture::VideoConfig config) override {
|
PeerConnectionE2EQualityTestFixture::VideoConfig config) override {
|
||||||
video_sources_.push_back(
|
video_sources_.push_back(
|
||||||
CreateSquareFrameGenerator(config, /*type=*/absl::nullopt));
|
CreateSquareFrameGenerator(config, /*type=*/absl::nullopt));
|
||||||
// TODO(titovartem): remove when downstream will migrate on new API.
|
|
||||||
params_->video_configs.push_back(config);
|
|
||||||
configurable_params_->video_configs.push_back(std::move(config));
|
configurable_params_->video_configs.push_back(std::move(config));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
PeerConfigurer* AddVideoConfig(
|
PeerConfigurer* AddVideoConfig(
|
||||||
PeerConnectionE2EQualityTestFixture::VideoConfig config,
|
PeerConnectionE2EQualityTestFixture::VideoConfig config,
|
||||||
std::unique_ptr<test::FrameGeneratorInterface> generator) override {
|
std::unique_ptr<test::FrameGeneratorInterface> generator) override {
|
||||||
// TODO(titovartem): remove when downstream will migrate on new API.
|
|
||||||
params_->video_configs.push_back(config);
|
|
||||||
configurable_params_->video_configs.push_back(std::move(config));
|
configurable_params_->video_configs.push_back(std::move(config));
|
||||||
video_sources_.push_back(std::move(generator));
|
video_sources_.push_back(std::move(generator));
|
||||||
return this;
|
return this;
|
||||||
@ -146,8 +142,6 @@ class PeerConfigurerImpl final
|
|||||||
PeerConnectionE2EQualityTestFixture::VideoConfig config,
|
PeerConnectionE2EQualityTestFixture::VideoConfig config,
|
||||||
PeerConnectionE2EQualityTestFixture::CapturingDeviceIndex index)
|
PeerConnectionE2EQualityTestFixture::CapturingDeviceIndex index)
|
||||||
override {
|
override {
|
||||||
// TODO(titovartem): remove when downstream will migrate on new API.
|
|
||||||
params_->video_configs.push_back(config);
|
|
||||||
configurable_params_->video_configs.push_back(std::move(config));
|
configurable_params_->video_configs.push_back(std::move(config));
|
||||||
video_sources_.push_back(index);
|
video_sources_.push_back(index);
|
||||||
return this;
|
return this;
|
||||||
@ -155,8 +149,6 @@ class PeerConfigurerImpl final
|
|||||||
PeerConfigurer* SetVideoSubscription(
|
PeerConfigurer* SetVideoSubscription(
|
||||||
PeerConnectionE2EQualityTestFixture::VideoSubscription subscription)
|
PeerConnectionE2EQualityTestFixture::VideoSubscription subscription)
|
||||||
override {
|
override {
|
||||||
// TODO(titovartem): remove when downstream will migrate on new API.
|
|
||||||
params_->video_subscription = subscription;
|
|
||||||
configurable_params_->video_subscription = std::move(subscription);
|
configurable_params_->video_subscription = std::move(subscription);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -114,9 +114,6 @@ struct InjectableComponents {
|
|||||||
struct Params {
|
struct Params {
|
||||||
// Peer name. If empty - default one will be set by the fixture.
|
// Peer name. If empty - default one will be set by the fixture.
|
||||||
absl::optional<std::string> name;
|
absl::optional<std::string> name;
|
||||||
// If `video_configs` is empty - no video should be added to the test call.
|
|
||||||
// TODO(titovartem): remove when downstream will migrate on new API.
|
|
||||||
std::vector<PeerConnectionE2EQualityTestFixture::VideoConfig> video_configs;
|
|
||||||
// If `audio_config` is set audio stream will be configured
|
// If `audio_config` is set audio stream will be configured
|
||||||
absl::optional<PeerConnectionE2EQualityTestFixture::AudioConfig> audio_config;
|
absl::optional<PeerConnectionE2EQualityTestFixture::AudioConfig> audio_config;
|
||||||
// Flags to set on `cricket::PortAllocator`. These flags will be added
|
// Flags to set on `cricket::PortAllocator`. These flags will be added
|
||||||
@ -144,11 +141,6 @@ struct Params {
|
|||||||
BitrateSettings bitrate_settings;
|
BitrateSettings bitrate_settings;
|
||||||
std::vector<PeerConnectionE2EQualityTestFixture::VideoCodecConfig>
|
std::vector<PeerConnectionE2EQualityTestFixture::VideoCodecConfig>
|
||||||
video_codecs;
|
video_codecs;
|
||||||
|
|
||||||
// TODO(titovartem): remove when downstream will migrate on new API.
|
|
||||||
PeerConnectionE2EQualityTestFixture::VideoSubscription video_subscription =
|
|
||||||
PeerConnectionE2EQualityTestFixture::VideoSubscription()
|
|
||||||
.SubscribeToAllPeers();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Contains parameters that maybe changed by test writer during the test call.
|
// Contains parameters that maybe changed by test writer during the test call.
|
||||||
|
Reference in New Issue
Block a user