summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/chromium_http
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2012-06-15 13:56:18 -0700
committerColin Cross <ccross@android.com>2012-06-15 17:08:48 -0700
commitbea455c8e4a230cc5aedc9df33e1ba97c64cec5f (patch)
treedf728643d29e66431b4d768887c55ce5bbf09e93 /media/libstagefright/chromium_http
parentfea3699c6921f50f404b6285d588894cee63d85f (diff)
downloadframeworks_av-bea455c8e4a230cc5aedc9df33e1ba97c64cec5f.zip
frameworks_av-bea455c8e4a230cc5aedc9df33e1ba97c64cec5f.tar.gz
frameworks_av-bea455c8e4a230cc5aedc9df33e1ba97c64cec5f.tar.bz2
libstagefright: dynamically load libstagefright_chromium_http
dlopen libstagefright_chromium_http to allow it to be on the platform side of the pdk without getting overwritten during a pdk fusion build. Change-Id: I391e81d98beab165c3313bc8a71bb370ebb8584d
Diffstat (limited to 'media/libstagefright/chromium_http')
-rw-r--r--media/libstagefright/chromium_http/Android.mk17
-rw-r--r--media/libstagefright/chromium_http/chromium_http_stub.cpp33
2 files changed, 47 insertions, 3 deletions
diff --git a/media/libstagefright/chromium_http/Android.mk b/media/libstagefright/chromium_http/Android.mk
index 6ab2a00..2c6d84c 100644
--- a/media/libstagefright/chromium_http/Android.mk
+++ b/media/libstagefright/chromium_http/Android.mk
@@ -6,7 +6,8 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
DataUriSource.cpp \
ChromiumHTTPDataSource.cpp \
- support.cpp
+ support.cpp \
+ chromium_http_stub.cpp
LOCAL_C_INCLUDES:= \
$(TOP)/frameworks/av/media/libstagefright \
@@ -16,10 +17,20 @@ LOCAL_C_INCLUDES:= \
LOCAL_CFLAGS += -Wno-multichar
-LOCAL_SHARED_LIBRARIES += libstlport
+LOCAL_SHARED_LIBRARIES += \
+ libstlport \
+ libchromium_net \
+ libutils \
+ libcutils \
+ libstagefright_foundation \
+ libstagefright \
+ libdrmframework
+
include external/stlport/libstlport.mk
LOCAL_MODULE:= libstagefright_chromium_http
-include $(BUILD_STATIC_LIBRARY)
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SHARED_LIBRARY)
endif
diff --git a/media/libstagefright/chromium_http/chromium_http_stub.cpp b/media/libstagefright/chromium_http/chromium_http_stub.cpp
new file mode 100644
index 0000000..560a61f
--- /dev/null
+++ b/media/libstagefright/chromium_http/chromium_http_stub.cpp
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <dlfcn.h>
+
+#include <include/chromium_http_stub.h>
+#include <include/ChromiumHTTPDataSource.h>
+#include <include/DataUriSource.h>
+
+namespace android {
+
+HTTPBase *createChromiumHTTPDataSource(uint32_t flags) {
+ return new ChromiumHTTPDataSource(flags);
+}
+
+DataSource *createDataUriSource(const char *uri) {
+ return new DataUriSource(uri);
+}
+
+}