diff options
author | wjia@chromium.org <wjia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-24 18:54:11 +0000 |
---|---|---|
committer | wjia@chromium.org <wjia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-24 18:54:11 +0000 |
commit | 51d173f6bfe575e36729ac7e5671db31acfd0978 (patch) | |
tree | b9fb4e53eea0ccf0516c085aab2f28a0d6d4d3d8 /third_party/libjingle/overrides/init_webrtc.cc | |
parent | 3df79f4277938356ae3c7b3ecc25ab6165e8a899 (diff) | |
download | chromium_src-51d173f6bfe575e36729ac7e5671db31acfd0978.zip chromium_src-51d173f6bfe575e36729ac7e5671db31acfd0978.tar.gz chromium_src-51d173f6bfe575e36729ac7e5671db31acfd0978.tar.bz2 |
Support using loadable module for libpeerconnection on Android.
Borrowed create_standalone_apk_action.gypi, create_standalone_apk.py and finalize_apk_action.gypi from https://codereview.chromium.org/14843017/ with some minor fix in create_standalone_apk_action.gypi.
For some cases where libpeerconnection needs to be a loadable module, we need to add libpeerconnection.so into Chrome_apk.
This patch takes 2 steps:
1. build chrome with libpeer_target_type=loadable_module.
2. add libpeerconnection.so into the apk file.
TEST=run gyp: GYP_DEFINES="$GYP_DEFINES libpeer_target_type=loadable_module" build/gyp_chromium
build chrome
re-run gyp: GYP_DEFINES="$GYP_DEFINES libpeer_target_type=loadable_module" CHROMIUM_GYP_FILE="build/android/chrome_with_libs.gyp" build/gyp_chromium
build chrome_with_libs
install Chrome-with-libs.apk and it works for https://apprtc.appspot.com
R=cjhopman@chromium.org, mallinath@chromium.org, tommi@chromium.org
Review URL: https://codereview.chromium.org/17569006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208246 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/libjingle/overrides/init_webrtc.cc')
-rw-r--r-- | third_party/libjingle/overrides/init_webrtc.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/third_party/libjingle/overrides/init_webrtc.cc b/third_party/libjingle/overrides/init_webrtc.cc index ba28478..5436345 100644 --- a/third_party/libjingle/overrides/init_webrtc.cc +++ b/third_party/libjingle/overrides/init_webrtc.cc @@ -61,6 +61,10 @@ static base::FilePath GetLibPeerConnectionPath() { CHECK(PathService::Get(base::DIR_MODULE, &path)); path = path.Append(FILE_PATH_LITERAL("Libraries")) .Append(FILE_PATH_LITERAL("libpeerconnection.so")); +#elif defined(OS_ANDROID) + base::FilePath path; + CHECK(PathService::Get(base::DIR_MODULE, &path)); + path = path.Append(FILE_PATH_LITERAL("libpeerconnection.so")); #else base::FilePath path; CHECK(PathService::Get(base::DIR_MODULE, &path)); @@ -94,7 +98,7 @@ bool InitializeWebRtcModule() { // PS: This function is actually implemented in allocator_proxy.cc with the // new/delete overrides. return initialize_module(*CommandLine::ForCurrentProcess(), -#if !defined(OS_MACOSX) +#if !defined(OS_MACOSX) && !defined(OS_ANDROID) &Allocate, &Dellocate, #endif logging::GetLogMessageHandler(), |