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

Unified Diff: webrtc/ortc/ortcfactory.cc

Issue 2799033006: Injectable audio encoders: Moved audio encoder, factory and builtin factory to api/. (Closed)
Patch Set: More backwards-compatibility! Created 3 years, 8 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
« no previous file with comments | « webrtc/ortc/ortcfactory.h ('k') | webrtc/pc/peerconnectionfactory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/ortc/ortcfactory.cc
diff --git a/webrtc/ortc/ortcfactory.cc b/webrtc/ortc/ortcfactory.cc
index 8af61918afe283f31214b0a186e37de0eb5bcc6b..bf34f134fb01ac3ebb85d83f83d31c0fad3787cb 100644
--- a/webrtc/ortc/ortcfactory.cc
+++ b/webrtc/ortc/ortcfactory.cc
@@ -14,6 +14,8 @@
#include <utility> // For std::move.
#include <vector>
+#include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h"
+#include "webrtc/api/audio_codecs/builtin_audio_encoder_factory.h"
#include "webrtc/api/mediastreamtrackproxy.h"
#include "webrtc/api/proxy.h"
#include "webrtc/api/rtcerror.h"
@@ -25,7 +27,6 @@
#include "webrtc/base/logging.h"
#include "webrtc/logging/rtc_event_log/rtc_event_log.h"
#include "webrtc/media/base/mediaconstants.h"
-#include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h"
#include "webrtc/ortc/ortcrtpreceiveradapter.h"
#include "webrtc/ortc/ortcrtpsenderadapter.h"
#include "webrtc/ortc/rtpparametersconversion.h"
@@ -168,6 +169,7 @@ OrtcFactory::OrtcFactory(rtc::Thread* network_thread,
socket_factory_(socket_factory),
adm_(adm),
null_event_log_(RtcEventLog::CreateNull()),
+ audio_encoder_factory_(CreateBuiltinAudioEncoderFactory()),
audio_decoder_factory_(CreateBuiltinAudioDecoderFactory()) {
if (!rtc::CreateRandomString(kDefaultRtcpCnameLength, &default_cname_)) {
LOG(LS_ERROR) << "Failed to generate CNAME?";
@@ -542,8 +544,9 @@ OrtcFactory::CreateMediaEngine_w() {
// Note that |adm_| may be null, in which case the platform-specific default
// AudioDeviceModule will be used.
return std::unique_ptr<cricket::MediaEngineInterface>(
- cricket::WebRtcMediaEngineFactory::Create(adm_, audio_decoder_factory_,
- nullptr, nullptr, nullptr));
+ cricket::WebRtcMediaEngineFactory::Create(adm_, audio_encoder_factory_,
+ audio_decoder_factory_, nullptr,
+ nullptr, nullptr));
}
} // namespace webrtc
« no previous file with comments | « webrtc/ortc/ortcfactory.h ('k') | webrtc/pc/peerconnectionfactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698