Refactor PC level smoke test for adding new network stats reporter
New network stats reporter will require peer name to be passed into constructor. Because peer name can be set inside PeerConfigurer adding of the reporter have to be moved to PeerConfigurer creation. Bug: webrtc:11756 Change-Id: I4840566a3cd2c73fbb1d186aa1c40ebf889fd830 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180805 Commit-Queue: Artem Titov <titovartem@webrtc.org> Reviewed-by: Andrey Logvin <landrey@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31841}
This commit is contained in:
@ -46,74 +46,58 @@ class PeerConnectionE2EQualityTestSmokeTest : public ::testing::Test {
|
|||||||
using EchoEmulationConfig =
|
using EchoEmulationConfig =
|
||||||
PeerConnectionE2EQualityTestFixture::EchoEmulationConfig;
|
PeerConnectionE2EQualityTestFixture::EchoEmulationConfig;
|
||||||
|
|
||||||
void RunTest(const std::string& test_case_name,
|
void SetUp() override {
|
||||||
const RunParams& run_params,
|
network_emulation_ = CreateNetworkEmulationManager();
|
||||||
rtc::FunctionView<void(PeerConfigurer*)> alice_configurer,
|
auto video_quality_analyzer = std::make_unique<DefaultVideoQualityAnalyzer>(
|
||||||
rtc::FunctionView<void(PeerConfigurer*)> bob_configurer) {
|
network_emulation_->time_controller()->GetClock());
|
||||||
// Setup emulated network
|
video_quality_analyzer_ = video_quality_analyzer.get();
|
||||||
std::unique_ptr<NetworkEmulationManager> network_emulation_manager =
|
fixture_ = CreatePeerConnectionE2EQualityTestFixture(
|
||||||
CreateNetworkEmulationManager();
|
testing::UnitTest::GetInstance()->current_test_info()->name(),
|
||||||
|
*network_emulation_->time_controller(),
|
||||||
auto alice_network_behavior =
|
|
||||||
std::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig());
|
|
||||||
SimulatedNetwork* alice_network_behavior_ptr = alice_network_behavior.get();
|
|
||||||
EmulatedNetworkNode* alice_node =
|
|
||||||
network_emulation_manager->CreateEmulatedNode(
|
|
||||||
std::move(alice_network_behavior));
|
|
||||||
EmulatedNetworkNode* bob_node =
|
|
||||||
network_emulation_manager->CreateEmulatedNode(
|
|
||||||
std::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
|
|
||||||
auto* alice_endpoint =
|
|
||||||
network_emulation_manager->CreateEndpoint(EmulatedEndpointConfig());
|
|
||||||
EmulatedEndpoint* bob_endpoint =
|
|
||||||
network_emulation_manager->CreateEndpoint(EmulatedEndpointConfig());
|
|
||||||
network_emulation_manager->CreateRoute(alice_endpoint, {alice_node},
|
|
||||||
bob_endpoint);
|
|
||||||
network_emulation_manager->CreateRoute(bob_endpoint, {bob_node},
|
|
||||||
alice_endpoint);
|
|
||||||
|
|
||||||
// Create analyzers.
|
|
||||||
std::unique_ptr<VideoQualityAnalyzerInterface> video_quality_analyzer =
|
|
||||||
std::make_unique<DefaultVideoQualityAnalyzer>(
|
|
||||||
network_emulation_manager->time_controller()->GetClock());
|
|
||||||
// This is only done for the sake of smoke testing. In general there should
|
|
||||||
// be no need to explicitly pull data from analyzers after the run.
|
|
||||||
auto* video_analyzer_ptr =
|
|
||||||
static_cast<DefaultVideoQualityAnalyzer*>(video_quality_analyzer.get());
|
|
||||||
|
|
||||||
auto fixture = CreatePeerConnectionE2EQualityTestFixture(
|
|
||||||
test_case_name, *network_emulation_manager->time_controller(),
|
|
||||||
/*audio_quality_analyzer=*/nullptr, std::move(video_quality_analyzer));
|
/*audio_quality_analyzer=*/nullptr, std::move(video_quality_analyzer));
|
||||||
fixture->ExecuteAt(TimeDelta::Seconds(1),
|
test::ScopedFieldTrials field_trials(
|
||||||
[alice_network_behavior_ptr](TimeDelta) {
|
std::string(field_trial::GetFieldTrialString()) +
|
||||||
BuiltInNetworkBehaviorConfig config;
|
"WebRTC-UseStandardBytesStats/Enabled/");
|
||||||
config.loss_percent = 5;
|
}
|
||||||
alice_network_behavior_ptr->SetConfig(config);
|
|
||||||
});
|
std::pair<EmulatedNetworkManagerInterface*, EmulatedNetworkManagerInterface*>
|
||||||
|
CreateNetwork() {
|
||||||
|
EmulatedNetworkNode* alice_node = network_emulation_->CreateEmulatedNode(
|
||||||
|
std::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
|
||||||
|
EmulatedNetworkNode* bob_node = network_emulation_->CreateEmulatedNode(
|
||||||
|
std::make_unique<SimulatedNetwork>(BuiltInNetworkBehaviorConfig()));
|
||||||
|
|
||||||
|
EmulatedEndpoint* alice_endpoint =
|
||||||
|
network_emulation_->CreateEndpoint(EmulatedEndpointConfig());
|
||||||
|
EmulatedEndpoint* bob_endpoint =
|
||||||
|
network_emulation_->CreateEndpoint(EmulatedEndpointConfig());
|
||||||
|
|
||||||
|
network_emulation_->CreateRoute(alice_endpoint, {alice_node}, bob_endpoint);
|
||||||
|
network_emulation_->CreateRoute(bob_endpoint, {bob_node}, alice_endpoint);
|
||||||
|
|
||||||
// Setup components. We need to provide rtc::NetworkManager compatible with
|
|
||||||
// emulated network layer.
|
|
||||||
EmulatedNetworkManagerInterface* alice_network =
|
EmulatedNetworkManagerInterface* alice_network =
|
||||||
network_emulation_manager->CreateEmulatedNetworkManagerInterface(
|
network_emulation_->CreateEmulatedNetworkManagerInterface(
|
||||||
{alice_endpoint});
|
{alice_endpoint});
|
||||||
EmulatedNetworkManagerInterface* bob_network =
|
EmulatedNetworkManagerInterface* bob_network =
|
||||||
network_emulation_manager->CreateEmulatedNetworkManagerInterface(
|
network_emulation_->CreateEmulatedNetworkManagerInterface(
|
||||||
{bob_endpoint});
|
{bob_endpoint});
|
||||||
|
|
||||||
fixture->AddPeer(alice_network->network_thread(),
|
return std::make_pair(alice_network, bob_network);
|
||||||
alice_network->network_manager(), alice_configurer);
|
}
|
||||||
fixture->AddPeer(bob_network->network_thread(),
|
|
||||||
bob_network->network_manager(), bob_configurer);
|
|
||||||
fixture->AddQualityMetricsReporter(
|
|
||||||
std::make_unique<NetworkQualityMetricsReporter>(alice_network,
|
|
||||||
bob_network));
|
|
||||||
|
|
||||||
fixture->Run(run_params);
|
void AddPeer(EmulatedNetworkManagerInterface* network,
|
||||||
|
rtc::FunctionView<void(PeerConfigurer*)> configurer) {
|
||||||
|
fixture_->AddPeer(network->network_thread(), network->network_manager(),
|
||||||
|
configurer);
|
||||||
|
}
|
||||||
|
|
||||||
EXPECT_GE(fixture->GetRealTestDuration(), run_params.run_duration);
|
void RunAndCheckEachVideoStreamReceivedFrames(const RunParams& run_params) {
|
||||||
for (auto stream_key : video_analyzer_ptr->GetKnownVideoStreams()) {
|
fixture_->Run(run_params);
|
||||||
|
|
||||||
|
EXPECT_GE(fixture_->GetRealTestDuration(), run_params.run_duration);
|
||||||
|
for (auto stream_key : video_quality_analyzer_->GetKnownVideoStreams()) {
|
||||||
FrameCounters stream_conters =
|
FrameCounters stream_conters =
|
||||||
video_analyzer_ptr->GetPerStreamCounters().at(stream_key);
|
video_quality_analyzer_->GetPerStreamCounters().at(stream_key);
|
||||||
// On some devices the pipeline can be too slow, so we actually can't
|
// On some devices the pipeline can be too slow, so we actually can't
|
||||||
// force real constraints here. Lets just check, that at least 1
|
// force real constraints here. Lets just check, that at least 1
|
||||||
// frame passed whole pipeline.
|
// frame passed whole pipeline.
|
||||||
@ -127,9 +111,18 @@ class PeerConnectionE2EQualityTestSmokeTest : public ::testing::Test {
|
|||||||
EXPECT_GE(stream_conters.rendered, 1) << stream_key.ToString();
|
EXPECT_GE(stream_conters.rendered, 1) << stream_key.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace
|
NetworkEmulationManager* network_emulation() {
|
||||||
|
return network_emulation_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
PeerConnectionE2EQualityTestFixture* fixture() { return fixture_.get(); }
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::unique_ptr<NetworkEmulationManager> network_emulation_;
|
||||||
|
DefaultVideoQualityAnalyzer* video_quality_analyzer_;
|
||||||
|
std::unique_ptr<PeerConnectionE2EQualityTestFixture> fixture_;
|
||||||
|
};
|
||||||
|
|
||||||
// IOS debug builds can be quite slow, disabling to avoid issues with timeouts.
|
// IOS debug builds can be quite slow, disabling to avoid issues with timeouts.
|
||||||
#if defined(WEBRTC_IOS) && defined(WEBRTC_ARCH_ARM64) && !defined(NDEBUG)
|
#if defined(WEBRTC_IOS) && defined(WEBRTC_ARCH_ARM64) && !defined(NDEBUG)
|
||||||
@ -138,18 +131,9 @@ class PeerConnectionE2EQualityTestSmokeTest : public ::testing::Test {
|
|||||||
#define MAYBE_Smoke Smoke
|
#define MAYBE_Smoke Smoke
|
||||||
#endif
|
#endif
|
||||||
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Smoke) {
|
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Smoke) {
|
||||||
RunParams run_params(TimeDelta::Seconds(2));
|
std::pair<EmulatedNetworkManagerInterface*, EmulatedNetworkManagerInterface*>
|
||||||
run_params.video_codecs = {
|
network_links = CreateNetwork();
|
||||||
VideoCodecConfig(cricket::kVp9CodecName, {{"profile-id", "0"}})};
|
AddPeer(network_links.first, [](PeerConfigurer* alice) {
|
||||||
run_params.use_flex_fec = true;
|
|
||||||
run_params.use_ulp_fec = true;
|
|
||||||
run_params.video_encoder_bitrate_multiplier = 1.1;
|
|
||||||
test::ScopedFieldTrials field_trials(
|
|
||||||
std::string(field_trial::GetFieldTrialString()) +
|
|
||||||
"WebRTC-UseStandardBytesStats/Enabled/");
|
|
||||||
RunTest(
|
|
||||||
"smoke", run_params,
|
|
||||||
[](PeerConfigurer* alice) {
|
|
||||||
VideoConfig video(160, 120, 15);
|
VideoConfig video(160, 120, 15);
|
||||||
video.stream_label = "alice-video";
|
video.stream_label = "alice-video";
|
||||||
video.sync_group = "alice-media";
|
video.sync_group = "alice-media";
|
||||||
@ -163,8 +147,8 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Smoke) {
|
|||||||
audio.sampling_frequency_in_hz = 48000;
|
audio.sampling_frequency_in_hz = 48000;
|
||||||
audio.sync_group = "alice-media";
|
audio.sync_group = "alice-media";
|
||||||
alice->SetAudioConfig(std::move(audio));
|
alice->SetAudioConfig(std::move(audio));
|
||||||
},
|
});
|
||||||
[](PeerConfigurer* charlie) {
|
AddPeer(network_links.second, [](PeerConfigurer* charlie) {
|
||||||
charlie->SetName("charlie");
|
charlie->SetName("charlie");
|
||||||
VideoConfig video(160, 120, 15);
|
VideoConfig video(160, 120, 15);
|
||||||
video.stream_label = "charlie-video";
|
video.stream_label = "charlie-video";
|
||||||
@ -178,6 +162,77 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Smoke) {
|
|||||||
test::ResourcePath("pc_quality_smoke_test_bob_source", "wav");
|
test::ResourcePath("pc_quality_smoke_test_bob_source", "wav");
|
||||||
charlie->SetAudioConfig(std::move(audio));
|
charlie->SetAudioConfig(std::move(audio));
|
||||||
});
|
});
|
||||||
|
fixture()->AddQualityMetricsReporter(
|
||||||
|
std::make_unique<NetworkQualityMetricsReporter>(network_links.first,
|
||||||
|
network_links.second));
|
||||||
|
RunParams run_params(TimeDelta::Seconds(2));
|
||||||
|
run_params.video_codecs = {
|
||||||
|
VideoCodecConfig(cricket::kVp9CodecName, {{"profile-id", "0"}})};
|
||||||
|
run_params.use_flex_fec = true;
|
||||||
|
run_params.use_ulp_fec = true;
|
||||||
|
run_params.video_encoder_bitrate_multiplier = 1.1;
|
||||||
|
RunAndCheckEachVideoStreamReceivedFrames(run_params);
|
||||||
|
}
|
||||||
|
|
||||||
|
// IOS debug builds can be quite slow, disabling to avoid issues with timeouts.
|
||||||
|
#if defined(WEBRTC_IOS) && defined(WEBRTC_ARCH_ARM64) && !defined(NDEBUG)
|
||||||
|
#define MAYBE_ChangeNetworkConditions DISABLED_ChangeNetworkConditions
|
||||||
|
#else
|
||||||
|
#define MAYBE_ChangeNetworkConditions ChangeNetworkConditions
|
||||||
|
#endif
|
||||||
|
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_ChangeNetworkConditions) {
|
||||||
|
NetworkEmulationManager::SimulatedNetworkNode alice_node =
|
||||||
|
network_emulation()
|
||||||
|
->NodeBuilder()
|
||||||
|
.config(BuiltInNetworkBehaviorConfig())
|
||||||
|
.Build();
|
||||||
|
NetworkEmulationManager::SimulatedNetworkNode bob_node =
|
||||||
|
network_emulation()
|
||||||
|
->NodeBuilder()
|
||||||
|
.config(BuiltInNetworkBehaviorConfig())
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
EmulatedEndpoint* alice_endpoint =
|
||||||
|
network_emulation()->CreateEndpoint(EmulatedEndpointConfig());
|
||||||
|
EmulatedEndpoint* bob_endpoint =
|
||||||
|
network_emulation()->CreateEndpoint(EmulatedEndpointConfig());
|
||||||
|
|
||||||
|
network_emulation()->CreateRoute(alice_endpoint, {alice_node.node},
|
||||||
|
bob_endpoint);
|
||||||
|
network_emulation()->CreateRoute(bob_endpoint, {bob_node.node},
|
||||||
|
alice_endpoint);
|
||||||
|
|
||||||
|
EmulatedNetworkManagerInterface* alice_network =
|
||||||
|
network_emulation()->CreateEmulatedNetworkManagerInterface(
|
||||||
|
{alice_endpoint});
|
||||||
|
EmulatedNetworkManagerInterface* bob_network =
|
||||||
|
network_emulation()->CreateEmulatedNetworkManagerInterface(
|
||||||
|
{bob_endpoint});
|
||||||
|
|
||||||
|
AddPeer(alice_network, [](PeerConfigurer* alice) {
|
||||||
|
VideoConfig video(160, 120, 15);
|
||||||
|
video.stream_label = "alice-video";
|
||||||
|
video.sync_group = "alice-media";
|
||||||
|
alice->AddVideoConfig(std::move(video));
|
||||||
|
});
|
||||||
|
AddPeer(bob_network, [](PeerConfigurer* bob) {});
|
||||||
|
fixture()->AddQualityMetricsReporter(
|
||||||
|
std::make_unique<NetworkQualityMetricsReporter>(alice_network,
|
||||||
|
bob_network));
|
||||||
|
|
||||||
|
fixture()->ExecuteAt(TimeDelta::Seconds(1), [alice_node](TimeDelta) {
|
||||||
|
BuiltInNetworkBehaviorConfig config;
|
||||||
|
config.loss_percent = 5;
|
||||||
|
alice_node.simulation->SetConfig(config);
|
||||||
|
});
|
||||||
|
|
||||||
|
RunParams run_params(TimeDelta::Seconds(2));
|
||||||
|
run_params.video_codecs = {
|
||||||
|
VideoCodecConfig(cricket::kVp9CodecName, {{"profile-id", "0"}})};
|
||||||
|
run_params.use_flex_fec = true;
|
||||||
|
run_params.use_ulp_fec = true;
|
||||||
|
run_params.video_encoder_bitrate_multiplier = 1.1;
|
||||||
|
RunAndCheckEachVideoStreamReceivedFrames(run_params);
|
||||||
}
|
}
|
||||||
|
|
||||||
// IOS debug builds can be quite slow, disabling to avoid issues with timeouts.
|
// IOS debug builds can be quite slow, disabling to avoid issues with timeouts.
|
||||||
@ -187,13 +242,10 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Smoke) {
|
|||||||
#define MAYBE_Screenshare Screenshare
|
#define MAYBE_Screenshare Screenshare
|
||||||
#endif
|
#endif
|
||||||
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Screenshare) {
|
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Screenshare) {
|
||||||
RunParams run_params(TimeDelta::Seconds(2));
|
std::pair<EmulatedNetworkManagerInterface*, EmulatedNetworkManagerInterface*>
|
||||||
test::ScopedFieldTrials field_trials(
|
network_links = CreateNetwork();
|
||||||
std::string(field_trial::GetFieldTrialString()) +
|
AddPeer(
|
||||||
"WebRTC-UseStandardBytesStats/Enabled/");
|
network_links.first, [](PeerConfigurer* alice) {
|
||||||
RunTest(
|
|
||||||
"screenshare", run_params,
|
|
||||||
[](PeerConfigurer* alice) {
|
|
||||||
VideoConfig screenshare(320, 180, 30);
|
VideoConfig screenshare(320, 180, 30);
|
||||||
screenshare.stream_label = "alice-screenshare";
|
screenshare.stream_label = "alice-screenshare";
|
||||||
screenshare.content_hint = VideoTrackInterface::ContentHint::kText;
|
screenshare.content_hint = VideoTrackInterface::ContentHint::kText;
|
||||||
@ -205,8 +257,9 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Screenshare) {
|
|||||||
CreateScreenShareFrameGenerator(screenshare, screen_share_config);
|
CreateScreenShareFrameGenerator(screenshare, screen_share_config);
|
||||||
alice->AddVideoConfig(std::move(screenshare),
|
alice->AddVideoConfig(std::move(screenshare),
|
||||||
std::move(screen_share_frame_generator));
|
std::move(screen_share_frame_generator));
|
||||||
},
|
});
|
||||||
[](PeerConfigurer* charlie) {});
|
AddPeer(network_links.second, [](PeerConfigurer* bob) {});
|
||||||
|
RunAndCheckEachVideoStreamReceivedFrames(RunParams(TimeDelta::Seconds(2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// IOS debug builds can be quite slow, disabling to avoid issues with timeouts.
|
// IOS debug builds can be quite slow, disabling to avoid issues with timeouts.
|
||||||
@ -216,11 +269,9 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Screenshare) {
|
|||||||
#define MAYBE_Echo Echo
|
#define MAYBE_Echo Echo
|
||||||
#endif
|
#endif
|
||||||
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Echo) {
|
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Echo) {
|
||||||
RunParams run_params(TimeDelta::Seconds(2));
|
std::pair<EmulatedNetworkManagerInterface*, EmulatedNetworkManagerInterface*>
|
||||||
run_params.echo_emulation_config = EchoEmulationConfig();
|
network_links = CreateNetwork();
|
||||||
RunTest(
|
AddPeer(network_links.first, [](PeerConfigurer* alice) {
|
||||||
"smoke", run_params,
|
|
||||||
[](PeerConfigurer* alice) {
|
|
||||||
AudioConfig audio;
|
AudioConfig audio;
|
||||||
audio.stream_label = "alice-audio";
|
audio.stream_label = "alice-audio";
|
||||||
audio.mode = AudioConfig::Mode::kFile;
|
audio.mode = AudioConfig::Mode::kFile;
|
||||||
@ -228,8 +279,8 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Echo) {
|
|||||||
test::ResourcePath("pc_quality_smoke_test_alice_source", "wav");
|
test::ResourcePath("pc_quality_smoke_test_alice_source", "wav");
|
||||||
audio.sampling_frequency_in_hz = 48000;
|
audio.sampling_frequency_in_hz = 48000;
|
||||||
alice->SetAudioConfig(std::move(audio));
|
alice->SetAudioConfig(std::move(audio));
|
||||||
},
|
});
|
||||||
[](PeerConfigurer* bob) {
|
AddPeer(network_links.second, [](PeerConfigurer* bob) {
|
||||||
AudioConfig audio;
|
AudioConfig audio;
|
||||||
audio.stream_label = "bob-audio";
|
audio.stream_label = "bob-audio";
|
||||||
audio.mode = AudioConfig::Mode::kFile;
|
audio.mode = AudioConfig::Mode::kFile;
|
||||||
@ -237,6 +288,9 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Echo) {
|
|||||||
test::ResourcePath("pc_quality_smoke_test_bob_source", "wav");
|
test::ResourcePath("pc_quality_smoke_test_bob_source", "wav");
|
||||||
bob->SetAudioConfig(std::move(audio));
|
bob->SetAudioConfig(std::move(audio));
|
||||||
});
|
});
|
||||||
|
RunParams run_params(TimeDelta::Seconds(2));
|
||||||
|
run_params.echo_emulation_config = EchoEmulationConfig();
|
||||||
|
RunAndCheckEachVideoStreamReceivedFrames(run_params);
|
||||||
}
|
}
|
||||||
|
|
||||||
// IOS debug builds can be quite slow, disabling to avoid issues with timeouts.
|
// IOS debug builds can be quite slow, disabling to avoid issues with timeouts.
|
||||||
@ -246,11 +300,9 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Echo) {
|
|||||||
#define MAYBE_Simulcast Simulcast
|
#define MAYBE_Simulcast Simulcast
|
||||||
#endif
|
#endif
|
||||||
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Simulcast) {
|
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Simulcast) {
|
||||||
RunParams run_params(TimeDelta::Seconds(2));
|
std::pair<EmulatedNetworkManagerInterface*, EmulatedNetworkManagerInterface*>
|
||||||
run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
|
network_links = CreateNetwork();
|
||||||
RunTest(
|
AddPeer(network_links.first, [](PeerConfigurer* alice) {
|
||||||
"simulcast", run_params,
|
|
||||||
[](PeerConfigurer* alice) {
|
|
||||||
VideoConfig simulcast(1280, 720, 15);
|
VideoConfig simulcast(1280, 720, 15);
|
||||||
simulcast.stream_label = "alice-simulcast";
|
simulcast.stream_label = "alice-simulcast";
|
||||||
simulcast.simulcast_config = VideoSimulcastConfig(2, 0);
|
simulcast.simulcast_config = VideoSimulcastConfig(2, 0);
|
||||||
@ -262,8 +314,11 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Simulcast) {
|
|||||||
audio.input_file_name =
|
audio.input_file_name =
|
||||||
test::ResourcePath("pc_quality_smoke_test_alice_source", "wav");
|
test::ResourcePath("pc_quality_smoke_test_alice_source", "wav");
|
||||||
alice->SetAudioConfig(std::move(audio));
|
alice->SetAudioConfig(std::move(audio));
|
||||||
},
|
});
|
||||||
[](PeerConfigurer* bob) {});
|
AddPeer(network_links.second, [](PeerConfigurer* bob) {});
|
||||||
|
RunParams run_params(TimeDelta::Seconds(2));
|
||||||
|
run_params.video_codecs = {VideoCodecConfig(cricket::kVp8CodecName)};
|
||||||
|
RunAndCheckEachVideoStreamReceivedFrames(run_params);
|
||||||
}
|
}
|
||||||
|
|
||||||
// IOS debug builds can be quite slow, disabling to avoid issues with timeouts.
|
// IOS debug builds can be quite slow, disabling to avoid issues with timeouts.
|
||||||
@ -273,11 +328,9 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Simulcast) {
|
|||||||
#define MAYBE_Svc Svc
|
#define MAYBE_Svc Svc
|
||||||
#endif
|
#endif
|
||||||
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Svc) {
|
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Svc) {
|
||||||
RunParams run_params(TimeDelta::Seconds(2));
|
std::pair<EmulatedNetworkManagerInterface*, EmulatedNetworkManagerInterface*>
|
||||||
run_params.video_codecs = {VideoCodecConfig(cricket::kVp9CodecName)};
|
network_links = CreateNetwork();
|
||||||
RunTest(
|
AddPeer(network_links.first, [](PeerConfigurer* alice) {
|
||||||
"simulcast", run_params,
|
|
||||||
[](PeerConfigurer* alice) {
|
|
||||||
VideoConfig simulcast(1280, 720, 15);
|
VideoConfig simulcast(1280, 720, 15);
|
||||||
simulcast.stream_label = "alice-svc";
|
simulcast.stream_label = "alice-svc";
|
||||||
// Because we have network with packets loss we can analyze only the
|
// Because we have network with packets loss we can analyze only the
|
||||||
@ -291,8 +344,11 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Svc) {
|
|||||||
audio.input_file_name =
|
audio.input_file_name =
|
||||||
test::ResourcePath("pc_quality_smoke_test_alice_source", "wav");
|
test::ResourcePath("pc_quality_smoke_test_alice_source", "wav");
|
||||||
alice->SetAudioConfig(std::move(audio));
|
alice->SetAudioConfig(std::move(audio));
|
||||||
},
|
});
|
||||||
[](PeerConfigurer* bob) {});
|
AddPeer(network_links.second, [](PeerConfigurer* bob) {});
|
||||||
|
RunParams run_params(TimeDelta::Seconds(2));
|
||||||
|
run_params.video_codecs = {VideoCodecConfig(cricket::kVp9CodecName)};
|
||||||
|
RunAndCheckEachVideoStreamReceivedFrames(run_params);
|
||||||
}
|
}
|
||||||
|
|
||||||
// IOS debug builds can be quite slow, disabling to avoid issues with timeouts.
|
// IOS debug builds can be quite slow, disabling to avoid issues with timeouts.
|
||||||
@ -302,13 +358,9 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Svc) {
|
|||||||
#define MAYBE_HighBitrate HighBitrate
|
#define MAYBE_HighBitrate HighBitrate
|
||||||
#endif
|
#endif
|
||||||
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_HighBitrate) {
|
TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_HighBitrate) {
|
||||||
RunParams run_params(TimeDelta::Seconds(2));
|
std::pair<EmulatedNetworkManagerInterface*, EmulatedNetworkManagerInterface*>
|
||||||
run_params.video_codecs = {
|
network_links = CreateNetwork();
|
||||||
VideoCodecConfig(cricket::kVp9CodecName, {{"profile-id", "0"}})};
|
AddPeer(network_links.first, [](PeerConfigurer* alice) {
|
||||||
|
|
||||||
RunTest(
|
|
||||||
"smoke", run_params,
|
|
||||||
[](PeerConfigurer* alice) {
|
|
||||||
BitrateSettings bitrate_settings;
|
BitrateSettings bitrate_settings;
|
||||||
bitrate_settings.start_bitrate_bps = 3'000'000;
|
bitrate_settings.start_bitrate_bps = 3'000'000;
|
||||||
bitrate_settings.max_bitrate_bps = 3'000'000;
|
bitrate_settings.max_bitrate_bps = 3'000'000;
|
||||||
@ -326,9 +378,14 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_HighBitrate) {
|
|||||||
test::ResourcePath("pc_quality_smoke_test_alice_source", "wav");
|
test::ResourcePath("pc_quality_smoke_test_alice_source", "wav");
|
||||||
audio.sampling_frequency_in_hz = 48000;
|
audio.sampling_frequency_in_hz = 48000;
|
||||||
alice->SetAudioConfig(std::move(audio));
|
alice->SetAudioConfig(std::move(audio));
|
||||||
},
|
});
|
||||||
[](PeerConfigurer* bob) {});
|
AddPeer(network_links.second, [](PeerConfigurer* bob) {});
|
||||||
|
RunParams run_params(TimeDelta::Seconds(2));
|
||||||
|
run_params.video_codecs = {
|
||||||
|
VideoCodecConfig(cricket::kVp9CodecName, {{"profile-id", "0"}})};
|
||||||
|
RunAndCheckEachVideoStreamReceivedFrames(run_params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace
|
||||||
} // namespace webrtc_pc_e2e
|
} // namespace webrtc_pc_e2e
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
Reference in New Issue
Block a user