summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/omx/OMXMaster.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2009-12-15 15:22:08 -0800
committerAndreas Huber <andih@google.com>2009-12-15 15:22:08 -0800
commit8ae1d0bdcef22f2bdd8d283e0e615f3ba6c3f4cd (patch)
treed2ac9d7dbbd665bda5f3019ad27db3a925158061 /media/libstagefright/omx/OMXMaster.cpp
parent1af80bc3fefb999756ef4847e72b2dcfd0b88a4a (diff)
downloadframeworks_av-8ae1d0bdcef22f2bdd8d283e0e615f3ba6c3f4cd.zip
frameworks_av-8ae1d0bdcef22f2bdd8d283e0e615f3ba6c3f4cd.tar.gz
frameworks_av-8ae1d0bdcef22f2bdd8d283e0e615f3ba6c3f4cd.tar.bz2
Add a new API to support determining the roles of an OMX component specified by name. Remove unneeded OMXSoftwareCodecsPlugin.
Diffstat (limited to 'media/libstagefright/omx/OMXMaster.cpp')
-rw-r--r--media/libstagefright/omx/OMXMaster.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/media/libstagefright/omx/OMXMaster.cpp b/media/libstagefright/omx/OMXMaster.cpp
index 12302f3..9a45bea 100644
--- a/media/libstagefright/omx/OMXMaster.cpp
+++ b/media/libstagefright/omx/OMXMaster.cpp
@@ -24,14 +24,10 @@
#include "OMXPVCodecsPlugin.h"
#endif
-#include "OMXSoftwareCodecsPlugin.h"
-
namespace android {
OMXMaster::OMXMaster()
: mVendorLibHandle(NULL) {
- addPlugin(new OMXSoftwareCodecsPlugin);
-
addVendorPlugin();
#ifndef NO_OPENCORE
@@ -168,4 +164,21 @@ OMX_ERRORTYPE OMXMaster::enumerateComponents(
return OMX_ErrorNone;
}
+OMX_ERRORTYPE OMXMaster::getRolesOfComponent(
+ const char *name,
+ Vector<String8> *roles) {
+ Mutex::Autolock autoLock(mLock);
+
+ roles->clear();
+
+ ssize_t index = mPluginByComponentName.indexOfKey(String8(name));
+
+ if (index < 0) {
+ return OMX_ErrorInvalidComponentName;
+ }
+
+ OMXPluginBase *plugin = mPluginByComponentName.valueAt(index);
+ return plugin->getRolesOfComponent(name, roles);
+}
+
} // namespace android