summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/chromium_http/chromium_http_stub.cpp
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/chromium_http_stub.cpp
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/chromium_http_stub.cpp')
-rw-r--r--media/libstagefright/chromium_http/chromium_http_stub.cpp33
1 files changed, 33 insertions, 0 deletions
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);
+}
+
+}