diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-10 12:57:48 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-10 12:57:48 +0000 |
commit | d47f73aa4e09c1f9720485f2ee0da2b028421ba1 (patch) | |
tree | 41148a92c7cb785bacfe732e8adac831653e242f /third_party | |
parent | 843c66b7f3deeb6f3b2699940357a96b9d618759 (diff) | |
download | chromium_src-d47f73aa4e09c1f9720485f2ee0da2b028421ba1.zip chromium_src-d47f73aa4e09c1f9720485f2ee0da2b028421ba1.tar.gz chromium_src-d47f73aa4e09c1f9720485f2ee0da2b028421ba1.tar.bz2 |
Fix libpeerconnection build after a recent libjingle roll that added an encoder factory to webrtc.
TBR=sergeyu@chromium.org
Review URL: https://codereview.chromium.org/14847015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199462 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/libjingle/overrides/init_webrtc.cc | 4 | ||||
-rw-r--r-- | third_party/libjingle/overrides/init_webrtc.h | 4 | ||||
-rw-r--r-- | third_party/libjingle/overrides/initialize_module.cc | 14 |
3 files changed, 13 insertions, 9 deletions
diff --git a/third_party/libjingle/overrides/init_webrtc.cc b/third_party/libjingle/overrides/init_webrtc.cc index c73b270..3fdb724 100644 --- a/third_party/libjingle/overrides/init_webrtc.cc +++ b/third_party/libjingle/overrides/init_webrtc.cc @@ -84,13 +84,15 @@ bool InitializeWebRtcModule() { cricket::MediaEngineInterface* CreateWebRtcMediaEngine( webrtc::AudioDeviceModule* adm, webrtc::AudioDeviceModule* adm_sc, + cricket::WebRtcVideoEncoderFactory* encoder_factory, cricket::WebRtcVideoDecoderFactory* decoder_factory) { // For convenience of tests etc, we call InitializeWebRtcModule here. // For Chrome however, InitializeWebRtcModule must be called // explicitly before the sandbox is initialized. In that case, this call is // effectively a noop. InitializeWebRtcModule(); - return g_create_webrtc_media_engine(adm, adm_sc, decoder_factory); + return g_create_webrtc_media_engine(adm, adm_sc, encoder_factory, + decoder_factory); } void DestroyWebRtcMediaEngine(cricket::MediaEngineInterface* media_engine) { diff --git a/third_party/libjingle/overrides/init_webrtc.h b/third_party/libjingle/overrides/init_webrtc.h index bcf3268..d0bdd43 100644 --- a/third_party/libjingle/overrides/init_webrtc.h +++ b/third_party/libjingle/overrides/init_webrtc.h @@ -12,6 +12,7 @@ class CommandLine; namespace cricket { class MediaEngineInterface; class WebRtcVideoDecoderFactory; +class WebRtcVideoEncoderFactory; } // namespace cricket namespace webrtc { @@ -21,6 +22,7 @@ class AudioDeviceModule; typedef cricket::MediaEngineInterface* (*CreateWebRtcMediaEngineFunction)( webrtc::AudioDeviceModule* adm, webrtc::AudioDeviceModule* adm_sc, + cricket::WebRtcVideoEncoderFactory* encoder_factory, cricket::WebRtcVideoDecoderFactory* decoder_factory); typedef void (*DestroyWebRtcMediaEngineFunction)( @@ -40,11 +42,13 @@ typedef bool (*InitializeModuleFunction)( CreateWebRtcMediaEngineFunction* create_media_engine, DestroyWebRtcMediaEngineFunction* destroy_media_engine); +#if !defined(LIBPEERCONNECTION_IMPLEMENTATION) // Load and initialize the shared WebRTC module (libpeerconnection). // Call this explicitly to load and initialize the WebRTC module (e.g. before // initializing the sandbox in Chrome). // If not called explicitly, this function will still be called from the main // CreateWebRtcMediaEngine factory function the first time it is called. bool InitializeWebRtcModule(); +#endif #endif // THIRD_PARTY_LIBJINGLE_OVERRIDES_INIT_WEBRTC_H_ diff --git a/third_party/libjingle/overrides/initialize_module.cc b/third_party/libjingle/overrides/initialize_module.cc index 8c70f4f..c3d608d 100644 --- a/third_party/libjingle/overrides/initialize_module.cc +++ b/third_party/libjingle/overrides/initialize_module.cc @@ -6,6 +6,7 @@ #include "base/command_line.h" #include "base/files/file_path.h" #include "base/logging.h" +#include "init_webrtc.h" #include "talk/base/basictypes.h" #include "talk/media/webrtc/webrtcmediaengine.h" @@ -19,13 +20,6 @@ #define ALLOC_EXPORT __attribute__((visibility("default"))) #endif -typedef cricket::MediaEngineInterface* (*CreateWebRtcMediaEngineFunction)( - webrtc::AudioDeviceModule* adm, - webrtc::AudioDeviceModule* adm_sc, - cricket::WebRtcVideoDecoderFactory* decoder_factory); -typedef void (*DestroyWebRtcMediaEngineFunction)( - cricket::MediaEngineInterface* media_engine); - #if !defined(OS_MACOSX) // These are used by our new/delete overrides in // allocator_shim/allocator_proxy.cc @@ -36,7 +30,9 @@ DellocateFunction g_dealloc = NULL; // Forward declare of the libjingle internal factory and destroy methods for the // WebRTC media engine. cricket::MediaEngineInterface* CreateWebRtcMediaEngine( - webrtc::AudioDeviceModule* adm, webrtc::AudioDeviceModule* adm_sc, + webrtc::AudioDeviceModule* adm, + webrtc::AudioDeviceModule* adm_sc, + cricket::WebRtcVideoEncoderFactory* encoder_factory, cricket::WebRtcVideoDecoderFactory* decoder_factory); void DestroyWebRtcMediaEngine(cricket::MediaEngineInterface* media_engine); @@ -68,6 +64,8 @@ bool InitializeModule(const CommandLine& command_line, // done the equivalent thing via the GetCommandLine() API. CommandLine::ForCurrentProcess()->AppendArguments(command_line, true); #endif + + // TODO(tommi): Use SetLogMessageHandler. logging::InitLogging( FILE_PATH_LITERAL("libpeerconnection.log"), logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, |