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