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

Unified Diff: webrtc/api/peerconnectioninterface.h

Issue 2653343003: Add CreatePeerConnectionFactory overloads that take audio codec factory args (Closed)
Patch Set: Don't save the audio encoder factory, since it's just a fake Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/api/peerconnectioninterface.h
diff --git a/webrtc/api/peerconnectioninterface.h b/webrtc/api/peerconnectioninterface.h
index e42c60f4d603cff7eac412e46ca6cc7238e374d6..b1b996fc08dab9c7198ac300ecb3b3f654bd94cd 100644
--- a/webrtc/api/peerconnectioninterface.h
+++ b/webrtc/api/peerconnectioninterface.h
@@ -73,6 +73,7 @@
#include "webrtc/base/socketaddress.h"
#include "webrtc/base/sslstreamadapter.h"
#include "webrtc/media/base/mediachannel.h"
+#include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h"
#include "webrtc/p2p/base/portallocator.h"
namespace rtc {
@@ -830,6 +831,14 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
~PeerConnectionFactoryInterface() {} // NOLINT
};
+// TODO(ossu): Remove these and define a real builtin audio encoder factory
+// instead.
+class AudioEncoderFactory : public rtc::RefCountInterface {};
+inline rtc::scoped_refptr<AudioEncoderFactory>
+CreateBuiltinAudioEncoderFactory() {
+ return nullptr;
+}
+
// Create a new instance of PeerConnectionFactoryInterface.
//
// This method relies on the thread it's called on as the "signaling thread"
@@ -840,6 +849,12 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
// rtc::Thread::Current()->Run(), or call
// rtc::Thread::Current()->ProcessMessages() within the application's own
// message loop.
+rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(
+ rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,
+ rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory);
+
+// Deprecated variant of the above.
+// TODO(kwiberg): Remove.
rtc::scoped_refptr<PeerConnectionFactoryInterface>
CreatePeerConnectionFactory();
@@ -855,6 +870,18 @@ rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(
rtc::Thread* worker_thread,
rtc::Thread* signaling_thread,
AudioDeviceModule* default_adm,
+ rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,
+ rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,
+ cricket::WebRtcVideoEncoderFactory* video_encoder_factory,
+ cricket::WebRtcVideoDecoderFactory* video_decoder_factory);
+
+// Deprecated variant of the above.
+// TODO(kwiberg): Remove.
+rtc::scoped_refptr<PeerConnectionFactoryInterface> CreatePeerConnectionFactory(
+ rtc::Thread* network_thread,
+ rtc::Thread* worker_thread,
+ rtc::Thread* signaling_thread,
+ AudioDeviceModule* default_adm,
cricket::WebRtcVideoEncoderFactory* encoder_factory,
cricket::WebRtcVideoDecoderFactory* decoder_factory);
@@ -868,6 +895,20 @@ CreatePeerConnectionFactoryWithAudioMixer(
rtc::Thread* worker_thread,
rtc::Thread* signaling_thread,
AudioDeviceModule* default_adm,
+ rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,
+ rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,
+ cricket::WebRtcVideoEncoderFactory* video_encoder_factory,
+ cricket::WebRtcVideoDecoderFactory* video_decoder_factory,
+ rtc::scoped_refptr<AudioMixer> audio_mixer);
+
+// Deprecated variant of the above.
+// TODO(kwiberg): Remove.
+rtc::scoped_refptr<PeerConnectionFactoryInterface>
+CreatePeerConnectionFactoryWithAudioMixer(
+ rtc::Thread* network_thread,
+ rtc::Thread* worker_thread,
+ rtc::Thread* signaling_thread,
+ AudioDeviceModule* default_adm,
cricket::WebRtcVideoEncoderFactory* encoder_factory,
cricket::WebRtcVideoDecoderFactory* decoder_factory,
rtc::scoped_refptr<AudioMixer> audio_mixer);
@@ -879,6 +920,23 @@ CreatePeerConnectionFactory(
rtc::Thread* worker_and_network_thread,
rtc::Thread* signaling_thread,
AudioDeviceModule* default_adm,
+ rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,
+ rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,
+ cricket::WebRtcVideoEncoderFactory* video_encoder_factory,
+ cricket::WebRtcVideoDecoderFactory* video_decoder_factory) {
+ return CreatePeerConnectionFactory(
+ worker_and_network_thread, worker_and_network_thread, signaling_thread,
+ default_adm, audio_encoder_factory, audio_decoder_factory,
+ video_encoder_factory, video_decoder_factory);
+}
+
+// Deprecated variant of the above.
+// TODO(kwiberg): Remove.
+inline rtc::scoped_refptr<PeerConnectionFactoryInterface>
+CreatePeerConnectionFactory(
+ rtc::Thread* worker_and_network_thread,
+ rtc::Thread* signaling_thread,
+ AudioDeviceModule* default_adm,
cricket::WebRtcVideoEncoderFactory* encoder_factory,
cricket::WebRtcVideoDecoderFactory* decoder_factory) {
return CreatePeerConnectionFactory(

Powered by Google App Engine
This is Rietveld 408576698