summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/omx/SoftOMXPlugin.cpp
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-07-08 09:56:01 -0700
committerSteve Kondik <steve@cyngn.com>2015-10-28 16:44:24 -0700
commite8e76dbe389171f25ba95f0ef95169bae953a028 (patch)
treec4b431d3bf48d7ad70331f78b1bbc47bb0b97711 /media/libstagefright/omx/SoftOMXPlugin.cpp
parentc625796ad78ade1f9c5235d482d20f74c8c05f81 (diff)
downloadframeworks_av-e8e76dbe389171f25ba95f0ef95169bae953a028.zip
frameworks_av-e8e76dbe389171f25ba95f0ef95169bae953a028.tar.gz
frameworks_av-e8e76dbe389171f25ba95f0ef95169bae953a028.tar.bz2
stagefright: Add support for loading a custom OMXPlugin
* To facilitate moving the stagefright-plugins glue out of the framework, support is added to OMXMaster to load multiple external plugins besides internal/vendor versions. * This is currently limited to one plugin, defined by the "mm.sf.omx-plugin" system property. The code will allow any number of libraries to be loaded, though. * Should also be useful for nonstandard vendor implementations too. Change-Id: I27d7e16ad56baa17754d8ea47a8c608a0d73d6f1
Diffstat (limited to 'media/libstagefright/omx/SoftOMXPlugin.cpp')
-rwxr-xr-xmedia/libstagefright/omx/SoftOMXPlugin.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/media/libstagefright/omx/SoftOMXPlugin.cpp b/media/libstagefright/omx/SoftOMXPlugin.cpp
index 9389f67..4afd5d5 100755
--- a/media/libstagefright/omx/SoftOMXPlugin.cpp
+++ b/media/libstagefright/omx/SoftOMXPlugin.cpp
@@ -77,6 +77,7 @@ OMX_ERRORTYPE SoftOMXPlugin::makeComponentInstance(
OMX_COMPONENTTYPE **component) {
ALOGV("makeComponentInstance '%s'", name);
+ dlerror(); // clear any existing error
for (size_t i = 0; i < kNumComponents; ++i) {
if (strcmp(name, kComponents[i].mName)) {
continue;
@@ -94,6 +95,8 @@ OMX_ERRORTYPE SoftOMXPlugin::makeComponentInstance(
return OMX_ErrorComponentNotFound;
}
+ ALOGV("load component %s for %s", libName.c_str(), name);
+
typedef SoftOMXComponent *(*CreateSoftOMXComponentFunc)(
const char *, const OMX_CALLBACKTYPE *,
OMX_PTR, OMX_COMPONENTTYPE **);
@@ -104,7 +107,8 @@ OMX_ERRORTYPE SoftOMXPlugin::makeComponentInstance(
"_Z22createSoftOMXComponentPKcPK16OMX_CALLBACKTYPE"
"PvPP17OMX_COMPONENTTYPE");
- if (createSoftOMXComponent == NULL) {
+ if (const char *error = dlerror()) {
+ ALOGE("unable to dlsym %s: %s", libName.c_str(), error);
dlclose(libHandle);
libHandle = NULL;