Migrate some Vp8 simulcast and screen share tests on PC framework
Bug: webrtc:10138 Change-Id: I2fc1cafc128c9604bfad4967066a8718edc62d20 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146083 Reviewed-by: Stefan Holmer <stefan@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28629}
This commit is contained in:
@ -148,8 +148,6 @@ class PeerConnectionE2EQualityTestFixture {
|
||||
// spatial layer and all layers below, including target one will be
|
||||
// processed. All layers above target one will be dropped.
|
||||
int target_spatial_index;
|
||||
// If true will set conference mode in SDP media section for this track.
|
||||
bool use_conference_mode = false;
|
||||
};
|
||||
|
||||
// Contains properties of single video stream.
|
||||
@ -307,6 +305,9 @@ class PeerConnectionE2EQualityTestFixture {
|
||||
// estimated by WebRTC stack will be multiplied on this multiplier and then
|
||||
// provided into VideoEncoder::SetRates(...).
|
||||
double video_encoder_bitrate_multiplier = 1.0;
|
||||
// If true will set conference mode in SDP media section for all video
|
||||
// tracks for all peers.
|
||||
bool use_conference_mode = false;
|
||||
};
|
||||
|
||||
// Represent an entity that will report quality metrics after test.
|
||||
|
@ -487,7 +487,6 @@ rtc_source_set("sdp_changer") {
|
||||
deps = [
|
||||
"../../../api:array_view",
|
||||
"../../../api:libjingle_peerconnection_api",
|
||||
"../../../api:peer_connection_quality_test_fixture_api",
|
||||
"../../../media:rtc_media_base",
|
||||
"../../../p2p:rtc_p2p",
|
||||
"../../../pc:peerconnection",
|
||||
|
@ -825,17 +825,19 @@ void PeerConnectionE2EQualityTest::SetPeerCodecPreferences(
|
||||
}
|
||||
|
||||
void PeerConnectionE2EQualityTest::SetupCall(const RunParams& run_params) {
|
||||
std::map<std::string, VideoSimulcastConfig> stream_label_to_simulcast_config;
|
||||
std::map<std::string, int> stream_label_to_simulcast_streams_count;
|
||||
// We add only Alice here, because simulcast/svc is supported only from the
|
||||
// first peer.
|
||||
for (auto& video_config : alice_->params()->video_configs) {
|
||||
if (video_config.simulcast_config) {
|
||||
stream_label_to_simulcast_config.insert(
|
||||
{*video_config.stream_label, *video_config.simulcast_config});
|
||||
stream_label_to_simulcast_streams_count.insert(
|
||||
{*video_config.stream_label,
|
||||
video_config.simulcast_config->simulcast_streams_count});
|
||||
}
|
||||
}
|
||||
PatchingParams patching_params(run_params.video_codec_name,
|
||||
stream_label_to_simulcast_config);
|
||||
run_params.use_conference_mode,
|
||||
stream_label_to_simulcast_streams_count);
|
||||
SignalingInterceptor signaling_interceptor(patching_params);
|
||||
// Connect peers.
|
||||
ExchangeOfferAnswer(&signaling_interceptor);
|
||||
|
@ -88,12 +88,10 @@ std::vector<RtpCodecCapability> FilterVideoCodecCapabilities(
|
||||
// If offer has no simulcast video sections - do nothing.
|
||||
//
|
||||
// If offer has simulcast video sections - for each section creates
|
||||
// SimulcastSectionInfo and put it into |context_|. Also will set conference
|
||||
// mode if requested.
|
||||
// SimulcastSectionInfo and put it into |context_|.
|
||||
void SignalingInterceptor::FillSimulcastContext(
|
||||
SessionDescriptionInterface* offer) {
|
||||
for (auto& content : offer->description()->contents()) {
|
||||
context_.mids_order.push_back(content.mid());
|
||||
cricket::MediaContentDescription* media_desc = content.media_description();
|
||||
if (media_desc->type() != cricket::MediaType::MEDIA_TYPE_VIDEO) {
|
||||
continue;
|
||||
@ -103,23 +101,9 @@ void SignalingInterceptor::FillSimulcastContext(
|
||||
RTC_CHECK_EQ(media_desc->mutable_streams().size(), 1);
|
||||
RTC_CHECK(media_desc->mutable_streams()[0].has_rids());
|
||||
|
||||
// Extract stream label, that was used when we added the stream.
|
||||
cricket::StreamParams& stream = media_desc->mutable_streams()[0];
|
||||
RTC_CHECK(stream.stream_ids().size() == 1)
|
||||
<< "Too many stream ids in video stream";
|
||||
std::string stream_label = stream.stream_ids()[0];
|
||||
|
||||
bool conference_mode =
|
||||
params_.stream_label_to_simulcast_config.at(stream_label)
|
||||
.use_conference_mode;
|
||||
|
||||
// Create SimulcastSectionInfo for this video section.
|
||||
SimulcastSectionInfo info(content.mid(), content.type,
|
||||
media_desc->mutable_streams()[0].rids(),
|
||||
conference_mode);
|
||||
|
||||
// Set conference mode if requested
|
||||
media_desc->set_conference_mode(conference_mode);
|
||||
media_desc->mutable_streams()[0].rids());
|
||||
|
||||
// Set new rids basing on created SimulcastSectionInfo.
|
||||
std::vector<cricket::RidDescription> rids;
|
||||
@ -161,6 +145,22 @@ void SignalingInterceptor::FillSimulcastContext(
|
||||
|
||||
LocalAndRemoteSdp SignalingInterceptor::PatchOffer(
|
||||
std::unique_ptr<SessionDescriptionInterface> offer) {
|
||||
for (auto& content : offer->description()->contents()) {
|
||||
context_.mids_order.push_back(content.mid());
|
||||
cricket::MediaContentDescription* media_desc = content.media_description();
|
||||
if (media_desc->type() != cricket::MediaType::MEDIA_TYPE_VIDEO) {
|
||||
continue;
|
||||
}
|
||||
if (content.media_description()->streams().size() == 0) {
|
||||
// It means that this media section describes receive only media section
|
||||
// in SDP.
|
||||
RTC_CHECK_EQ(content.media_description()->direction(),
|
||||
RtpTransceiverDirection::kRecvOnly);
|
||||
continue;
|
||||
}
|
||||
media_desc->set_conference_mode(params_.use_conference_mode);
|
||||
}
|
||||
|
||||
if (params_.video_codec_name == cricket::kVp8CodecName) {
|
||||
return PatchVp8Offer(std::move(offer));
|
||||
}
|
||||
@ -198,7 +198,6 @@ LocalAndRemoteSdp SignalingInterceptor::PatchVp8Offer(
|
||||
// because otherwise description will be deleted.
|
||||
std::unique_ptr<cricket::MediaContentDescription> prototype_media_desc =
|
||||
absl::WrapUnique(simulcast_content->media_description()->Copy());
|
||||
prototype_media_desc->set_conference_mode(false);
|
||||
|
||||
// Remove simulcast video section from offer.
|
||||
RTC_CHECK(desc->RemoveContentByName(simulcast_content->mid()));
|
||||
@ -305,21 +304,22 @@ LocalAndRemoteSdp SignalingInterceptor::PatchVp9Offer(
|
||||
// sender side, so we needn't to do anything with this track.
|
||||
continue;
|
||||
}
|
||||
RTC_CHECK(content.media_description()->streams().size() == 1);
|
||||
RTC_CHECK_EQ(content.media_description()->streams().size(), 1);
|
||||
cricket::StreamParams& stream =
|
||||
content.media_description()->mutable_streams()[0];
|
||||
RTC_CHECK(stream.stream_ids().size() == 1)
|
||||
RTC_CHECK_EQ(stream.stream_ids().size(), 1)
|
||||
<< "Too many stream ids in video stream";
|
||||
std::string stream_id = stream.stream_ids()[0];
|
||||
std::string stream_label = stream.stream_ids()[0];
|
||||
|
||||
auto it = params_.stream_label_to_simulcast_config.find(stream_id);
|
||||
if (it == params_.stream_label_to_simulcast_config.end()) {
|
||||
auto it =
|
||||
params_.stream_label_to_simulcast_streams_count.find(stream_label);
|
||||
if (it == params_.stream_label_to_simulcast_streams_count.end()) {
|
||||
continue;
|
||||
}
|
||||
int svc_layers_count = it->second.simulcast_streams_count;
|
||||
int svc_layers_count = it->second;
|
||||
|
||||
RTC_CHECK(stream.has_ssrc_groups()) << "Only SVC with RTX is supported";
|
||||
RTC_CHECK(stream.ssrc_groups.size() == 1)
|
||||
RTC_CHECK_EQ(stream.ssrc_groups.size(), 1)
|
||||
<< "Too many ssrc groups in the track";
|
||||
std::vector<uint32_t> primary_ssrcs;
|
||||
stream.GetPrimarySsrcs(&primary_ssrcs);
|
||||
@ -418,9 +418,6 @@ LocalAndRemoteSdp SignalingInterceptor::PatchVp8Answer(
|
||||
}
|
||||
media_desc->set_simulcast_description(simulcast_description);
|
||||
|
||||
// Set conference mode if requested.
|
||||
media_desc->set_conference_mode(info.conference_mode);
|
||||
|
||||
// Add simulcast media section.
|
||||
desc->AddContent(info.mid, info.media_protocol_type, std::move(media_desc));
|
||||
}
|
||||
@ -536,11 +533,8 @@ SignalingInterceptor::PatchAnswererIceCandidates(
|
||||
SignalingInterceptor::SimulcastSectionInfo::SimulcastSectionInfo(
|
||||
const std::string& mid,
|
||||
cricket::MediaProtocolType media_protocol_type,
|
||||
const std::vector<cricket::RidDescription>& rids_desc,
|
||||
bool conference_mode)
|
||||
: mid(mid),
|
||||
media_protocol_type(media_protocol_type),
|
||||
conference_mode(conference_mode) {
|
||||
const std::vector<cricket::RidDescription>& rids_desc)
|
||||
: mid(mid), media_protocol_type(media_protocol_type) {
|
||||
for (auto& rid : rids_desc) {
|
||||
rids.push_back(rid.rid);
|
||||
}
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "api/array_view.h"
|
||||
#include "api/jsep.h"
|
||||
#include "api/rtp_parameters.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "media/base/rid_description.h"
|
||||
#include "pc/session_description.h"
|
||||
#include "pc/simulcast_description.h"
|
||||
@ -63,16 +62,16 @@ struct LocalAndRemoteSdp {
|
||||
struct PatchingParams {
|
||||
PatchingParams(
|
||||
std::string video_codec_name,
|
||||
std::map<std::string,
|
||||
PeerConnectionE2EQualityTestFixture::VideoSimulcastConfig>
|
||||
stream_label_to_simulcast_config)
|
||||
bool use_conference_mode,
|
||||
std::map<std::string, int> stream_label_to_simulcast_streams_count)
|
||||
: video_codec_name(video_codec_name),
|
||||
stream_label_to_simulcast_config(stream_label_to_simulcast_config) {}
|
||||
use_conference_mode(use_conference_mode),
|
||||
stream_label_to_simulcast_streams_count(
|
||||
stream_label_to_simulcast_streams_count) {}
|
||||
|
||||
std::string video_codec_name;
|
||||
std::map<std::string,
|
||||
PeerConnectionE2EQualityTestFixture::VideoSimulcastConfig>
|
||||
stream_label_to_simulcast_config;
|
||||
bool use_conference_mode;
|
||||
std::map<std::string, int> stream_label_to_simulcast_streams_count;
|
||||
};
|
||||
|
||||
class SignalingInterceptor {
|
||||
@ -96,12 +95,10 @@ class SignalingInterceptor {
|
||||
struct SimulcastSectionInfo {
|
||||
SimulcastSectionInfo(const std::string& mid,
|
||||
cricket::MediaProtocolType media_protocol_type,
|
||||
const std::vector<cricket::RidDescription>& rids_desc,
|
||||
bool conference_mode);
|
||||
const std::vector<cricket::RidDescription>& rids_desc);
|
||||
|
||||
const std::string mid;
|
||||
const cricket::MediaProtocolType media_protocol_type;
|
||||
const bool conference_mode;
|
||||
std::vector<std::string> rids;
|
||||
cricket::SimulcastDescription simulcast_description;
|
||||
webrtc::RtpExtension mid_extension;
|
||||
|
@ -38,6 +38,10 @@ using AudioConfig =
|
||||
webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::AudioConfig;
|
||||
using VideoGeneratorType =
|
||||
webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoGeneratorType;
|
||||
using ScreenShareConfig =
|
||||
webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::ScreenShareConfig;
|
||||
using VideoSimulcastConfig =
|
||||
webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoSimulcastConfig;
|
||||
|
||||
namespace {
|
||||
|
||||
@ -822,8 +826,7 @@ TEST_P(PCGenericDescriptorTest, ForemanCif500kbps100msLimitedQueue) {
|
||||
|
||||
/*
|
||||
// TODO(bugs.webrtc.org/10639) we need to disable send side bwe, but it isn't
|
||||
supported in
|
||||
// PC level framework.
|
||||
// supported in PC level framework.
|
||||
TEST(PCFullStackTest, ForemanCif500kbps100msLimitedQueueRecvBwe) {
|
||||
auto fixture = CreateVideoQualityTestFixture();
|
||||
ParamsWithLogging foreman_cif;
|
||||
@ -1076,55 +1079,104 @@ TEST(PCFullStackTest, ConferenceMotionHd2000kbps100msLimitedQueueVP9) {
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
// TODO(bugs.webrtc.org/10639) requires simulcast/SVC support in PC framework
|
||||
TEST(PCFullStackTest, ScreenshareSlidesVP8_2TL) {
|
||||
auto fixture = CreateVideoQualityTestFixture();
|
||||
ParamsWithLogging screenshare;
|
||||
screenshare.call.send_side_bwe = true;
|
||||
screenshare.video[0] = {true, 1850, 1110, 5, 50000, 200000,
|
||||
1000000, false, "VP8", 2, 1, 400000,
|
||||
false, false, false, ""};
|
||||
screenshare.screenshare[0] = {true, false, 10};
|
||||
screenshare.analyzer = {"screenshare_slides", 0.0, 0.0, kTestDurationSec};
|
||||
fixture->RunWithAnalyzer(screenshare);
|
||||
TEST(PCFullStackTest, ScreenshareSlidesVP8_2TL_NoConferenceMode) {
|
||||
std::unique_ptr<NetworkEmulationManager> network_emulation_manager =
|
||||
CreateNetworkEmulationManager();
|
||||
auto fixture = CreateTestFixture(
|
||||
"pc_screenshare_slides_no_conference_mode",
|
||||
CreateTwoNetworkLinks(network_emulation_manager.get(),
|
||||
BuiltInNetworkBehaviorConfig()),
|
||||
[](PeerConfigurer* alice) {
|
||||
VideoConfig video(1850, 1110, 5);
|
||||
video.screen_share_config = ScreenShareConfig(TimeDelta::seconds(10));
|
||||
video.stream_label = "alice-video";
|
||||
alice->AddVideoConfig(std::move(video));
|
||||
},
|
||||
[](PeerConfigurer* bob) {});
|
||||
RunParams run_params(TimeDelta::seconds(kTestDurationSec));
|
||||
run_params.video_codec_name = cricket::kVp8CodecName;
|
||||
run_params.use_flex_fec = false;
|
||||
run_params.use_ulp_fec = false;
|
||||
fixture->Run(std::move(run_params));
|
||||
}
|
||||
|
||||
TEST(PCFullStackTest, ScreenshareSlidesVP8_2TL) {
|
||||
std::unique_ptr<NetworkEmulationManager> network_emulation_manager =
|
||||
CreateNetworkEmulationManager();
|
||||
auto fixture = CreateTestFixture(
|
||||
"pc_screenshare_slides",
|
||||
CreateTwoNetworkLinks(network_emulation_manager.get(),
|
||||
BuiltInNetworkBehaviorConfig()),
|
||||
[](PeerConfigurer* alice) {
|
||||
VideoConfig video(1850, 1110, 5);
|
||||
video.screen_share_config = ScreenShareConfig(TimeDelta::seconds(10));
|
||||
video.stream_label = "alice-video";
|
||||
alice->AddVideoConfig(std::move(video));
|
||||
},
|
||||
[](PeerConfigurer* bob) {});
|
||||
RunParams run_params(TimeDelta::seconds(kTestDurationSec));
|
||||
run_params.video_codec_name = cricket::kVp8CodecName;
|
||||
run_params.use_flex_fec = false;
|
||||
run_params.use_ulp_fec = false;
|
||||
run_params.use_conference_mode = true;
|
||||
fixture->Run(std::move(run_params));
|
||||
}
|
||||
|
||||
// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on Win/Mac.
|
||||
#if !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
|
||||
TEST(PCFullStackTest, ScreenshareSlidesVP8_2TL_Simulcast_NoConferenceMode) {
|
||||
std::unique_ptr<NetworkEmulationManager> network_emulation_manager =
|
||||
CreateNetworkEmulationManager();
|
||||
auto fixture = CreateTestFixture(
|
||||
"pc_screenshare_slides_simulcast_no_conference_mode",
|
||||
CreateTwoNetworkLinks(network_emulation_manager.get(),
|
||||
BuiltInNetworkBehaviorConfig()),
|
||||
[](PeerConfigurer* alice) {
|
||||
VideoConfig video(1850, 1110, 60);
|
||||
video.screen_share_config = ScreenShareConfig(TimeDelta::seconds(10));
|
||||
video.simulcast_config = VideoSimulcastConfig(2, 0);
|
||||
video.stream_label = "alice-video";
|
||||
alice->AddVideoConfig(std::move(video));
|
||||
},
|
||||
[](PeerConfigurer* bob) {});
|
||||
RunParams run_params(TimeDelta::seconds(kTestDurationSec));
|
||||
run_params.video_codec_name = cricket::kVp8CodecName;
|
||||
run_params.use_flex_fec = false;
|
||||
run_params.use_ulp_fec = false;
|
||||
fixture->Run(std::move(run_params));
|
||||
}
|
||||
|
||||
TEST(PCFullStackTest, ScreenshareSlidesVP8_2TL_Simulcast) {
|
||||
std::unique_ptr<NetworkEmulationManager> network_emulation_manager =
|
||||
CreateNetworkEmulationManager();
|
||||
auto fixture = CreateTestFixture(
|
||||
"pc_screenshare_slides_simulcast",
|
||||
CreateTwoNetworkLinks(network_emulation_manager.get(),
|
||||
BuiltInNetworkBehaviorConfig()),
|
||||
[](PeerConfigurer* alice) {
|
||||
VideoConfig video(1850, 1110, 60);
|
||||
video.screen_share_config = ScreenShareConfig(TimeDelta::seconds(10));
|
||||
video.simulcast_config = VideoSimulcastConfig(2, 0);
|
||||
video.stream_label = "alice-video";
|
||||
alice->AddVideoConfig(std::move(video));
|
||||
},
|
||||
[](PeerConfigurer* bob) {});
|
||||
RunParams run_params(TimeDelta::seconds(kTestDurationSec));
|
||||
run_params.video_codec_name = cricket::kVp8CodecName;
|
||||
run_params.use_flex_fec = false;
|
||||
run_params.use_ulp_fec = false;
|
||||
run_params.use_conference_mode = true;
|
||||
fixture->Run(std::move(run_params));
|
||||
}
|
||||
#endif // !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
|
||||
|
||||
/*
|
||||
#if !defined(WEBRTC_MAC)
|
||||
// TODO(bugs.webrtc.org/9840): Investigate why is this test flaky on Win/Mac.
|
||||
#if !defined(WEBRTC_WIN)
|
||||
const char kScreenshareSimulcastVariableFramerateExperiment[] =
|
||||
"WebRTC-VP8VariableFramerateScreenshare/"
|
||||
"Enabled,min_fps:5.0,min_qp:15,undershoot:30/";
|
||||
// TODO(bugs.webrtc.org/10639) requires simulcast/SVC support in PC framework
|
||||
TEST(PCFullStackTest, ScreenshareSlidesVP8_2TL_Simulcast) {
|
||||
auto fixture = CreateVideoQualityTestFixture();
|
||||
ParamsWithLogging screenshare;
|
||||
screenshare.call.send_side_bwe = true;
|
||||
screenshare.screenshare[0] = {true, false, 10};
|
||||
screenshare.video[0] = {true, 1850, 1110, 30, 800000, 2500000,
|
||||
2500000, false, "VP8", 2, 1, 400000,
|
||||
false, false, false, ""};
|
||||
screenshare.analyzer = {"screenshare_slides_simulcast", 0.0, 0.0,
|
||||
kTestDurationSec};
|
||||
ParamsWithLogging screenshare_params_high;
|
||||
screenshare_params_high.video[0] = {
|
||||
true, 1850, 1110, 60, 600000, 1250000, 1250000, false,
|
||||
"VP8", 2, 0, 400000, false, false, false, ""};
|
||||
VideoQualityTest::Params screenshare_params_low;
|
||||
screenshare_params_low.video[0] = {true, 1850, 1110, 5, 30000, 200000,
|
||||
1000000, false, "VP8", 2, 0, 400000,
|
||||
false, false, false, ""};
|
||||
|
||||
std::vector<VideoStream> streams = {
|
||||
VideoQualityTest::DefaultVideoStream(screenshare_params_low, 0),
|
||||
VideoQualityTest::DefaultVideoStream(screenshare_params_high, 0)};
|
||||
screenshare.ss[0] = {
|
||||
streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
|
||||
false};
|
||||
fixture->RunWithAnalyzer(screenshare);
|
||||
}
|
||||
|
||||
// TODO(bugs.webrtc.org/10639) requires simulcast/SVC support in PC framework
|
||||
TEST(PCFullStackTest, ScreenshareSlidesVP8_2TL_Simulcast_Variable_Framerate) {
|
||||
test::ScopedFieldTrials field_trial(
|
||||
@ -1494,6 +1546,7 @@ TEST(PCFullStackTest, VP9KSVC_3SL_Medium_Network_Restricted_Trusted_Rate) {
|
||||
#endif // !defined(WEBRTC_MAC)
|
||||
|
||||
#endif // defined(RTC_ENABLE_VP9)
|
||||
*/
|
||||
|
||||
// Android bots can't handle FullHD, so disable the test.
|
||||
// TODO(bugs.webrtc.org/9220): Investigate source of flakiness on Mac.
|
||||
@ -1502,107 +1555,108 @@ TEST(PCFullStackTest, VP9KSVC_3SL_Medium_Network_Restricted_Trusted_Rate) {
|
||||
#else
|
||||
#define MAYBE_SimulcastFullHdOveruse SimulcastFullHdOveruse
|
||||
#endif
|
||||
// TODO(bugs.webrtc.org/10639) requires simulcast/SVC support in PC framework
|
||||
TEST(PCFullStackTest, MAYBE_SimulcastFullHdOveruse) {
|
||||
auto fixture = CreateVideoQualityTestFixture();
|
||||
ParamsWithLogging simulcast;
|
||||
simulcast.call.send_side_bwe = true;
|
||||
simulcast.video[0] = {true, 1920, 1080, 30, 800000, 2500000,
|
||||
2500000, false, "VP8", 3, 2, 400000,
|
||||
false, false, false, "Generator"};
|
||||
simulcast.analyzer = {"simulcast_HD_high", 0.0, 0.0, kTestDurationSec};
|
||||
simulcast.config->loss_percent = 0;
|
||||
simulcast.config->queue_delay_ms = 100;
|
||||
std::vector<VideoStream> streams = {
|
||||
VideoQualityTest::DefaultVideoStream(simulcast, 0),
|
||||
VideoQualityTest::DefaultVideoStream(simulcast, 0),
|
||||
VideoQualityTest::DefaultVideoStream(simulcast, 0)};
|
||||
simulcast.ss[0] = {
|
||||
streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
|
||||
true};
|
||||
webrtc::test::ScopedFieldTrials override_trials(AppendFieldTrials(
|
||||
"WebRTC-ForceSimulatedOveruseIntervalMs/1000-50000-300/"));
|
||||
fixture->RunWithAnalyzer(simulcast);
|
||||
std::unique_ptr<NetworkEmulationManager> network_emulation_manager =
|
||||
CreateNetworkEmulationManager();
|
||||
BuiltInNetworkBehaviorConfig config;
|
||||
config.loss_percent = 0;
|
||||
config.queue_delay_ms = 100;
|
||||
auto fixture = CreateTestFixture(
|
||||
"pc_simulcast_HD_high",
|
||||
CreateTwoNetworkLinks(network_emulation_manager.get(), config),
|
||||
[](PeerConfigurer* alice) {
|
||||
VideoConfig video(1920, 1080, 30);
|
||||
video.generator = VideoGeneratorType::kDefault;
|
||||
video.simulcast_config = VideoSimulcastConfig(3, 2);
|
||||
video.stream_label = "alice-video";
|
||||
alice->AddVideoConfig(std::move(video));
|
||||
},
|
||||
[](PeerConfigurer* bob) {});
|
||||
RunParams run_params(TimeDelta::seconds(kTestDurationSec));
|
||||
run_params.video_codec_name = cricket::kVp8CodecName;
|
||||
run_params.use_flex_fec = false;
|
||||
run_params.use_ulp_fec = false;
|
||||
fixture->Run(std::move(run_params));
|
||||
}
|
||||
|
||||
// TODO(bugs.webrtc.org/10639) requires simulcast/SVC support in PC framework
|
||||
TEST(PCFullStackTest, SimulcastVP8_3SL_High) {
|
||||
auto fixture = CreateVideoQualityTestFixture();
|
||||
ParamsWithLogging simulcast;
|
||||
simulcast.call.send_side_bwe = true;
|
||||
simulcast.video[0] = SimulcastVp8VideoHigh();
|
||||
simulcast.analyzer = {"simulcast_vp8_3sl_high", 0.0, 0.0, kTestDurationSec};
|
||||
simulcast.config->loss_percent = 0;
|
||||
simulcast.config->queue_delay_ms = 100;
|
||||
ParamsWithLogging video_params_high;
|
||||
video_params_high.video[0] = SimulcastVp8VideoHigh();
|
||||
ParamsWithLogging video_params_medium;
|
||||
video_params_medium.video[0] = SimulcastVp8VideoMedium();
|
||||
ParamsWithLogging video_params_low;
|
||||
video_params_low.video[0] = SimulcastVp8VideoLow();
|
||||
|
||||
std::vector<VideoStream> streams = {
|
||||
VideoQualityTest::DefaultVideoStream(video_params_low, 0),
|
||||
VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
|
||||
VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
|
||||
simulcast.ss[0] = {
|
||||
streams, 2, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
|
||||
false};
|
||||
fixture->RunWithAnalyzer(simulcast);
|
||||
std::unique_ptr<NetworkEmulationManager> network_emulation_manager =
|
||||
CreateNetworkEmulationManager();
|
||||
BuiltInNetworkBehaviorConfig config;
|
||||
config.loss_percent = 0;
|
||||
config.queue_delay_ms = 100;
|
||||
auto fixture = CreateTestFixture(
|
||||
"pc_simulcast_vp8_3sl_high",
|
||||
CreateTwoNetworkLinks(network_emulation_manager.get(), config),
|
||||
[](PeerConfigurer* alice) {
|
||||
VideoConfig video(1280, 720, 30);
|
||||
video.input_file_name =
|
||||
ClipNameToClipPath("ConferenceMotion_1280_720_50");
|
||||
video.simulcast_config = VideoSimulcastConfig(3, 2);
|
||||
video.stream_label = "alice-video";
|
||||
alice->AddVideoConfig(std::move(video));
|
||||
},
|
||||
[](PeerConfigurer* bob) {});
|
||||
RunParams run_params(TimeDelta::seconds(kTestDurationSec));
|
||||
run_params.video_codec_name = cricket::kVp8CodecName;
|
||||
run_params.use_flex_fec = false;
|
||||
run_params.use_ulp_fec = false;
|
||||
fixture->Run(std::move(run_params));
|
||||
}
|
||||
|
||||
// TODO(bugs.webrtc.org/10639) requires simulcast/SVC support in PC framework
|
||||
TEST(PCFullStackTest, SimulcastVP8_3SL_Medium) {
|
||||
auto fixture = CreateVideoQualityTestFixture();
|
||||
ParamsWithLogging simulcast;
|
||||
simulcast.call.send_side_bwe = true;
|
||||
simulcast.video[0] = SimulcastVp8VideoHigh();
|
||||
simulcast.analyzer = {"simulcast_vp8_3sl_medium", 0.0, 0.0, kTestDurationSec};
|
||||
simulcast.config->loss_percent = 0;
|
||||
simulcast.config->queue_delay_ms = 100;
|
||||
ParamsWithLogging video_params_high;
|
||||
video_params_high.video[0] = SimulcastVp8VideoHigh();
|
||||
ParamsWithLogging video_params_medium;
|
||||
video_params_medium.video[0] = SimulcastVp8VideoMedium();
|
||||
ParamsWithLogging video_params_low;
|
||||
video_params_low.video[0] = SimulcastVp8VideoLow();
|
||||
|
||||
std::vector<VideoStream> streams = {
|
||||
VideoQualityTest::DefaultVideoStream(video_params_low, 0),
|
||||
VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
|
||||
VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
|
||||
simulcast.ss[0] = {
|
||||
streams, 1, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
|
||||
false};
|
||||
fixture->RunWithAnalyzer(simulcast);
|
||||
std::unique_ptr<NetworkEmulationManager> network_emulation_manager =
|
||||
CreateNetworkEmulationManager();
|
||||
BuiltInNetworkBehaviorConfig config;
|
||||
config.loss_percent = 0;
|
||||
config.queue_delay_ms = 100;
|
||||
auto fixture = CreateTestFixture(
|
||||
"pc_simulcast_vp8_3sl_medium",
|
||||
CreateTwoNetworkLinks(network_emulation_manager.get(), config),
|
||||
[](PeerConfigurer* alice) {
|
||||
VideoConfig video(1280, 720, 30);
|
||||
video.input_file_name =
|
||||
ClipNameToClipPath("ConferenceMotion_1280_720_50");
|
||||
video.simulcast_config = VideoSimulcastConfig(3, 1);
|
||||
video.stream_label = "alice-video";
|
||||
alice->AddVideoConfig(std::move(video));
|
||||
},
|
||||
[](PeerConfigurer* bob) {});
|
||||
RunParams run_params(TimeDelta::seconds(kTestDurationSec));
|
||||
run_params.video_codec_name = cricket::kVp8CodecName;
|
||||
run_params.use_flex_fec = false;
|
||||
run_params.use_ulp_fec = false;
|
||||
fixture->Run(std::move(run_params));
|
||||
}
|
||||
|
||||
// TODO(bugs.webrtc.org/10639) requires simulcast/SVC support in PC framework
|
||||
TEST(PCFullStackTest, SimulcastVP8_3SL_Low) {
|
||||
auto fixture = CreateVideoQualityTestFixture();
|
||||
ParamsWithLogging simulcast;
|
||||
simulcast.call.send_side_bwe = true;
|
||||
simulcast.video[0] = SimulcastVp8VideoHigh();
|
||||
simulcast.analyzer = {"simulcast_vp8_3sl_low", 0.0, 0.0, kTestDurationSec};
|
||||
simulcast.config->loss_percent = 0;
|
||||
simulcast.config->queue_delay_ms = 100;
|
||||
ParamsWithLogging video_params_high;
|
||||
video_params_high.video[0] = SimulcastVp8VideoHigh();
|
||||
ParamsWithLogging video_params_medium;
|
||||
video_params_medium.video[0] = SimulcastVp8VideoMedium();
|
||||
ParamsWithLogging video_params_low;
|
||||
video_params_low.video[0] = SimulcastVp8VideoLow();
|
||||
|
||||
std::vector<VideoStream> streams = {
|
||||
VideoQualityTest::DefaultVideoStream(video_params_low, 0),
|
||||
VideoQualityTest::DefaultVideoStream(video_params_medium, 0),
|
||||
VideoQualityTest::DefaultVideoStream(video_params_high, 0)};
|
||||
simulcast.ss[0] = {
|
||||
streams, 0, 1, 0, InterLayerPredMode::kOn, std::vector<SpatialLayer>(),
|
||||
false};
|
||||
fixture->RunWithAnalyzer(simulcast);
|
||||
std::unique_ptr<NetworkEmulationManager> network_emulation_manager =
|
||||
CreateNetworkEmulationManager();
|
||||
BuiltInNetworkBehaviorConfig config;
|
||||
config.loss_percent = 0;
|
||||
config.queue_delay_ms = 100;
|
||||
auto fixture = CreateTestFixture(
|
||||
"pc_simulcast_vp8_3sl_low",
|
||||
CreateTwoNetworkLinks(network_emulation_manager.get(), config),
|
||||
[](PeerConfigurer* alice) {
|
||||
VideoConfig video(1280, 720, 30);
|
||||
video.input_file_name =
|
||||
ClipNameToClipPath("ConferenceMotion_1280_720_50");
|
||||
video.simulcast_config = VideoSimulcastConfig(3, 0);
|
||||
video.stream_label = "alice-video";
|
||||
alice->AddVideoConfig(std::move(video));
|
||||
},
|
||||
[](PeerConfigurer* bob) {});
|
||||
RunParams run_params(TimeDelta::seconds(kTestDurationSec));
|
||||
run_params.video_codec_name = cricket::kVp8CodecName;
|
||||
run_params.use_flex_fec = false;
|
||||
run_params.use_ulp_fec = false;
|
||||
fixture->Run(std::move(run_params));
|
||||
}
|
||||
|
||||
/*
|
||||
// This test assumes ideal network conditions with target bandwidth being
|
||||
// available and exercises WebRTC calls with a high target bitrate(100 Mbps).
|
||||
// Android32 bots can't handle this high bitrate, so disable test for those.
|
||||
|
Reference in New Issue
Block a user