Use classes from media_configuration.h instead of the ones in PeerConnectionE2EQualityTestFixture.
Classes defined inside the class PeerConnectionE2EQualityTestFixture are replaced by the ones define in media_configuration.h. Change-Id: I1c025ff10aacf8cbc3df9bfa742a40622fe0807a Bug: webrtc:14627 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/281860 Commit-Queue: Jeremy Leconte <jleconte@google.com> Reviewed-by: Artem Titov <titovartem@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#38568}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
c560d560a2
commit
0e2cf6cc01
@ -659,9 +659,9 @@ rtc_library("create_peer_connection_quality_test_frame_generator") {
|
||||
deps = [
|
||||
":create_frame_generator",
|
||||
":frame_generator_api",
|
||||
":peer_connection_quality_test_fixture_api",
|
||||
"../rtc_base:checks",
|
||||
"../test:fileutils",
|
||||
"test/pclf:media_configuration",
|
||||
]
|
||||
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
||||
}
|
||||
|
||||
@ -14,18 +14,13 @@
|
||||
#include <vector>
|
||||
|
||||
#include "api/test/create_frame_generator.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "test/testsupport/file_utils.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace webrtc_pc_e2e {
|
||||
|
||||
using VideoConfig =
|
||||
::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
|
||||
using ScreenShareConfig = ::webrtc::webrtc_pc_e2e::
|
||||
PeerConnectionE2EQualityTestFixture::ScreenShareConfig;
|
||||
|
||||
void ValidateScreenShareConfig(const VideoConfig& video_config,
|
||||
const ScreenShareConfig& screen_share_config) {
|
||||
if (screen_share_config.slides_yuv_file_names.empty()) {
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/test/frame_generator_interface.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace webrtc_pc_e2e {
|
||||
@ -25,19 +25,18 @@ namespace webrtc_pc_e2e {
|
||||
// FrameGeneratorInterface::OutputType::I420. video_config specifies frame
|
||||
// weight and height.
|
||||
std::unique_ptr<test::FrameGeneratorInterface> CreateSquareFrameGenerator(
|
||||
const PeerConnectionE2EQualityTestFixture::VideoConfig& video_config,
|
||||
const VideoConfig& video_config,
|
||||
absl::optional<test::FrameGeneratorInterface::OutputType> type);
|
||||
|
||||
// Creates a frame generator that plays frames from the yuv file.
|
||||
std::unique_ptr<test::FrameGeneratorInterface> CreateFromYuvFileFrameGenerator(
|
||||
const PeerConnectionE2EQualityTestFixture::VideoConfig& video_config,
|
||||
const VideoConfig& video_config,
|
||||
std::string filename);
|
||||
|
||||
// Creates a proper frame generator for testing screen sharing.
|
||||
std::unique_ptr<test::FrameGeneratorInterface> CreateScreenShareFrameGenerator(
|
||||
const PeerConnectionE2EQualityTestFixture::VideoConfig& video_config,
|
||||
const PeerConnectionE2EQualityTestFixture::ScreenShareConfig&
|
||||
screen_share_config);
|
||||
const VideoConfig& video_config,
|
||||
const ScreenShareConfig& screen_share_config);
|
||||
|
||||
} // namespace webrtc_pc_e2e
|
||||
} // namespace webrtc
|
||||
|
||||
@ -88,6 +88,7 @@ rtc_library("peer_configurer") {
|
||||
"peer_configurer.h",
|
||||
]
|
||||
deps = [
|
||||
":media_configuration",
|
||||
":media_quality_test_params",
|
||||
"../../../api:callfactory_api",
|
||||
"../../../api:create_peer_connection_quality_test_frame_generator",
|
||||
|
||||
@ -44,14 +44,6 @@ void AppendResolution(const VideoResolution& resolution,
|
||||
|
||||
} // namespace
|
||||
|
||||
ScrollingParams::ScrollingParams(TimeDelta duration,
|
||||
size_t source_width,
|
||||
size_t source_height)
|
||||
: duration(duration),
|
||||
source_width(source_width),
|
||||
source_height(source_height) {
|
||||
RTC_CHECK_GT(duration.ms(), 0);
|
||||
}
|
||||
ScreenShareConfig::ScreenShareConfig(TimeDelta slide_change_interval)
|
||||
: slide_change_interval(slide_change_interval) {
|
||||
RTC_CHECK_GT(slide_change_interval.ms(), 0);
|
||||
|
||||
@ -58,6 +58,9 @@
|
||||
namespace webrtc {
|
||||
namespace webrtc_pc_e2e {
|
||||
|
||||
constexpr size_t kDefaultSlidesWidth = 1850;
|
||||
constexpr size_t kDefaultSlidesHeight = 1110;
|
||||
|
||||
// The index of required capturing device in OS provided list of video
|
||||
// devices. On Linux and Windows the list will be obtained via
|
||||
// webrtc::VideoCaptureModule::DeviceInfo, on Mac OS via
|
||||
@ -83,16 +86,12 @@ enum class CapturingDeviceIndex : size_t {};
|
||||
// `duration` must be less or equal to
|
||||
// `ScreenShareConfig::slide_change_interval`.
|
||||
struct ScrollingParams {
|
||||
ScrollingParams(TimeDelta duration,
|
||||
size_t source_width,
|
||||
size_t source_height);
|
||||
|
||||
// Duration of scrolling.
|
||||
TimeDelta duration;
|
||||
// Width of source slides video.
|
||||
size_t source_width;
|
||||
size_t source_width = kDefaultSlidesWidth;
|
||||
// Height of source slides video.
|
||||
size_t source_height;
|
||||
size_t source_height = kDefaultSlidesHeight;
|
||||
};
|
||||
|
||||
// Contains screen share video stream properties.
|
||||
|
||||
@ -13,6 +13,8 @@
|
||||
#include <set>
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/test/pclf/media_quality_test_params.h"
|
||||
#include "api/test/peer_network_dependencies.h"
|
||||
#include "modules/video_coding/svc/create_scalability_structure.h"
|
||||
#include "modules/video_coding/svc/scalability_mode_util.h"
|
||||
@ -23,10 +25,6 @@ namespace webrtc {
|
||||
namespace webrtc_pc_e2e {
|
||||
namespace {
|
||||
|
||||
using AudioConfig = PeerConnectionE2EQualityTestFixture::AudioConfig;
|
||||
using VideoConfig = PeerConnectionE2EQualityTestFixture::VideoConfig;
|
||||
using RunParams = PeerConnectionE2EQualityTestFixture::RunParams;
|
||||
using VideoCodecConfig = PeerConnectionE2EQualityTestFixture::VideoCodecConfig;
|
||||
using PeerConfigurer = PeerConnectionE2EQualityTestFixture::PeerConfigurer;
|
||||
|
||||
// List of default names of generic participants according to
|
||||
@ -111,34 +109,31 @@ PeerConfigurer* PeerConfigurerImpl::SetSSLCertificateVerifier(
|
||||
return this;
|
||||
}
|
||||
|
||||
PeerConfigurer* PeerConfigurerImpl::AddVideoConfig(
|
||||
PeerConnectionE2EQualityTestFixture::VideoConfig config) {
|
||||
PeerConfigurer* PeerConfigurerImpl::AddVideoConfig(VideoConfig config) {
|
||||
video_sources_.push_back(
|
||||
CreateSquareFrameGenerator(config, /*type=*/absl::nullopt));
|
||||
configurable_params_->video_configs.push_back(std::move(config));
|
||||
return this;
|
||||
}
|
||||
PeerConfigurer* PeerConfigurerImpl::AddVideoConfig(
|
||||
PeerConnectionE2EQualityTestFixture::VideoConfig config,
|
||||
VideoConfig config,
|
||||
std::unique_ptr<test::FrameGeneratorInterface> generator) {
|
||||
configurable_params_->video_configs.push_back(std::move(config));
|
||||
video_sources_.push_back(std::move(generator));
|
||||
return this;
|
||||
}
|
||||
PeerConfigurer* PeerConfigurerImpl::AddVideoConfig(
|
||||
PeerConnectionE2EQualityTestFixture::VideoConfig config,
|
||||
PeerConnectionE2EQualityTestFixture::CapturingDeviceIndex index) {
|
||||
PeerConfigurer* PeerConfigurerImpl::AddVideoConfig(VideoConfig config,
|
||||
CapturingDeviceIndex index) {
|
||||
configurable_params_->video_configs.push_back(std::move(config));
|
||||
video_sources_.push_back(index);
|
||||
return this;
|
||||
}
|
||||
PeerConfigurer* PeerConfigurerImpl::SetVideoSubscription(
|
||||
PeerConnectionE2EQualityTestFixture::VideoSubscription subscription) {
|
||||
VideoSubscription subscription) {
|
||||
configurable_params_->video_subscription = std::move(subscription);
|
||||
return this;
|
||||
}
|
||||
PeerConfigurer* PeerConfigurerImpl::SetAudioConfig(
|
||||
PeerConnectionE2EQualityTestFixture::AudioConfig config) {
|
||||
PeerConfigurer* PeerConfigurerImpl::SetAudioConfig(AudioConfig config) {
|
||||
params_->audio_config = std::move(config);
|
||||
return this;
|
||||
}
|
||||
@ -200,8 +195,7 @@ PeerConfigurer* PeerConfigurerImpl::SetBitrateSettings(
|
||||
return this;
|
||||
}
|
||||
PeerConfigurer* PeerConfigurerImpl::SetVideoCodecs(
|
||||
std::vector<PeerConnectionE2EQualityTestFixture::VideoCodecConfig>
|
||||
video_codecs) {
|
||||
std::vector<VideoCodecConfig> video_codecs) {
|
||||
params_->video_codecs = std::move(video_codecs);
|
||||
return this;
|
||||
}
|
||||
@ -301,9 +295,7 @@ void PeerParamsPreprocessor::SetDefaultValuesForMissingParams(
|
||||
}
|
||||
|
||||
if (params->video_codecs.empty()) {
|
||||
params->video_codecs.push_back(
|
||||
PeerConnectionE2EQualityTestFixture::VideoCodecConfig(
|
||||
cricket::kVp8CodecName));
|
||||
params->video_codecs.push_back(VideoCodecConfig(cricket::kVp8CodecName));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
#include "api/rtc_event_log/rtc_event_log_factory_interface.h"
|
||||
#include "api/task_queue/task_queue_factory.h"
|
||||
#include "api/test/create_peer_connection_quality_test_frame_generator.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/test/pclf/media_quality_test_params.h"
|
||||
#include "api/test/peer_network_dependencies.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
@ -45,7 +46,7 @@ class PeerConfigurerImpl final
|
||||
public:
|
||||
using VideoSource =
|
||||
absl::variant<std::unique_ptr<test::FrameGeneratorInterface>,
|
||||
PeerConnectionE2EQualityTestFixture::CapturingDeviceIndex>;
|
||||
CapturingDeviceIndex>;
|
||||
|
||||
explicit PeerConfigurerImpl(
|
||||
const PeerNetworkDependencies& network_dependencies);
|
||||
@ -116,25 +117,21 @@ class PeerConfigurerImpl final
|
||||
|
||||
// Add new video stream to the call that will be sent from this peer.
|
||||
// Default implementation of video frames generator will be used.
|
||||
PeerConfigurer* AddVideoConfig(
|
||||
PeerConnectionE2EQualityTestFixture::VideoConfig config) override;
|
||||
PeerConfigurer* AddVideoConfig(VideoConfig config) override;
|
||||
// Add new video stream to the call that will be sent from this peer with
|
||||
// provided own implementation of video frames generator.
|
||||
PeerConfigurer* AddVideoConfig(
|
||||
PeerConnectionE2EQualityTestFixture::VideoConfig config,
|
||||
VideoConfig config,
|
||||
std::unique_ptr<test::FrameGeneratorInterface> generator) override;
|
||||
// Add new video stream to the call that will be sent from this peer.
|
||||
// Capturing device with specified index will be used to get input video.
|
||||
PeerConfigurer* AddVideoConfig(
|
||||
PeerConnectionE2EQualityTestFixture::VideoConfig config,
|
||||
PeerConnectionE2EQualityTestFixture::CapturingDeviceIndex
|
||||
capturing_device_index) override;
|
||||
VideoConfig config,
|
||||
CapturingDeviceIndex capturing_device_index) override;
|
||||
// Sets video subscription for the peer. By default subscription will
|
||||
// include all streams with `VideoSubscription::kSameAsSendStream`
|
||||
// resolution. To override this behavior use this method.
|
||||
PeerConfigurer* SetVideoSubscription(
|
||||
PeerConnectionE2EQualityTestFixture::VideoSubscription subscription)
|
||||
override;
|
||||
PeerConfigurer* SetVideoSubscription(VideoSubscription subscription) override;
|
||||
// Set the list of video codecs used by the peer during the test. These
|
||||
// codecs will be negotiated in SDP during offer/answer exchange. The order
|
||||
// of these codecs during negotiation will be the same as in `video_codecs`.
|
||||
@ -142,12 +139,10 @@ class PeerConfigurerImpl final
|
||||
// be negotiated. If some of specified codecs won't be found, the test will
|
||||
// crash.
|
||||
PeerConfigurer* SetVideoCodecs(
|
||||
std::vector<PeerConnectionE2EQualityTestFixture::VideoCodecConfig>
|
||||
video_codecs) override;
|
||||
std::vector<VideoCodecConfig> video_codecs) override;
|
||||
// Set the audio stream for the call from this peer. If this method won't
|
||||
// be invoked, this peer will send no audio.
|
||||
PeerConfigurer* SetAudioConfig(
|
||||
PeerConnectionE2EQualityTestFixture::AudioConfig config) override;
|
||||
PeerConfigurer* SetAudioConfig(AudioConfig config) override;
|
||||
|
||||
// Set if ULP FEC should be used or not. False by default.
|
||||
PeerConfigurer* SetUseUlpFEC(bool value) override;
|
||||
|
||||
@ -60,9 +60,6 @@
|
||||
namespace webrtc {
|
||||
namespace webrtc_pc_e2e {
|
||||
|
||||
constexpr size_t kDefaultSlidesWidth = 1850;
|
||||
constexpr size_t kDefaultSlidesHeight = 1110;
|
||||
|
||||
// API is in development. Can be changed/removed without notice.
|
||||
class PeerConnectionE2EQualityTestFixture {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user