diff options
Diffstat (limited to 'third_party/libwebrtc/pc/test/fake_peer_connection_for_stats.h')
-rw-r--r-- | third_party/libwebrtc/pc/test/fake_peer_connection_for_stats.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/third_party/libwebrtc/pc/test/fake_peer_connection_for_stats.h b/third_party/libwebrtc/pc/test/fake_peer_connection_for_stats.h index 7302182912..2883c86b58 100644 --- a/third_party/libwebrtc/pc/test/fake_peer_connection_for_stats.h +++ b/third_party/libwebrtc/pc/test/fake_peer_connection_for_stats.h @@ -18,10 +18,11 @@ #include <utility> #include <vector> -#include "media/base/fake_media_engine.h" +#include "api/environment/environment_factory.h" #include "media/base/media_channel.h" #include "pc/channel.h" #include "pc/stream_collection.h" +#include "pc/test/enable_fake_media.h" #include "pc/test/fake_data_channel_controller.h" #include "pc/test/fake_peer_connection_base.h" @@ -150,7 +151,7 @@ class VoiceChannelForTesting : public cricket::VoiceChannel { receive_channel, const std::string& content_name, bool srtp_required, - webrtc::CryptoOptions crypto_options, + CryptoOptions crypto_options, rtc::UniqueRandomIdGenerator* ssrc_generator, std::string transport_name) : VoiceChannel(worker_thread, @@ -183,7 +184,7 @@ class VideoChannelForTesting : public cricket::VideoChannel { receive_channel, const std::string& content_name, bool srtp_required, - webrtc::CryptoOptions crypto_options, + CryptoOptions crypto_options, rtc::UniqueRandomIdGenerator* ssrc_generator, std::string transport_name) : VideoChannel(worker_thread, @@ -219,7 +220,8 @@ class FakePeerConnectionForStats : public FakePeerConnectionBase { signaling_thread_(rtc::Thread::Current()), // TODO(hta): remove separate thread variables and use context. dependencies_(MakeDependencies()), - context_(ConnectionContext::Create(&dependencies_)), + context_( + ConnectionContext::Create(CreateEnvironment(), &dependencies_)), local_streams_(StreamCollection::Create()), remote_streams_(StreamCollection::Create()), data_channel_controller_(network_thread_) {} @@ -235,7 +237,7 @@ class FakePeerConnectionForStats : public FakePeerConnectionBase { dependencies.network_thread = rtc::Thread::Current(); dependencies.worker_thread = rtc::Thread::Current(); dependencies.signaling_thread = rtc::Thread::Current(); - dependencies.media_engine = std::make_unique<cricket::FakeMediaEngine>(); + EnableFakeMedia(dependencies); return dependencies; } @@ -298,7 +300,7 @@ class FakePeerConnectionForStats : public FakePeerConnectionBase { worker_thread_, network_thread_, signaling_thread_, std::move(voice_media_send_channel), std::move(voice_media_receive_channel), mid, kDefaultSrtpRequired, - webrtc::CryptoOptions(), context_->ssrc_generator(), transport_name); + CryptoOptions(), context_->ssrc_generator(), transport_name); auto transceiver = GetOrCreateFirstTransceiverOfType(cricket::MEDIA_TYPE_AUDIO) ->internal(); @@ -332,7 +334,7 @@ class FakePeerConnectionForStats : public FakePeerConnectionBase { worker_thread_, network_thread_, signaling_thread_, std::move(video_media_send_channel), std::move(video_media_receive_channel), mid, kDefaultSrtpRequired, - webrtc::CryptoOptions(), context_->ssrc_generator(), transport_name); + CryptoOptions(), context_->ssrc_generator(), transport_name); auto transceiver = GetOrCreateFirstTransceiverOfType(cricket::MEDIA_TYPE_VIDEO) ->internal(); |