Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: webrtc/pc/createpeerconnectionfactory_datachannelonly.cc

Issue 2854123003: Build WebRTC with data channel only. (Closed)
Patch Set: Remove the linking-time polymorphism. Add new CreatePeerConnectionFactory methods. Make Call and Rt… Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #include "webrtc/api/peerconnectioninterface.h"
12 #include "webrtc/base/bind.h"
13 #include "webrtc/base/scoped_ref_ptr.h"
14 #include "webrtc/base/thread.h"
15 #include "webrtc/call/callfactoryinterface.h"
16 #include "webrtc/media/engine/webrtcmediaengine.h" // nogncheck
17
18 namespace webrtc {
19
20 rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(
21 rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,
22 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory) {
23 rtc::Thread* worker_thread = rtc::Thread::Create().release();
24 worker_thread->Start();
25
26 return CreateModularPeerConnectionFactory(
27 worker_thread, audio_encoder_factory, audio_decoder_factory,
28 std::unique_ptr<cricket::MediaEngineInterface>(),
29 std::unique_ptr<CallFactoryInterface>(),
30 std::unique_ptr<RtcEventLogFactoryInterface>());
31 }
32
33 rtc::scoped_refptr<PeerConnectionFactoryInterface>
34 CreatePeerConnectionFactory() {
35 return CreatePeerConnectionFactory(nullptr /*AudioEncoderFactory*/,
36 nullptr /*AudioDecoderFactory*/);
37 }
38
39 rtc::scoped_refptr<PeerConnectionFactoryInterface>
40 CreatePeerConnectionFactoryWithAudioMixer(
41 rtc::Thread* network_thread,
42 rtc::Thread* worker_thread,
43 rtc::Thread* signaling_thread,
44 AudioDeviceModule* default_adm,
45 rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,
46 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,
47 cricket::WebRtcVideoEncoderFactory* video_encoder_factory,
48 cricket::WebRtcVideoDecoderFactory* video_decoder_factory,
49 rtc::scoped_refptr<AudioMixer> audio_mixer) {
50 return CreateModularPeerConnectionFactory(
51 network_thread, worker_thread, signaling_thread, default_adm,
52 audio_encoder_factory, audio_decoder_factory, video_encoder_factory,
53 video_decoder_factory, audio_mixer,
54 std::unique_ptr<cricket::MediaEngineInterface>(),
55 std::unique_ptr<CallFactoryInterface>(),
56 std::unique_ptr<RtcEventLogFactoryInterface>());
57 }
58
59 rtc::scoped_refptr<PeerConnectionFactoryInterface>
60 CreatePeerConnectionFactoryWithAudioMixer(
61 rtc::Thread* network_thread,
62 rtc::Thread* worker_thread,
63 rtc::Thread* signaling_thread,
64 AudioDeviceModule* default_adm,
65 cricket::WebRtcVideoEncoderFactory* encoder_factory,
66 cricket::WebRtcVideoDecoderFactory* decoder_factory,
67 rtc::scoped_refptr<AudioMixer> audio_mixer) {
68 return CreatePeerConnectionFactoryWithAudioMixer(
69 network_thread, worker_thread, signaling_thread, default_adm,
70 nullptr, /*AudioEncoderFactory*/
71 nullptr /*AudioDecoderFactory*/, encoder_factory, decoder_factory,
72 audio_mixer);
73 }
74
75 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698