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:
|
||||
|
||||
@ -170,8 +170,8 @@ if (!build_with_chromium) {
|
||||
]
|
||||
deps = [
|
||||
":encoded_image_data_injector_api",
|
||||
"../../../api:peer_connection_quality_test_fixture_api",
|
||||
"../../../api:video_quality_analyzer_api",
|
||||
"../../../api/test/pclf:media_configuration",
|
||||
"../../../api/video:encoded_image",
|
||||
"../../../api/video:video_frame",
|
||||
"../../../api/video:video_rtp_headers",
|
||||
@ -208,7 +208,7 @@ if (!build_with_chromium) {
|
||||
"analyzer/video/analyzing_video_sinks_helper.h",
|
||||
]
|
||||
deps = [
|
||||
"../../../api:peer_connection_quality_test_fixture_api",
|
||||
"../../../api/test/pclf:media_configuration",
|
||||
"../../../api/test/video:video_frame_writer",
|
||||
"../../../rtc_base:macromagic",
|
||||
"../../../rtc_base/synchronization:mutex",
|
||||
@ -231,9 +231,9 @@ if (!build_with_chromium) {
|
||||
":video_dumping",
|
||||
"../..:fixed_fps_video_frame_writer_adapter",
|
||||
"../..:test_renderer",
|
||||
"../../../api:peer_connection_quality_test_fixture_api",
|
||||
"../../../api:video_quality_analyzer_api",
|
||||
"../../../api/numerics",
|
||||
"../../../api/test/pclf:media_configuration",
|
||||
"../../../api/test/video:video_frame_writer",
|
||||
"../../../api/units:timestamp",
|
||||
"../../../api/video:video_frame",
|
||||
@ -268,9 +268,9 @@ if (!build_with_chromium) {
|
||||
"../..:fixed_fps_video_frame_writer_adapter",
|
||||
"../..:test_renderer",
|
||||
"../../../api:array_view",
|
||||
"../../../api:peer_connection_quality_test_fixture_api",
|
||||
"../../../api:stats_observer_interface",
|
||||
"../../../api:video_quality_analyzer_api",
|
||||
"../../../api/test/pclf:media_configuration",
|
||||
"../../../api/video:video_frame",
|
||||
"../../../api/video:video_rtp_headers",
|
||||
"../../../api/video_codecs:video_codecs_api",
|
||||
@ -297,7 +297,7 @@ if (!build_with_chromium) {
|
||||
"echo/echo_emulation.h",
|
||||
]
|
||||
deps = [
|
||||
"../../../api:peer_connection_quality_test_fixture_api",
|
||||
"../../../api/test/pclf:media_configuration",
|
||||
"../../../modules/audio_device:audio_device_impl",
|
||||
"../../../rtc_base:swap_queue",
|
||||
]
|
||||
@ -315,10 +315,10 @@ if (!build_with_chromium) {
|
||||
"../../../api:frame_generator_api",
|
||||
"../../../api:function_view",
|
||||
"../../../api:libjingle_peerconnection_api",
|
||||
"../../../api:peer_connection_quality_test_fixture_api",
|
||||
"../../../api:scoped_refptr",
|
||||
"../../../api:sequence_checker",
|
||||
"../../../api/task_queue:pending_task_safety_flag",
|
||||
"../../../api/test/pclf:media_configuration",
|
||||
"../../../api/test/pclf:media_quality_test_params",
|
||||
"../../../api/test/pclf:peer_configurer",
|
||||
"../../../modules/audio_processing:api",
|
||||
@ -352,6 +352,7 @@ if (!build_with_chromium) {
|
||||
"../../../api:time_controller",
|
||||
"../../../api/rtc_event_log:rtc_event_log_factory",
|
||||
"../../../api/task_queue:default_task_queue_factory",
|
||||
"../../../api/test/pclf:media_configuration",
|
||||
"../../../api/test/pclf:media_quality_test_params",
|
||||
"../../../api/test/pclf:peer_configurer",
|
||||
"../../../api/transport:field_trial_based_config",
|
||||
@ -388,7 +389,7 @@ if (!build_with_chromium) {
|
||||
"../../../api:create_frame_generator",
|
||||
"../../../api:frame_generator_api",
|
||||
"../../../api:media_stream_interface",
|
||||
"../../../api:peer_connection_quality_test_fixture_api",
|
||||
"../../../api/test/pclf:media_configuration",
|
||||
"../../../api/test/pclf:peer_configurer",
|
||||
"../../../api/video:video_frame",
|
||||
"../../../pc:session_description",
|
||||
@ -468,6 +469,7 @@ if (!build_with_chromium) {
|
||||
"../../../api/task_queue",
|
||||
"../../../api/test/metrics:metric",
|
||||
"../../../api/test/metrics:metrics_logger",
|
||||
"../../../api/test/pclf:media_configuration",
|
||||
"../../../api/test/pclf:media_quality_test_params",
|
||||
"../../../api/test/pclf:peer_configurer",
|
||||
"../../../api/units:time_delta",
|
||||
@ -519,7 +521,7 @@ if (!build_with_chromium) {
|
||||
deps = [
|
||||
":analyzing_video_sinks_helper",
|
||||
"../..:test_support",
|
||||
"../../../api:peer_connection_quality_test_fixture_api",
|
||||
"../../../api/test/pclf:media_configuration",
|
||||
]
|
||||
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
||||
}
|
||||
@ -535,8 +537,8 @@ if (!build_with_chromium) {
|
||||
"../..:video_test_support",
|
||||
"../../../api:create_frame_generator",
|
||||
"../../../api:frame_generator_api",
|
||||
"../../../api:peer_connection_quality_test_fixture_api",
|
||||
"../../../api:scoped_refptr",
|
||||
"../../../api/test/pclf:media_configuration",
|
||||
"../../../api/units:time_delta",
|
||||
"../../../api/units:timestamp",
|
||||
"../../../api/video:video_frame",
|
||||
@ -586,6 +588,8 @@ if (!build_with_chromium) {
|
||||
"../../../api/audio_codecs:builtin_audio_decoder_factory",
|
||||
"../../../api/audio_codecs:builtin_audio_encoder_factory",
|
||||
"../../../api/test/metrics:global_metrics_logger_and_exporter",
|
||||
"../../../api/test/pclf:media_configuration",
|
||||
"../../../api/test/pclf:media_quality_test_params",
|
||||
"../../../api/video_codecs:builtin_video_decoder_factory",
|
||||
"../../../api/video_codecs:builtin_video_encoder_factory",
|
||||
"../../../call:simulated_network",
|
||||
@ -626,6 +630,8 @@ if (!build_with_chromium) {
|
||||
"../../../api:peer_connection_quality_test_fixture_api",
|
||||
"../../../api/test/metrics:metrics_logger",
|
||||
"../../../api/test/metrics:stdout_metrics_exporter",
|
||||
"../../../api/test/pclf:media_configuration",
|
||||
"../../../api/test/pclf:media_quality_test_params",
|
||||
"../../../api/units:time_delta",
|
||||
]
|
||||
}
|
||||
@ -642,6 +648,8 @@ if (!build_with_chromium) {
|
||||
"../../../api:network_emulation_manager_api",
|
||||
"../../../api:peer_connection_quality_test_fixture_api",
|
||||
"../../../api/test/metrics:global_metrics_logger_and_exporter",
|
||||
"../../../api/test/pclf:media_configuration",
|
||||
"../../../api/test/pclf:media_quality_test_params",
|
||||
"../../../api/units:time_delta",
|
||||
"../../../rtc_base:timeutils",
|
||||
]
|
||||
@ -1082,8 +1090,8 @@ if (!build_with_chromium) {
|
||||
deps = [
|
||||
"../../../api:array_view",
|
||||
"../../../api:libjingle_peerconnection_api",
|
||||
"../../../api:peer_connection_quality_test_fixture_api",
|
||||
"../../../api:rtp_parameters",
|
||||
"../../../api/test/pclf:media_configuration",
|
||||
"../../../media:rtc_media_base",
|
||||
"../../../p2p:rtc_p2p",
|
||||
"../../../pc:sdp_utils",
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
#include "absl/memory/memory.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/test/video/video_frame_writer.h"
|
||||
#include "api/units/timestamp.h"
|
||||
#include "api/video/i420_buffer.h"
|
||||
@ -32,13 +32,6 @@
|
||||
namespace webrtc {
|
||||
namespace webrtc_pc_e2e {
|
||||
|
||||
using VideoSubscription = ::webrtc::webrtc_pc_e2e::
|
||||
PeerConnectionE2EQualityTestFixture::VideoSubscription;
|
||||
using VideoResolution = ::webrtc::webrtc_pc_e2e::
|
||||
PeerConnectionE2EQualityTestFixture::VideoResolution;
|
||||
using VideoConfig =
|
||||
::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
|
||||
|
||||
AnalyzingVideoSink::AnalyzingVideoSink(absl::string_view peer_name,
|
||||
Clock* clock,
|
||||
VideoQualityAnalyzerInterface& analyzer,
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "api/numerics/samples_stats_counter.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/test/video/video_frame_writer.h"
|
||||
#include "api/test/video_quality_analyzer_interface.h"
|
||||
#include "api/video/video_frame.h"
|
||||
@ -44,19 +44,15 @@ class AnalyzingVideoSink : public rtc::VideoSinkInterface<VideoFrame> {
|
||||
SamplesStatsCounter analyzing_sink_processing_time_ms;
|
||||
};
|
||||
|
||||
AnalyzingVideoSink(
|
||||
absl::string_view peer_name,
|
||||
Clock* clock,
|
||||
VideoQualityAnalyzerInterface& analyzer,
|
||||
AnalyzingVideoSinksHelper& sinks_helper,
|
||||
const PeerConnectionE2EQualityTestFixture::VideoSubscription&
|
||||
subscription,
|
||||
bool report_infra_stats);
|
||||
AnalyzingVideoSink(absl::string_view peer_name,
|
||||
Clock* clock,
|
||||
VideoQualityAnalyzerInterface& analyzer,
|
||||
AnalyzingVideoSinksHelper& sinks_helper,
|
||||
const VideoSubscription& subscription,
|
||||
bool report_infra_stats);
|
||||
|
||||
// Updates subscription used by this peer to render received video.
|
||||
void UpdateSubscription(
|
||||
const PeerConnectionE2EQualityTestFixture::VideoSubscription&
|
||||
subscription);
|
||||
void UpdateSubscription(const VideoSubscription& subscription);
|
||||
|
||||
void OnFrame(const VideoFrame& frame) override;
|
||||
|
||||
@ -64,16 +60,15 @@ class AnalyzingVideoSink : public rtc::VideoSinkInterface<VideoFrame> {
|
||||
|
||||
private:
|
||||
struct SinksDescriptor {
|
||||
SinksDescriptor(
|
||||
absl::string_view sender_peer_name,
|
||||
const PeerConnectionE2EQualityTestFixture::VideoResolution& resolution)
|
||||
SinksDescriptor(absl::string_view sender_peer_name,
|
||||
const VideoResolution& resolution)
|
||||
: sender_peer_name(sender_peer_name), resolution(resolution) {}
|
||||
|
||||
// Required to be able to resolve resolutions on new subscription and
|
||||
// understand if we need to recreate `video_frame_writer` and `sinks`.
|
||||
std::string sender_peer_name;
|
||||
// Resolution which was used to create `video_frame_writer` and `sinks`.
|
||||
PeerConnectionE2EQualityTestFixture::VideoResolution resolution;
|
||||
VideoResolution resolution;
|
||||
|
||||
// Is set if dumping of output video was requested;
|
||||
test::VideoFrameWriter* video_frame_writer = nullptr;
|
||||
@ -82,10 +77,9 @@ class AnalyzingVideoSink : public rtc::VideoSinkInterface<VideoFrame> {
|
||||
|
||||
// Scales video frame to `required_resolution` if necessary. Crashes if video
|
||||
// frame and `required_resolution` have different aspect ratio.
|
||||
VideoFrame ScaleVideoFrame(
|
||||
const VideoFrame& frame,
|
||||
const PeerConnectionE2EQualityTestFixture::VideoResolution&
|
||||
required_resolution) RTC_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
|
||||
VideoFrame ScaleVideoFrame(const VideoFrame& frame,
|
||||
const VideoResolution& required_resolution)
|
||||
RTC_EXCLUSIVE_LOCKS_REQUIRED(mutex_);
|
||||
// Creates full copy of the frame to free any frame owned internal buffers
|
||||
// and passes created copy to analyzer. Uses `I420Buffer` to represent
|
||||
// frame content.
|
||||
@ -101,8 +95,7 @@ class AnalyzingVideoSink : public rtc::VideoSinkInterface<VideoFrame> {
|
||||
AnalyzingVideoSinksHelper* const sinks_helper_;
|
||||
|
||||
mutable Mutex mutex_;
|
||||
PeerConnectionE2EQualityTestFixture::VideoSubscription subscription_
|
||||
RTC_GUARDED_BY(mutex_);
|
||||
VideoSubscription subscription_ RTC_GUARDED_BY(mutex_);
|
||||
std::map<std::string, SinksDescriptor> stream_sinks_ RTC_GUARDED_BY(mutex_);
|
||||
Stats stats_ RTC_GUARDED_BY(mutex_);
|
||||
};
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
#include "api/scoped_refptr.h"
|
||||
#include "api/test/create_frame_generator.h"
|
||||
#include "api/test/frame_generator_interface.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/units/time_delta.h"
|
||||
#include "api/units/timestamp.h"
|
||||
#include "api/video/i420_buffer.h"
|
||||
@ -43,15 +43,6 @@ using ::testing::Eq;
|
||||
using ::testing::Ge;
|
||||
using ::testing::Test;
|
||||
|
||||
using VideoConfig =
|
||||
::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
|
||||
using VideoSubscription = ::webrtc::webrtc_pc_e2e::
|
||||
PeerConnectionE2EQualityTestFixture::VideoSubscription;
|
||||
using VideoResolution = ::webrtc::webrtc_pc_e2e::
|
||||
PeerConnectionE2EQualityTestFixture::VideoResolution;
|
||||
using VideoDumpOptions = ::webrtc::webrtc_pc_e2e::
|
||||
PeerConnectionE2EQualityTestFixture::VideoDumpOptions;
|
||||
|
||||
// Remove files and directories in a directory non-recursively.
|
||||
void CleanDir(absl::string_view dir, size_t expected_output_files_count) {
|
||||
absl::optional<std::vector<std::string>> dir_content =
|
||||
|
||||
@ -15,16 +15,13 @@
|
||||
#include <utility>
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/test/video/video_frame_writer.h"
|
||||
#include "rtc_base/synchronization/mutex.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace webrtc_pc_e2e {
|
||||
|
||||
using VideoConfig =
|
||||
::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
|
||||
|
||||
void AnalyzingVideoSinksHelper::AddConfig(absl::string_view sender_peer_name,
|
||||
VideoConfig config) {
|
||||
MutexLock lock(&mutex_);
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/test/video/video_frame_writer.h"
|
||||
#include "rtc_base/synchronization/mutex.h"
|
||||
#include "rtc_base/thread_annotations.h"
|
||||
@ -34,11 +34,9 @@ class AnalyzingVideoSinksHelper {
|
||||
public:
|
||||
// Adds config in the registry. If config with such stream label was
|
||||
// registered before, the new value will override the old one.
|
||||
void AddConfig(absl::string_view sender_peer_name,
|
||||
PeerConnectionE2EQualityTestFixture::VideoConfig config);
|
||||
absl::optional<
|
||||
std::pair<std::string, PeerConnectionE2EQualityTestFixture::VideoConfig>>
|
||||
GetPeerAndConfig(absl::string_view stream_label);
|
||||
void AddConfig(absl::string_view sender_peer_name, VideoConfig config);
|
||||
absl::optional<std::pair<std::string, VideoConfig>> GetPeerAndConfig(
|
||||
absl::string_view stream_label);
|
||||
// Removes video config for specified stream label. If there are no know video
|
||||
// config for such stream label - does nothing.
|
||||
void RemoveConfig(absl::string_view stream_label);
|
||||
@ -63,10 +61,8 @@ class AnalyzingVideoSinksHelper {
|
||||
|
||||
private:
|
||||
Mutex mutex_;
|
||||
std::map<
|
||||
std::string,
|
||||
std::pair<std::string, PeerConnectionE2EQualityTestFixture::VideoConfig>>
|
||||
video_configs_ RTC_GUARDED_BY(mutex_);
|
||||
std::map<std::string, std::pair<std::string, VideoConfig>> video_configs_
|
||||
RTC_GUARDED_BY(mutex_);
|
||||
std::list<std::unique_ptr<test::VideoFrameWriter>> video_writers_
|
||||
RTC_GUARDED_BY(mutex_);
|
||||
};
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
|
||||
@ -24,9 +24,6 @@ namespace {
|
||||
|
||||
using ::testing::Eq;
|
||||
|
||||
using VideoConfig =
|
||||
::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
|
||||
|
||||
// Asserts equality of the main fields of the video config. We don't compare
|
||||
// the full config due to the lack of equality definition for a lot of subtypes.
|
||||
void AssertConfigsAreEquals(const VideoConfig& actual,
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/test/video_quality_analyzer_interface.h"
|
||||
#include "api/video/video_frame.h"
|
||||
#include "api/video_codecs/sdp_video_format.h"
|
||||
@ -50,9 +50,8 @@ namespace webrtc_pc_e2e {
|
||||
class QualityAnalyzingVideoEncoder : public VideoEncoder,
|
||||
public EncodedImageCallback {
|
||||
public:
|
||||
using EmulatedSFUConfigMap = std::map<
|
||||
std::string,
|
||||
absl::optional<PeerConnectionE2EQualityTestFixture::EmulatedSFUConfig>>;
|
||||
using EmulatedSFUConfigMap =
|
||||
std::map<std::string, absl::optional<EmulatedSFUConfig>>;
|
||||
|
||||
QualityAnalyzingVideoEncoder(absl::string_view peer_name,
|
||||
std::unique_ptr<VideoEncoder> delegate,
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
#include "absl/memory/memory.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "api/array_view.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/video/i420_buffer.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/logging.h"
|
||||
@ -38,8 +39,6 @@ namespace {
|
||||
|
||||
using EmulatedSFUConfigMap =
|
||||
::webrtc::webrtc_pc_e2e::QualityAnalyzingVideoEncoder::EmulatedSFUConfigMap;
|
||||
using VideoSubscription = ::webrtc::webrtc_pc_e2e::
|
||||
PeerConnectionE2EQualityTestFixture::VideoSubscription;
|
||||
|
||||
class AnalyzingFramePreprocessor
|
||||
: public test::TestVideoCapturer::FramePreprocessor {
|
||||
@ -150,7 +149,7 @@ VideoQualityAnalyzerInjectionHelper::CreateVideoSink(
|
||||
std::unique_ptr<AnalyzingVideoSink>
|
||||
VideoQualityAnalyzerInjectionHelper::CreateVideoSink(
|
||||
absl::string_view peer_name,
|
||||
const PeerConnectionE2EQualityTestFixture::VideoSubscription& subscription,
|
||||
const VideoSubscription& subscription,
|
||||
bool report_infra_metrics) {
|
||||
return std::make_unique<AnalyzingVideoSink>(peer_name, clock_, *analyzer_,
|
||||
sinks_helper_, subscription,
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "api/array_view.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/test/stats_observer_interface.h"
|
||||
#include "api/test/video_quality_analyzer_interface.h"
|
||||
#include "api/video/video_frame.h"
|
||||
@ -43,7 +43,7 @@ namespace webrtc_pc_e2e {
|
||||
// VideoQualityAnalyzerInterface into PeerConnection pipeline.
|
||||
class VideoQualityAnalyzerInjectionHelper : public StatsObserverInterface {
|
||||
public:
|
||||
using VideoConfig = PeerConnectionE2EQualityTestFixture::VideoConfig;
|
||||
using VideoConfig = ::webrtc::webrtc_pc_e2e::VideoConfig;
|
||||
|
||||
VideoQualityAnalyzerInjectionHelper(
|
||||
Clock* clock,
|
||||
@ -83,8 +83,7 @@ class VideoQualityAnalyzerInjectionHelper : public StatsObserverInterface {
|
||||
// TODO(titovartem): Remove default value for `report_infra_metrics`.
|
||||
std::unique_ptr<AnalyzingVideoSink> CreateVideoSink(
|
||||
absl::string_view peer_name,
|
||||
const PeerConnectionE2EQualityTestFixture::VideoSubscription&
|
||||
subscription,
|
||||
const VideoSubscription& subscription,
|
||||
bool report_infra_metrics = false);
|
||||
|
||||
void Start(std::string test_case_name,
|
||||
|
||||
@ -12,6 +12,8 @@
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace webrtc_pc_e2e {
|
||||
namespace {
|
||||
@ -22,7 +24,7 @@ constexpr int kSingleBufferDurationMs = 10;
|
||||
|
||||
EchoEmulatingCapturer::EchoEmulatingCapturer(
|
||||
std::unique_ptr<TestAudioDeviceModule::Capturer> capturer,
|
||||
PeerConnectionE2EQualityTestFixture::EchoEmulationConfig config)
|
||||
EchoEmulationConfig config)
|
||||
: delegate_(std::move(capturer)),
|
||||
config_(config),
|
||||
renderer_queue_(2 * config_.echo_delay.ms() / kSingleBufferDurationMs),
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "modules/audio_device/include/test_audio_device.h"
|
||||
#include "rtc_base/swap_queue.h"
|
||||
|
||||
@ -29,7 +29,7 @@ class EchoEmulatingCapturer : public TestAudioDeviceModule::Capturer {
|
||||
public:
|
||||
EchoEmulatingCapturer(
|
||||
std::unique_ptr<TestAudioDeviceModule::Capturer> capturer,
|
||||
PeerConnectionE2EQualityTestFixture::EchoEmulationConfig config);
|
||||
EchoEmulationConfig config);
|
||||
|
||||
void OnAudioRendered(rtc::ArrayView<const int16_t> data);
|
||||
|
||||
@ -41,7 +41,7 @@ class EchoEmulatingCapturer : public TestAudioDeviceModule::Capturer {
|
||||
|
||||
private:
|
||||
std::unique_ptr<TestAudioDeviceModule::Capturer> delegate_;
|
||||
const PeerConnectionE2EQualityTestFixture::EchoEmulationConfig config_;
|
||||
const EchoEmulationConfig config_;
|
||||
|
||||
SwapQueue<std::vector<int16_t>> renderer_queue_;
|
||||
|
||||
|
||||
@ -15,22 +15,13 @@
|
||||
#include "absl/types/variant.h"
|
||||
#include "api/media_stream_interface.h"
|
||||
#include "api/test/create_frame_generator.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "test/frame_generator_capturer.h"
|
||||
#include "test/platform_video_capturer.h"
|
||||
#include "test/testsupport/file_utils.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace webrtc_pc_e2e {
|
||||
namespace {
|
||||
|
||||
using VideoConfig =
|
||||
::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
|
||||
using AudioConfig =
|
||||
::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::AudioConfig;
|
||||
using CapturingDeviceIndex = ::webrtc::webrtc_pc_e2e::
|
||||
PeerConnectionE2EQualityTestFixture::CapturingDeviceIndex;
|
||||
|
||||
} // namespace
|
||||
|
||||
void MediaHelper::MaybeAddAudio(TestPeer* peer) {
|
||||
if (!peer->params().audio_config) {
|
||||
|
||||
@ -15,8 +15,8 @@
|
||||
#include <vector>
|
||||
|
||||
#include "api/test/frame_generator_interface.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/test/pclf/peer_configurer.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "test/pc/e2e/analyzer/video/video_quality_analyzer_injection_helper.h"
|
||||
#include "test/pc/e2e/media/test_video_capturer_video_track_source.h"
|
||||
#include "test/pc/e2e/test_peer.h"
|
||||
@ -42,7 +42,7 @@ class MediaHelper {
|
||||
|
||||
private:
|
||||
std::unique_ptr<test::TestVideoCapturer> CreateVideoCapturer(
|
||||
const PeerConnectionE2EQualityTestFixture::VideoConfig& video_config,
|
||||
const VideoConfig& video_config,
|
||||
PeerConfigurerImpl::VideoSource source,
|
||||
std::unique_ptr<test::TestVideoCapturer::FramePreprocessor>
|
||||
frame_preprocessor);
|
||||
|
||||
@ -18,6 +18,8 @@
|
||||
#include "api/test/create_peerconnection_quality_test_fixture.h"
|
||||
#include "api/test/metrics/global_metrics_logger_and_exporter.h"
|
||||
#include "api/test/network_emulation_manager.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/test/pclf/media_quality_test_params.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "call/simulated_network.h"
|
||||
#include "system_wrappers/include/field_trial.h"
|
||||
@ -39,21 +41,7 @@ namespace {
|
||||
|
||||
class PeerConnectionE2EQualityTestSmokeTest : public ::testing::Test {
|
||||
public:
|
||||
using EmulatedSFUConfig =
|
||||
PeerConnectionE2EQualityTestFixture::EmulatedSFUConfig;
|
||||
using PeerConfigurer = PeerConnectionE2EQualityTestFixture::PeerConfigurer;
|
||||
using RunParams = PeerConnectionE2EQualityTestFixture::RunParams;
|
||||
using VideoConfig = PeerConnectionE2EQualityTestFixture::VideoConfig;
|
||||
using VideoCodecConfig =
|
||||
PeerConnectionE2EQualityTestFixture::VideoCodecConfig;
|
||||
using AudioConfig = PeerConnectionE2EQualityTestFixture::AudioConfig;
|
||||
using ScreenShareConfig =
|
||||
PeerConnectionE2EQualityTestFixture::ScreenShareConfig;
|
||||
using ScrollingParams = PeerConnectionE2EQualityTestFixture::ScrollingParams;
|
||||
using VideoSimulcastConfig =
|
||||
PeerConnectionE2EQualityTestFixture::VideoSimulcastConfig;
|
||||
using EchoEmulationConfig =
|
||||
PeerConnectionE2EQualityTestFixture::EchoEmulationConfig;
|
||||
|
||||
void SetUp() override {
|
||||
network_emulation_ = CreateNetworkEmulationManager();
|
||||
@ -400,8 +388,8 @@ TEST_F(PeerConnectionE2EQualityTestSmokeTest, MAYBE_Screenshare) {
|
||||
screenshare.content_hint = VideoTrackInterface::ContentHint::kText;
|
||||
ScreenShareConfig screen_share_config =
|
||||
ScreenShareConfig(TimeDelta::Seconds(2));
|
||||
screen_share_config.scrolling_params = ScrollingParams(
|
||||
TimeDelta::Millis(1800), kDefaultSlidesWidth, kDefaultSlidesHeight);
|
||||
screen_share_config.scrolling_params =
|
||||
ScrollingParams{.duration = TimeDelta::Millis(1800)};
|
||||
auto screen_share_frame_generator =
|
||||
CreateScreenShareFrameGenerator(screenshare, screen_share_config);
|
||||
alice->AddVideoConfig(std::move(screenshare),
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
#include "api/rtc_event_log_output_file.h"
|
||||
#include "api/scoped_refptr.h"
|
||||
#include "api/test/metrics/metric.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/test/time_controller.h"
|
||||
#include "api/test/video_quality_analyzer_interface.h"
|
||||
#include "pc/sdp_utils.h"
|
||||
@ -49,8 +50,6 @@ namespace {
|
||||
|
||||
using ::webrtc::test::ImprovementDirection;
|
||||
using ::webrtc::test::Unit;
|
||||
using VideoConfig =
|
||||
::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
|
||||
|
||||
constexpr TimeDelta kDefaultTimeout = TimeDelta::Seconds(10);
|
||||
constexpr char kSignalThreadName[] = "signaling_thread";
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
#include "api/task_queue/task_queue_factory.h"
|
||||
#include "api/test/audio_quality_analyzer_interface.h"
|
||||
#include "api/test/metrics/metrics_logger.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/test/pclf/media_quality_test_params.h"
|
||||
#include "api/test/pclf/peer_configurer.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
@ -44,10 +45,6 @@ namespace webrtc_pc_e2e {
|
||||
class PeerConnectionE2EQualityTest
|
||||
: public PeerConnectionE2EQualityTestFixture {
|
||||
public:
|
||||
using RunParams = PeerConnectionE2EQualityTestFixture::RunParams;
|
||||
using VideoConfig = PeerConnectionE2EQualityTestFixture::VideoConfig;
|
||||
using VideoSimulcastConfig =
|
||||
PeerConnectionE2EQualityTestFixture::VideoSimulcastConfig;
|
||||
using PeerConfigurer = PeerConnectionE2EQualityTestFixture::PeerConfigurer;
|
||||
using QualityMetricsReporter =
|
||||
PeerConnectionE2EQualityTestFixture::QualityMetricsReporter;
|
||||
|
||||
@ -17,6 +17,8 @@
|
||||
#include "api/test/metrics/metrics_logger.h"
|
||||
#include "api/test/metrics/stdout_metrics_exporter.h"
|
||||
#include "api/test/network_emulation_manager.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/test/pclf/media_quality_test_params.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "api/units/time_delta.h"
|
||||
#include "test/gmock.h"
|
||||
@ -37,16 +39,8 @@ using ::webrtc::test::Metric;
|
||||
using ::webrtc::test::MetricsExporter;
|
||||
using ::webrtc::test::StdoutMetricsExporter;
|
||||
using ::webrtc::test::Unit;
|
||||
using RunParams =
|
||||
::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::RunParams;
|
||||
using VideoConfig =
|
||||
::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
|
||||
using AudioConfig =
|
||||
::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::AudioConfig;
|
||||
using PeerConfigurer = ::webrtc::webrtc_pc_e2e::
|
||||
PeerConnectionE2EQualityTestFixture::PeerConfigurer;
|
||||
using VideoCodecConfig = ::webrtc::webrtc_pc_e2e::
|
||||
PeerConnectionE2EQualityTestFixture::VideoCodecConfig;
|
||||
|
||||
// Adds a peer with some audio and video (the client should not care about
|
||||
// details about audio and video configs).
|
||||
|
||||
@ -18,6 +18,8 @@
|
||||
#include "api/test/create_network_emulation_manager.h"
|
||||
#include "api/test/metrics/global_metrics_logger_and_exporter.h"
|
||||
#include "api/test/network_emulation_manager.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/test/pclf/media_quality_test_params.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "api/units/time_delta.h"
|
||||
#include "rtc_base/time_utils.h"
|
||||
@ -33,14 +35,8 @@ namespace {
|
||||
using ::testing::Eq;
|
||||
using ::testing::Test;
|
||||
|
||||
using RunParams =
|
||||
::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::RunParams;
|
||||
using VideoConfig =
|
||||
::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
|
||||
using PeerConfigurer = ::webrtc::webrtc_pc_e2e::
|
||||
PeerConnectionE2EQualityTestFixture::PeerConfigurer;
|
||||
using VideoDumpOptions = ::webrtc::webrtc_pc_e2e::
|
||||
PeerConnectionE2EQualityTestFixture::VideoDumpOptions;
|
||||
|
||||
// Remove files and directories in a directory non-recursively.
|
||||
void CleanDir(absl::string_view dir, size_t expected_output_files_count) {
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/jsep_session_description.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "media/base/media_constants.h"
|
||||
#include "p2p/base/p2p_constants.h"
|
||||
#include "pc/sdp_utils.h"
|
||||
@ -23,8 +24,6 @@ namespace webrtc {
|
||||
namespace webrtc_pc_e2e {
|
||||
namespace {
|
||||
|
||||
using VideoCodecConfig = PeerConnectionE2EQualityTestFixture::VideoCodecConfig;
|
||||
|
||||
std::string CodecRequiredParamsToString(
|
||||
const std::map<std::string, std::string>& codec_required_params) {
|
||||
rtc::StringBuilder out;
|
||||
@ -167,7 +166,7 @@ void SignalingInterceptor::FillSimulcastContext(
|
||||
|
||||
LocalAndRemoteSdp SignalingInterceptor::PatchOffer(
|
||||
std::unique_ptr<SessionDescriptionInterface> offer,
|
||||
const PeerConnectionE2EQualityTestFixture::VideoCodecConfig& first_codec) {
|
||||
const VideoCodecConfig& first_codec) {
|
||||
for (auto& content : offer->description()->contents()) {
|
||||
context_.mids_order.push_back(content.mid());
|
||||
cricket::MediaContentDescription* media_desc = content.media_description();
|
||||
@ -364,7 +363,7 @@ LocalAndRemoteSdp SignalingInterceptor::PatchVp9Offer(
|
||||
|
||||
LocalAndRemoteSdp SignalingInterceptor::PatchAnswer(
|
||||
std::unique_ptr<SessionDescriptionInterface> answer,
|
||||
const PeerConnectionE2EQualityTestFixture::VideoCodecConfig& first_codec) {
|
||||
const VideoCodecConfig& first_codec) {
|
||||
for (auto& content : answer->description()->contents()) {
|
||||
cricket::MediaContentDescription* media_desc = content.media_description();
|
||||
if (media_desc->type() != cricket::MediaType::MEDIA_TYPE_VIDEO) {
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
#include "api/array_view.h"
|
||||
#include "api/jsep.h"
|
||||
#include "api/rtp_parameters.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "media/base/rid_description.h"
|
||||
#include "pc/session_description.h"
|
||||
#include "pc/simulcast_description.h"
|
||||
@ -40,8 +40,7 @@ namespace webrtc_pc_e2e {
|
||||
// vector and they will be added in the same order, as they were in
|
||||
// `supported_codecs`.
|
||||
std::vector<RtpCodecCapability> FilterVideoCodecCapabilities(
|
||||
rtc::ArrayView<const PeerConnectionE2EQualityTestFixture::VideoCodecConfig>
|
||||
video_codecs,
|
||||
rtc::ArrayView<const VideoCodecConfig> video_codecs,
|
||||
bool use_rtx,
|
||||
bool use_ulpfec,
|
||||
bool use_flexfec,
|
||||
@ -77,10 +76,10 @@ class SignalingInterceptor {
|
||||
|
||||
LocalAndRemoteSdp PatchOffer(
|
||||
std::unique_ptr<SessionDescriptionInterface> offer,
|
||||
const PeerConnectionE2EQualityTestFixture::VideoCodecConfig& first_codec);
|
||||
const VideoCodecConfig& first_codec);
|
||||
LocalAndRemoteSdp PatchAnswer(
|
||||
std::unique_ptr<SessionDescriptionInterface> answer,
|
||||
const PeerConnectionE2EQualityTestFixture::VideoCodecConfig& first_codec);
|
||||
const VideoCodecConfig& first_codec);
|
||||
|
||||
std::vector<std::unique_ptr<IceCandidateInterface>> PatchOffererIceCandidates(
|
||||
rtc::ArrayView<const IceCandidateInterface* const> candidates);
|
||||
|
||||
@ -15,17 +15,13 @@
|
||||
#include "absl/memory/memory.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "api/scoped_refptr.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "modules/audio_processing/include/audio_processing.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace webrtc_pc_e2e {
|
||||
namespace {
|
||||
|
||||
using VideoSubscription = ::webrtc::webrtc_pc_e2e::
|
||||
PeerConnectionE2EQualityTestFixture::VideoSubscription;
|
||||
using VideoConfig =
|
||||
::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
|
||||
|
||||
class SetRemoteDescriptionCallback
|
||||
: public webrtc::SetRemoteDescriptionObserverInterface {
|
||||
public:
|
||||
|
||||
@ -22,9 +22,9 @@
|
||||
#include "api/set_remote_description_observer_interface.h"
|
||||
#include "api/task_queue/pending_task_safety_flag.h"
|
||||
#include "api/test/frame_generator_interface.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/test/pclf/media_quality_test_params.h"
|
||||
#include "api/test/pclf/peer_configurer.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
#include "pc/peer_connection_wrapper.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/synchronization/mutex.h"
|
||||
@ -41,12 +41,11 @@ class TestPeer final : public StatsProvider {
|
||||
const Params& params() const { return params_; }
|
||||
|
||||
ConfigurableParams configurable_params() const;
|
||||
void AddVideoConfig(PeerConnectionE2EQualityTestFixture::VideoConfig config);
|
||||
void AddVideoConfig(VideoConfig config);
|
||||
// Removes video config with specified name. Crashes if the config with
|
||||
// specified name isn't found.
|
||||
void RemoveVideoConfig(absl::string_view stream_label);
|
||||
void SetVideoSubscription(
|
||||
PeerConnectionE2EQualityTestFixture::VideoSubscription subscription);
|
||||
void SetVideoSubscription(VideoSubscription subscription);
|
||||
|
||||
void GetStats(RTCStatsCollectorCallback* callback) override;
|
||||
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "api/task_queue/default_task_queue_factory.h"
|
||||
#include "api/test/create_time_controller.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/test/pclf/peer_configurer.h"
|
||||
#include "api/test/time_controller.h"
|
||||
#include "api/transport/field_trial_based_config.h"
|
||||
@ -33,12 +34,6 @@ namespace webrtc {
|
||||
namespace webrtc_pc_e2e {
|
||||
namespace {
|
||||
|
||||
using AudioConfig =
|
||||
::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::AudioConfig;
|
||||
using VideoConfig =
|
||||
::webrtc::webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture::VideoConfig;
|
||||
using EchoEmulationConfig = ::webrtc::webrtc_pc_e2e::
|
||||
PeerConnectionE2EQualityTestFixture::EchoEmulationConfig;
|
||||
using EmulatedSFUConfigMap =
|
||||
::webrtc::webrtc_pc_e2e::QualityAnalyzingVideoEncoder::EmulatedSFUConfigMap;
|
||||
|
||||
@ -298,8 +293,7 @@ std::unique_ptr<TestPeer> TestPeerFactory::CreateTestPeer(
|
||||
std::unique_ptr<PeerConfigurerImpl> configurer,
|
||||
std::unique_ptr<MockPeerConnectionObserver> observer,
|
||||
absl::optional<RemotePeerAudioConfig> remote_audio_config,
|
||||
absl::optional<PeerConnectionE2EQualityTestFixture::EchoEmulationConfig>
|
||||
echo_emulation_config) {
|
||||
absl::optional<EchoEmulationConfig> echo_emulation_config) {
|
||||
std::unique_ptr<InjectableComponents> components =
|
||||
configurer->ReleaseComponents();
|
||||
std::unique_ptr<Params> params = configurer->ReleaseParams();
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "api/rtc_event_log/rtc_event_log_factory.h"
|
||||
#include "api/test/pclf/media_configuration.h"
|
||||
#include "api/test/pclf/media_quality_test_params.h"
|
||||
#include "api/test/pclf/peer_configurer.h"
|
||||
#include "api/test/peerconnection_quality_test_fixture.h"
|
||||
@ -31,13 +32,12 @@ namespace webrtc {
|
||||
namespace webrtc_pc_e2e {
|
||||
|
||||
struct RemotePeerAudioConfig {
|
||||
explicit RemotePeerAudioConfig(
|
||||
PeerConnectionE2EQualityTestFixture::AudioConfig config)
|
||||
explicit RemotePeerAudioConfig(AudioConfig config)
|
||||
: sampling_frequency_in_hz(config.sampling_frequency_in_hz),
|
||||
output_file_name(config.output_dump_file_name) {}
|
||||
|
||||
static absl::optional<RemotePeerAudioConfig> Create(
|
||||
absl::optional<PeerConnectionE2EQualityTestFixture::AudioConfig> config);
|
||||
absl::optional<AudioConfig> config);
|
||||
|
||||
int sampling_frequency_in_hz;
|
||||
absl::optional<std::string> output_file_name;
|
||||
@ -70,8 +70,7 @@ class TestPeerFactory {
|
||||
std::unique_ptr<PeerConfigurerImpl> configurer,
|
||||
std::unique_ptr<MockPeerConnectionObserver> observer,
|
||||
absl::optional<RemotePeerAudioConfig> remote_audio_config,
|
||||
absl::optional<PeerConnectionE2EQualityTestFixture::EchoEmulationConfig>
|
||||
echo_emulation_config);
|
||||
absl::optional<EchoEmulationConfig> echo_emulation_config);
|
||||
|
||||
private:
|
||||
rtc::Thread* signaling_thread_;
|
||||
|
||||
Reference in New Issue
Block a user