diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/libwebrtc/pc/peer_connection_field_trial_tests.cc | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/pc/peer_connection_field_trial_tests.cc')
-rw-r--r-- | third_party/libwebrtc/pc/peer_connection_field_trial_tests.cc | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/third_party/libwebrtc/pc/peer_connection_field_trial_tests.cc b/third_party/libwebrtc/pc/peer_connection_field_trial_tests.cc index 7799c9d6e3..4cbe24986c 100644 --- a/third_party/libwebrtc/pc/peer_connection_field_trial_tests.cc +++ b/third_party/libwebrtc/pc/peer_connection_field_trial_tests.cc @@ -16,13 +16,13 @@ #include "api/audio_codecs/builtin_audio_decoder_factory.h" #include "api/audio_codecs/builtin_audio_encoder_factory.h" #include "api/create_peerconnection_factory.h" +#include "api/enable_media_with_defaults.h" #include "api/peer_connection_interface.h" #include "api/stats/rtcstats_objects.h" #include "api/task_queue/default_task_queue_factory.h" #include "api/video_codecs/builtin_video_decoder_factory.h" #include "api/video_codecs/builtin_video_encoder_factory.h" #include "media/engine/webrtc_media_engine.h" -#include "media/engine/webrtc_media_engine_defaults.h" #include "pc/peer_connection_wrapper.h" #include "pc/session_description.h" #include "pc/test/fake_audio_capture_module.h" @@ -68,7 +68,7 @@ class PeerConnectionFieldTrialTest : public ::testing::Test { #ifdef WEBRTC_ANDROID InitializeAndroidObjects(); #endif - webrtc::PeerConnectionInterface::IceServer ice_server; + PeerConnectionInterface::IceServer ice_server; ice_server.uri = "stun:stun.l.google.com:19302"; config_.servers.push_back(ice_server); config_.sdp_semantics = SdpSemantics::kUnifiedPlan; @@ -81,13 +81,8 @@ class PeerConnectionFieldTrialTest : public ::testing::Test { pcf_deps.signaling_thread = rtc::Thread::Current(); pcf_deps.trials = std::move(field_trials); pcf_deps.task_queue_factory = CreateDefaultTaskQueueFactory(); - pcf_deps.call_factory = webrtc::CreateCallFactory(); - cricket::MediaEngineDependencies media_deps; - media_deps.task_queue_factory = pcf_deps.task_queue_factory.get(); - media_deps.adm = FakeAudioCaptureModule::Create(); - media_deps.trials = pcf_deps.trials.get(); - webrtc::SetMediaEngineDefaults(&media_deps); - pcf_deps.media_engine = cricket::CreateMediaEngine(std::move(media_deps)); + pcf_deps.adm = FakeAudioCaptureModule::Create(); + EnableMediaWithDefaults(pcf_deps); pc_factory_ = CreateModularPeerConnectionFactory(std::move(pcf_deps)); // Allow ADAPTER_TYPE_LOOPBACK to create PeerConnections with loopback in @@ -113,7 +108,7 @@ class PeerConnectionFieldTrialTest : public ::testing::Test { std::unique_ptr<rtc::SocketServer> socket_server_; rtc::AutoSocketServerThread main_thread_; rtc::scoped_refptr<PeerConnectionFactoryInterface> pc_factory_ = nullptr; - webrtc::PeerConnectionInterface::RTCConfiguration config_; + PeerConnectionInterface::RTCConfiguration config_; }; // Tests for the dependency descriptor field trial. The dependency descriptor @@ -138,7 +133,7 @@ TEST_F(PeerConnectionFieldTrialTest, EnableDependencyDescriptorAdvertised) { media_description1->rtp_header_extensions(); bool found = absl::c_find_if(rtp_header_extensions1, - [](const webrtc::RtpExtension& rtp_extension) { + [](const RtpExtension& rtp_extension) { return rtp_extension.uri == RtpExtension::kDependencyDescriptorUri; }) != rtp_header_extensions1.end(); @@ -168,14 +163,14 @@ TEST_F(PeerConnectionFieldTrialTest, InjectDependencyDescriptor) { media_description1->rtp_header_extensions(); bool found1 = absl::c_find_if(rtp_header_extensions1, - [](const webrtc::RtpExtension& rtp_extension) { + [](const RtpExtension& rtp_extension) { return rtp_extension.uri == RtpExtension::kDependencyDescriptorUri; }) != rtp_header_extensions1.end(); EXPECT_FALSE(found1); std::set<int> existing_ids; - for (const webrtc::RtpExtension& rtp_extension : rtp_header_extensions1) { + for (const RtpExtension& rtp_extension : rtp_header_extensions1) { existing_ids.insert(rtp_extension.id); } @@ -212,7 +207,7 @@ TEST_F(PeerConnectionFieldTrialTest, InjectDependencyDescriptor) { media_description2->rtp_header_extensions(); bool found2 = absl::c_find_if(rtp_header_extensions2, - [](const webrtc::RtpExtension& rtp_extension) { + [](const RtpExtension& rtp_extension) { return rtp_extension.uri == RtpExtension::kDependencyDescriptorUri; }) != rtp_header_extensions2.end(); |