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

Side by Side Diff: webrtc/api/peerconnectioninterface.h

Issue 2705093002: Injectable audio encoders: WebRtcVoiceEngine and company (Closed)
Patch Set: Created 3 years, 10 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
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 #include "webrtc/api/statstypes.h" 84 #include "webrtc/api/statstypes.h"
85 #include "webrtc/api/umametrics.h" 85 #include "webrtc/api/umametrics.h"
86 #include "webrtc/base/fileutils.h" 86 #include "webrtc/base/fileutils.h"
87 #include "webrtc/base/network.h" 87 #include "webrtc/base/network.h"
88 #include "webrtc/base/rtccertificate.h" 88 #include "webrtc/base/rtccertificate.h"
89 #include "webrtc/base/rtccertificategenerator.h" 89 #include "webrtc/base/rtccertificategenerator.h"
90 #include "webrtc/base/socketaddress.h" 90 #include "webrtc/base/socketaddress.h"
91 #include "webrtc/base/sslstreamadapter.h" 91 #include "webrtc/base/sslstreamadapter.h"
92 #include "webrtc/media/base/mediachannel.h" 92 #include "webrtc/media/base/mediachannel.h"
93 #include "webrtc/media/base/videocapturer.h" 93 #include "webrtc/media/base/videocapturer.h"
94 #include "webrtc/modules/audio_coding/codecs/audio_encoder_factory.h"
94 #include "webrtc/p2p/base/portallocator.h" 95 #include "webrtc/p2p/base/portallocator.h"
95 96
96 namespace rtc { 97 namespace rtc {
97 class SSLIdentity; 98 class SSLIdentity;
98 class Thread; 99 class Thread;
99 } 100 }
100 101
101 namespace cricket { 102 namespace cricket {
102 class WebRtcVideoDecoderFactory; 103 class WebRtcVideoDecoderFactory;
103 class WebRtcVideoEncoderFactory; 104 class WebRtcVideoEncoderFactory;
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 // TODO(ivoc) Remove after Chrome is updated. 1041 // TODO(ivoc) Remove after Chrome is updated.
1041 virtual void StopRtcEventLog() = 0; 1042 virtual void StopRtcEventLog() = 0;
1042 1043
1043 protected: 1044 protected:
1044 // Dtor and ctor protected as objects shouldn't be created or deleted via 1045 // Dtor and ctor protected as objects shouldn't be created or deleted via
1045 // this interface. 1046 // this interface.
1046 PeerConnectionFactoryInterface() {} 1047 PeerConnectionFactoryInterface() {}
1047 ~PeerConnectionFactoryInterface() {} // NOLINT 1048 ~PeerConnectionFactoryInterface() {} // NOLINT
1048 }; 1049 };
1049 1050
1050 // TODO(ossu): Remove these and define a real builtin audio encoder factory
1051 // instead.
1052 class AudioEncoderFactory : public rtc::RefCountInterface {};
1053 inline rtc::scoped_refptr<AudioEncoderFactory>
1054 CreateBuiltinAudioEncoderFactory() {
1055 return nullptr;
1056 }
1057
1058 // Create a new instance of PeerConnectionFactoryInterface. 1051 // Create a new instance of PeerConnectionFactoryInterface.
1059 // 1052 //
1060 // This method relies on the thread it's called on as the "signaling thread" 1053 // This method relies on the thread it's called on as the "signaling thread"
1061 // for the PeerConnectionFactory it creates. 1054 // for the PeerConnectionFactory it creates.
1062 // 1055 //
1063 // As such, if the current thread is not already running an rtc::Thread message 1056 // As such, if the current thread is not already running an rtc::Thread message
1064 // loop, an application using this method must eventually either call 1057 // loop, an application using this method must eventually either call
1065 // rtc::Thread::Current()->Run(), or call 1058 // rtc::Thread::Current()->Run(), or call
1066 // rtc::Thread::Current()->ProcessMessages() within the application's own 1059 // rtc::Thread::Current()->ProcessMessages() within the application's own
1067 // message loop. 1060 // message loop.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 cricket::WebRtcVideoEncoderFactory* encoder_factory, 1152 cricket::WebRtcVideoEncoderFactory* encoder_factory,
1160 cricket::WebRtcVideoDecoderFactory* decoder_factory) { 1153 cricket::WebRtcVideoDecoderFactory* decoder_factory) {
1161 return CreatePeerConnectionFactory( 1154 return CreatePeerConnectionFactory(
1162 worker_and_network_thread, worker_and_network_thread, signaling_thread, 1155 worker_and_network_thread, worker_and_network_thread, signaling_thread,
1163 default_adm, encoder_factory, decoder_factory); 1156 default_adm, encoder_factory, decoder_factory);
1164 } 1157 }
1165 1158
1166 } // namespace webrtc 1159 } // namespace webrtc
1167 1160
1168 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ 1161 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698