Don't call deprecated CreatePeerConnectionFactory() overloads
They're about to be removed. BUG=webrtc:8396 Change-Id: Ie9a45f4c0dccb4414d2a2f939aa5f142edc6e4b6 Reviewed-on: https://webrtc-review.googlesource.com/12280 Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20328}
This commit is contained in:
@ -540,6 +540,8 @@ if (is_linux || is_win) {
|
|||||||
deps += [
|
deps += [
|
||||||
"../api:libjingle_peerconnection_test_api",
|
"../api:libjingle_peerconnection_test_api",
|
||||||
"../api:video_frame_api",
|
"../api:video_frame_api",
|
||||||
|
"../api/audio_codecs:builtin_audio_decoder_factory",
|
||||||
|
"../api/audio_codecs:builtin_audio_encoder_factory",
|
||||||
"../media:rtc_media",
|
"../media:rtc_media",
|
||||||
"../modules/video_capture:video_capture_module",
|
"../modules/video_capture:video_capture_module",
|
||||||
"../pc:libjingle_peerconnection",
|
"../pc:libjingle_peerconnection",
|
||||||
|
|||||||
@ -14,6 +14,8 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
|
||||||
|
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
|
||||||
#include "api/test/fakeconstraints.h"
|
#include "api/test/fakeconstraints.h"
|
||||||
#include "examples/peerconnection/client/defaults.h"
|
#include "examples/peerconnection/client/defaults.h"
|
||||||
#include "media/engine/webrtcvideocapturerfactory.h"
|
#include "media/engine/webrtcvideocapturerfactory.h"
|
||||||
@ -79,7 +81,9 @@ bool Conductor::InitializePeerConnection() {
|
|||||||
RTC_DCHECK(peer_connection_factory_.get() == NULL);
|
RTC_DCHECK(peer_connection_factory_.get() == NULL);
|
||||||
RTC_DCHECK(peer_connection_.get() == NULL);
|
RTC_DCHECK(peer_connection_.get() == NULL);
|
||||||
|
|
||||||
peer_connection_factory_ = webrtc::CreatePeerConnectionFactory();
|
peer_connection_factory_ = webrtc::CreatePeerConnectionFactory(
|
||||||
|
webrtc::CreateBuiltinAudioEncoderFactory(),
|
||||||
|
webrtc::CreateBuiltinAudioDecoderFactory());
|
||||||
|
|
||||||
if (!peer_connection_factory_.get()) {
|
if (!peer_connection_factory_.get()) {
|
||||||
main_wnd_->MessageBox("Error",
|
main_wnd_->MessageBox("Error",
|
||||||
|
|||||||
@ -8,6 +8,8 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
|
||||||
|
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
|
||||||
#include "p2p/base/fakeportallocator.h"
|
#include "p2p/base/fakeportallocator.h"
|
||||||
#include "pc/mediasession.h"
|
#include "pc/mediasession.h"
|
||||||
#include "pc/peerconnectionwrapper.h"
|
#include "pc/peerconnectionwrapper.h"
|
||||||
@ -40,7 +42,8 @@ class PeerConnectionCryptoUnitTest : public ::testing::Test {
|
|||||||
#endif
|
#endif
|
||||||
pc_factory_ = CreatePeerConnectionFactory(
|
pc_factory_ = CreatePeerConnectionFactory(
|
||||||
rtc::Thread::Current(), rtc::Thread::Current(), rtc::Thread::Current(),
|
rtc::Thread::Current(), rtc::Thread::Current(), rtc::Thread::Current(),
|
||||||
FakeAudioCaptureModule::Create(), nullptr, nullptr);
|
FakeAudioCaptureModule::Create(), CreateBuiltinAudioEncoderFactory(),
|
||||||
|
CreateBuiltinAudioDecoderFactory(), nullptr, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
WrapperPtr CreatePeerConnection(const RTCConfiguration& config) {
|
WrapperPtr CreatePeerConnection(const RTCConfiguration& config) {
|
||||||
|
|||||||
@ -17,6 +17,8 @@
|
|||||||
#ifdef WEBRTC_ANDROID
|
#ifdef WEBRTC_ANDROID
|
||||||
#include "pc/test/androidtestinitializer.h"
|
#include "pc/test/androidtestinitializer.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
|
||||||
|
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
|
||||||
#include "pc/test/fakeaudiocapturemodule.h"
|
#include "pc/test/fakeaudiocapturemodule.h"
|
||||||
#include "rtc_base/fakenetwork.h"
|
#include "rtc_base/fakenetwork.h"
|
||||||
#include "rtc_base/gunit.h"
|
#include "rtc_base/gunit.h"
|
||||||
@ -82,7 +84,8 @@ class PeerConnectionIceUnitTest : public ::testing::Test {
|
|||||||
#endif
|
#endif
|
||||||
pc_factory_ = CreatePeerConnectionFactory(
|
pc_factory_ = CreatePeerConnectionFactory(
|
||||||
rtc::Thread::Current(), rtc::Thread::Current(), rtc::Thread::Current(),
|
rtc::Thread::Current(), rtc::Thread::Current(), rtc::Thread::Current(),
|
||||||
FakeAudioCaptureModule::Create(), nullptr, nullptr);
|
FakeAudioCaptureModule::Create(), CreateBuiltinAudioEncoderFactory(),
|
||||||
|
CreateBuiltinAudioDecoderFactory(), nullptr, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
WrapperPtr CreatePeerConnection() {
|
WrapperPtr CreatePeerConnection() {
|
||||||
|
|||||||
@ -22,6 +22,8 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
|
||||||
|
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
|
||||||
#include "api/fakemetricsobserver.h"
|
#include "api/fakemetricsobserver.h"
|
||||||
#include "api/mediastreaminterface.h"
|
#include "api/mediastreaminterface.h"
|
||||||
#include "api/peerconnectioninterface.h"
|
#include "api/peerconnectioninterface.h"
|
||||||
@ -588,7 +590,8 @@ class PeerConnectionWrapper : public webrtc::PeerConnectionObserver,
|
|||||||
rtc::Thread* const signaling_thread = rtc::Thread::Current();
|
rtc::Thread* const signaling_thread = rtc::Thread::Current();
|
||||||
peer_connection_factory_ = webrtc::CreatePeerConnectionFactory(
|
peer_connection_factory_ = webrtc::CreatePeerConnectionFactory(
|
||||||
network_thread, worker_thread, signaling_thread,
|
network_thread, worker_thread, signaling_thread,
|
||||||
fake_audio_capture_module_, fake_video_encoder_factory_,
|
fake_audio_capture_module_, webrtc::CreateBuiltinAudioEncoderFactory(),
|
||||||
|
webrtc::CreateBuiltinAudioDecoderFactory(), fake_video_encoder_factory_,
|
||||||
fake_video_decoder_factory_);
|
fake_video_decoder_factory_);
|
||||||
if (!peer_connection_factory_) {
|
if (!peer_connection_factory_) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -11,6 +11,8 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
|
||||||
|
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
|
||||||
#include "api/jsep.h"
|
#include "api/jsep.h"
|
||||||
#include "api/mediastreaminterface.h"
|
#include "api/mediastreaminterface.h"
|
||||||
#include "api/peerconnectioninterface.h"
|
#include "api/peerconnectioninterface.h"
|
||||||
@ -34,12 +36,13 @@ namespace {
|
|||||||
class PeerConnectionRtpTest : public testing::Test {
|
class PeerConnectionRtpTest : public testing::Test {
|
||||||
public:
|
public:
|
||||||
PeerConnectionRtpTest()
|
PeerConnectionRtpTest()
|
||||||
:
|
: pc_factory_(webrtc::CreatePeerConnectionFactory(
|
||||||
pc_factory_(webrtc::CreatePeerConnectionFactory(
|
|
||||||
rtc::Thread::Current(),
|
rtc::Thread::Current(),
|
||||||
rtc::Thread::Current(),
|
rtc::Thread::Current(),
|
||||||
rtc::Thread::Current(),
|
rtc::Thread::Current(),
|
||||||
FakeAudioCaptureModule::Create(),
|
FakeAudioCaptureModule::Create(),
|
||||||
|
webrtc::CreateBuiltinAudioEncoderFactory(),
|
||||||
|
webrtc::CreateBuiltinAudioDecoderFactory(),
|
||||||
nullptr,
|
nullptr,
|
||||||
nullptr)) {}
|
nullptr)) {}
|
||||||
|
|
||||||
|
|||||||
@ -12,6 +12,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
|
||||||
|
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
|
||||||
#include "api/mediastreaminterface.h"
|
#include "api/mediastreaminterface.h"
|
||||||
#include "media/base/fakevideocapturer.h"
|
#include "media/base/fakevideocapturer.h"
|
||||||
#include "p2p/base/fakeportallocator.h"
|
#include "p2p/base/fakeportallocator.h"
|
||||||
@ -91,7 +93,9 @@ class PeerConnectionFactoryTest : public testing::Test {
|
|||||||
// parallel.
|
// parallel.
|
||||||
factory_ = webrtc::CreatePeerConnectionFactory(
|
factory_ = webrtc::CreatePeerConnectionFactory(
|
||||||
rtc::Thread::Current(), rtc::Thread::Current(),
|
rtc::Thread::Current(), rtc::Thread::Current(),
|
||||||
FakeAudioCaptureModule::Create(), nullptr, nullptr);
|
FakeAudioCaptureModule::Create(),
|
||||||
|
webrtc::CreateBuiltinAudioEncoderFactory(),
|
||||||
|
webrtc::CreateBuiltinAudioDecoderFactory(), nullptr, nullptr);
|
||||||
|
|
||||||
ASSERT_TRUE(factory_.get() != NULL);
|
ASSERT_TRUE(factory_.get() != NULL);
|
||||||
port_allocator_.reset(
|
port_allocator_.reset(
|
||||||
@ -141,7 +145,9 @@ TEST(PeerConnectionFactoryTestInternal, DISABLED_CreatePCUsingInternalModules) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
|
rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
|
||||||
webrtc::CreatePeerConnectionFactory());
|
webrtc::CreatePeerConnectionFactory(
|
||||||
|
webrtc::CreateBuiltinAudioEncoderFactory(),
|
||||||
|
webrtc::CreateBuiltinAudioDecoderFactory()));
|
||||||
|
|
||||||
NullPeerConnectionObserver observer;
|
NullPeerConnectionObserver observer;
|
||||||
webrtc::PeerConnectionInterface::RTCConfiguration config;
|
webrtc::PeerConnectionInterface::RTCConfiguration config;
|
||||||
|
|||||||
@ -608,7 +608,8 @@ class PeerConnectionInterfaceTest : public testing::Test {
|
|||||||
fake_audio_capture_module_ = FakeAudioCaptureModule::Create();
|
fake_audio_capture_module_ = FakeAudioCaptureModule::Create();
|
||||||
pc_factory_ = webrtc::CreatePeerConnectionFactory(
|
pc_factory_ = webrtc::CreatePeerConnectionFactory(
|
||||||
rtc::Thread::Current(), rtc::Thread::Current(), rtc::Thread::Current(),
|
rtc::Thread::Current(), rtc::Thread::Current(), rtc::Thread::Current(),
|
||||||
fake_audio_capture_module_, nullptr, nullptr);
|
fake_audio_capture_module_, webrtc::CreateBuiltinAudioEncoderFactory(),
|
||||||
|
webrtc::CreateBuiltinAudioDecoderFactory(), nullptr, nullptr);
|
||||||
ASSERT_TRUE(pc_factory_);
|
ASSERT_TRUE(pc_factory_);
|
||||||
pc_factory_for_test_ =
|
pc_factory_for_test_ =
|
||||||
PeerConnectionFactoryForTest::CreatePeerConnectionFactoryForTest();
|
PeerConnectionFactoryForTest::CreatePeerConnectionFactoryForTest();
|
||||||
@ -1265,8 +1266,9 @@ TEST_F(PeerConnectionInterfaceTest,
|
|||||||
rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> pc_factory(
|
rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> pc_factory(
|
||||||
webrtc::CreatePeerConnectionFactory(
|
webrtc::CreatePeerConnectionFactory(
|
||||||
rtc::Thread::Current(), rtc::Thread::Current(),
|
rtc::Thread::Current(), rtc::Thread::Current(),
|
||||||
rtc::Thread::Current(), fake_audio_capture_module_, nullptr,
|
rtc::Thread::Current(), fake_audio_capture_module_,
|
||||||
nullptr));
|
webrtc::CreateBuiltinAudioEncoderFactory(),
|
||||||
|
webrtc::CreateBuiltinAudioDecoderFactory(), nullptr, nullptr));
|
||||||
rtc::scoped_refptr<PeerConnectionInterface> pc(
|
rtc::scoped_refptr<PeerConnectionInterface> pc(
|
||||||
pc_factory->CreatePeerConnection(
|
pc_factory->CreatePeerConnection(
|
||||||
config, nullptr, std::move(port_allocator), nullptr, &observer_));
|
config, nullptr, std::move(port_allocator), nullptr, &observer_));
|
||||||
@ -1292,7 +1294,9 @@ TEST_F(PeerConnectionInterfaceTest,
|
|||||||
rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> pc_factory(
|
rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> pc_factory(
|
||||||
webrtc::CreatePeerConnectionFactory(
|
webrtc::CreatePeerConnectionFactory(
|
||||||
network_thread.get(), rtc::Thread::Current(), rtc::Thread::Current(),
|
network_thread.get(), rtc::Thread::Current(), rtc::Thread::Current(),
|
||||||
fake_audio_capture_module_, nullptr, nullptr));
|
fake_audio_capture_module_,
|
||||||
|
webrtc::CreateBuiltinAudioEncoderFactory(),
|
||||||
|
webrtc::CreateBuiltinAudioDecoderFactory(), nullptr, nullptr));
|
||||||
std::unique_ptr<cricket::FakePortAllocator> port_allocator(
|
std::unique_ptr<cricket::FakePortAllocator> port_allocator(
|
||||||
new cricket::FakePortAllocator(network_thread.get(), nullptr));
|
new cricket::FakePortAllocator(network_thread.get(), nullptr));
|
||||||
cricket::FakePortAllocator* raw_port_allocator = port_allocator.get();
|
cricket::FakePortAllocator* raw_port_allocator = port_allocator.get();
|
||||||
|
|||||||
Reference in New Issue
Block a user