Loading media/libstagefright/omx/1.0/Omx.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ #include <media/openmax/OMX_AsString.h> #include <media/stagefright/omx/OMXUtils.h> #include <media/stagefright/omx/OMXMaster.h> #include <media/stagefright/omx/OMXStore.h> #include <media/stagefright/omx/OmxGraphicBufferSource.h> #include <media/stagefright/omx/1.0/WOmxNode.h> Loading @@ -41,21 +41,21 @@ namespace implementation { constexpr size_t kMaxNodeInstances = (1 << 16); Omx::Omx() : mMaster(new OMXMaster()), mStore(new OMXStore()), mParser() { (void)mParser.parseXmlFilesInSearchDirs(); (void)mParser.parseXmlPath(mParser.defaultProfilingResultsXmlPath); } Omx::~Omx() { delete mMaster; delete mStore; } Return<void> Omx::listNodes(listNodes_cb _hidl_cb) { std::list<::android::IOMX::ComponentInfo> list; char componentName[256]; for (OMX_U32 index = 0; mMaster->enumerateComponents( mStore->enumerateComponents( componentName, sizeof(componentName), index) == OMX_ErrorNone; ++index) { list.push_back(::android::IOMX::ComponentInfo()); Loading @@ -63,7 +63,7 @@ Return<void> Omx::listNodes(listNodes_cb _hidl_cb) { info.mName = componentName; ::android::Vector<::android::String8> roles; OMX_ERRORTYPE err = mMaster->getRolesOfComponent(componentName, &roles); mStore->getRolesOfComponent(componentName, &roles); if (err == OMX_ErrorNone) { for (OMX_U32 i = 0; i < roles.size(); ++i) { info.mRoles.push_back(roles[i]); Loading Loading @@ -101,7 +101,7 @@ Return<void> Omx::allocateNode( this, new LWOmxObserver(observer), name.c_str()); OMX_COMPONENTTYPE *handle; OMX_ERRORTYPE err = mMaster->makeComponentInstance( OMX_ERRORTYPE err = mStore->makeComponentInstance( name.c_str(), &OMXNodeInstance::kCallbacks, instance.get(), &handle); Loading Loading @@ -208,7 +208,7 @@ status_t Omx::freeNode(sp<OMXNodeInstance> const& instance) { OMX_ERRORTYPE err = OMX_ErrorNone; if (instance->handle() != NULL) { err = mMaster->destroyComponentInstance( err = mStore->destroyComponentInstance( static_cast<OMX_COMPONENTTYPE*>(instance->handle())); } return StatusFromOMXError(err); Loading media/libstagefright/omx/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ cc_library_shared { double_loadable: true, srcs: [ "OMXMaster.cpp", "OMXStore.cpp", "OMXNodeInstance.cpp", "OMXUtils.cpp", "OmxGraphicBufferSource.cpp", Loading media/libstagefright/omx/OMXNodeInstance.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ #include <inttypes.h> #include <media/stagefright/omx/OMXNodeInstance.h> #include <media/stagefright/omx/OMXMaster.h> #include <media/stagefright/omx/OMXStore.h> #include <media/stagefright/omx/OMXUtils.h> #include <android/IOMXBufferSource.h> Loading media/libstagefright/omx/OMXMaster.cpp→media/libstagefright/omx/OMXStore.cpp +13 −13 Original line number Diff line number Diff line Loading @@ -15,11 +15,11 @@ */ //#define LOG_NDEBUG 0 #define LOG_TAG "OMXMaster" #define LOG_TAG "OMXStore" #include <android-base/properties.h> #include <utils/Log.h> #include <media/stagefright/omx/OMXMaster.h> #include <media/stagefright/omx/OMXStore.h> #include <media/stagefright/omx/SoftOMXPlugin.h> #include <media/stagefright/foundation/ADebug.h> Loading @@ -30,7 +30,7 @@ namespace android { OMXMaster::OMXMaster() { OMXStore::OMXStore() { pid_t pid = getpid(); char filename[20]; Loading @@ -55,19 +55,19 @@ OMXMaster::OMXMaster() { addPlatformPlugin(); } OMXMaster::~OMXMaster() { OMXStore::~OMXStore() { clearPlugins(); } void OMXMaster::addVendorPlugin() { void OMXStore::addVendorPlugin() { addPlugin("libstagefrighthw.so"); } void OMXMaster::addPlatformPlugin() { void OMXStore::addPlatformPlugin() { addPlugin("libstagefright_softomx_plugin.so"); } void OMXMaster::addPlugin(const char *libname) { void OMXStore::addPlugin(const char *libname) { if (::android::base::GetIntProperty("vendor.media.omx", int64_t(1)) == 0) { return; } Loading Loading @@ -99,7 +99,7 @@ void OMXMaster::addPlugin(const char *libname) { } } void OMXMaster::addPlugin(OMXPluginBase *plugin) { void OMXStore::addPlugin(OMXPluginBase *plugin) { Mutex::Autolock autoLock(mLock); OMX_U32 index = 0; Loading @@ -126,7 +126,7 @@ void OMXMaster::addPlugin(OMXPluginBase *plugin) { } } void OMXMaster::clearPlugins() { void OMXStore::clearPlugins() { Mutex::Autolock autoLock(mLock); mPluginByComponentName.clear(); Loading @@ -148,7 +148,7 @@ void OMXMaster::clearPlugins() { mPlugins.clear(); } OMX_ERRORTYPE OMXMaster::makeComponentInstance( OMX_ERRORTYPE OMXStore::makeComponentInstance( const char *name, const OMX_CALLBACKTYPE *callbacks, OMX_PTR appData, Loading Loading @@ -177,7 +177,7 @@ OMX_ERRORTYPE OMXMaster::makeComponentInstance( return err; } OMX_ERRORTYPE OMXMaster::destroyComponentInstance( OMX_ERRORTYPE OMXStore::destroyComponentInstance( OMX_COMPONENTTYPE *component) { Mutex::Autolock autoLock(mLock); Loading @@ -193,7 +193,7 @@ OMX_ERRORTYPE OMXMaster::destroyComponentInstance( return plugin->destroyComponentInstance(component); } OMX_ERRORTYPE OMXMaster::enumerateComponents( OMX_ERRORTYPE OMXStore::enumerateComponents( OMX_STRING name, size_t size, OMX_U32 index) { Loading @@ -213,7 +213,7 @@ OMX_ERRORTYPE OMXMaster::enumerateComponents( return OMX_ErrorNone; } OMX_ERRORTYPE OMXMaster::getRolesOfComponent( OMX_ERRORTYPE OMXStore::getRolesOfComponent( const char *name, Vector<String8> *roles) { Mutex::Autolock autoLock(mLock); Loading media/libstagefright/omx/include/media/stagefright/omx/1.0/Omx.h +3 −3 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ namespace android { struct OMXMaster; struct OMXStore; struct OMXNodeInstance; namespace hardware { Loading @@ -51,7 +51,7 @@ using ::android::hardware::Void; using ::android::sp; using ::android::wp; using ::android::OMXMaster; using ::android::OMXStore; using ::android::OMXNodeInstance; struct Omx : public IOmx, public hidl_death_recipient { Loading @@ -73,7 +73,7 @@ struct Omx : public IOmx, public hidl_death_recipient { status_t freeNode(sp<OMXNodeInstance> const& instance); protected: OMXMaster* mMaster; OMXStore* mStore; Mutex mLock; KeyedVector<wp<IBase>, sp<OMXNodeInstance> > mLiveNodes; KeyedVector<OMXNodeInstance*, wp<IBase> > mNode2Observer; Loading Loading
media/libstagefright/omx/1.0/Omx.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ #include <media/openmax/OMX_AsString.h> #include <media/stagefright/omx/OMXUtils.h> #include <media/stagefright/omx/OMXMaster.h> #include <media/stagefright/omx/OMXStore.h> #include <media/stagefright/omx/OmxGraphicBufferSource.h> #include <media/stagefright/omx/1.0/WOmxNode.h> Loading @@ -41,21 +41,21 @@ namespace implementation { constexpr size_t kMaxNodeInstances = (1 << 16); Omx::Omx() : mMaster(new OMXMaster()), mStore(new OMXStore()), mParser() { (void)mParser.parseXmlFilesInSearchDirs(); (void)mParser.parseXmlPath(mParser.defaultProfilingResultsXmlPath); } Omx::~Omx() { delete mMaster; delete mStore; } Return<void> Omx::listNodes(listNodes_cb _hidl_cb) { std::list<::android::IOMX::ComponentInfo> list; char componentName[256]; for (OMX_U32 index = 0; mMaster->enumerateComponents( mStore->enumerateComponents( componentName, sizeof(componentName), index) == OMX_ErrorNone; ++index) { list.push_back(::android::IOMX::ComponentInfo()); Loading @@ -63,7 +63,7 @@ Return<void> Omx::listNodes(listNodes_cb _hidl_cb) { info.mName = componentName; ::android::Vector<::android::String8> roles; OMX_ERRORTYPE err = mMaster->getRolesOfComponent(componentName, &roles); mStore->getRolesOfComponent(componentName, &roles); if (err == OMX_ErrorNone) { for (OMX_U32 i = 0; i < roles.size(); ++i) { info.mRoles.push_back(roles[i]); Loading Loading @@ -101,7 +101,7 @@ Return<void> Omx::allocateNode( this, new LWOmxObserver(observer), name.c_str()); OMX_COMPONENTTYPE *handle; OMX_ERRORTYPE err = mMaster->makeComponentInstance( OMX_ERRORTYPE err = mStore->makeComponentInstance( name.c_str(), &OMXNodeInstance::kCallbacks, instance.get(), &handle); Loading Loading @@ -208,7 +208,7 @@ status_t Omx::freeNode(sp<OMXNodeInstance> const& instance) { OMX_ERRORTYPE err = OMX_ErrorNone; if (instance->handle() != NULL) { err = mMaster->destroyComponentInstance( err = mStore->destroyComponentInstance( static_cast<OMX_COMPONENTTYPE*>(instance->handle())); } return StatusFromOMXError(err); Loading
media/libstagefright/omx/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ cc_library_shared { double_loadable: true, srcs: [ "OMXMaster.cpp", "OMXStore.cpp", "OMXNodeInstance.cpp", "OMXUtils.cpp", "OmxGraphicBufferSource.cpp", Loading
media/libstagefright/omx/OMXNodeInstance.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ #include <inttypes.h> #include <media/stagefright/omx/OMXNodeInstance.h> #include <media/stagefright/omx/OMXMaster.h> #include <media/stagefright/omx/OMXStore.h> #include <media/stagefright/omx/OMXUtils.h> #include <android/IOMXBufferSource.h> Loading
media/libstagefright/omx/OMXMaster.cpp→media/libstagefright/omx/OMXStore.cpp +13 −13 Original line number Diff line number Diff line Loading @@ -15,11 +15,11 @@ */ //#define LOG_NDEBUG 0 #define LOG_TAG "OMXMaster" #define LOG_TAG "OMXStore" #include <android-base/properties.h> #include <utils/Log.h> #include <media/stagefright/omx/OMXMaster.h> #include <media/stagefright/omx/OMXStore.h> #include <media/stagefright/omx/SoftOMXPlugin.h> #include <media/stagefright/foundation/ADebug.h> Loading @@ -30,7 +30,7 @@ namespace android { OMXMaster::OMXMaster() { OMXStore::OMXStore() { pid_t pid = getpid(); char filename[20]; Loading @@ -55,19 +55,19 @@ OMXMaster::OMXMaster() { addPlatformPlugin(); } OMXMaster::~OMXMaster() { OMXStore::~OMXStore() { clearPlugins(); } void OMXMaster::addVendorPlugin() { void OMXStore::addVendorPlugin() { addPlugin("libstagefrighthw.so"); } void OMXMaster::addPlatformPlugin() { void OMXStore::addPlatformPlugin() { addPlugin("libstagefright_softomx_plugin.so"); } void OMXMaster::addPlugin(const char *libname) { void OMXStore::addPlugin(const char *libname) { if (::android::base::GetIntProperty("vendor.media.omx", int64_t(1)) == 0) { return; } Loading Loading @@ -99,7 +99,7 @@ void OMXMaster::addPlugin(const char *libname) { } } void OMXMaster::addPlugin(OMXPluginBase *plugin) { void OMXStore::addPlugin(OMXPluginBase *plugin) { Mutex::Autolock autoLock(mLock); OMX_U32 index = 0; Loading @@ -126,7 +126,7 @@ void OMXMaster::addPlugin(OMXPluginBase *plugin) { } } void OMXMaster::clearPlugins() { void OMXStore::clearPlugins() { Mutex::Autolock autoLock(mLock); mPluginByComponentName.clear(); Loading @@ -148,7 +148,7 @@ void OMXMaster::clearPlugins() { mPlugins.clear(); } OMX_ERRORTYPE OMXMaster::makeComponentInstance( OMX_ERRORTYPE OMXStore::makeComponentInstance( const char *name, const OMX_CALLBACKTYPE *callbacks, OMX_PTR appData, Loading Loading @@ -177,7 +177,7 @@ OMX_ERRORTYPE OMXMaster::makeComponentInstance( return err; } OMX_ERRORTYPE OMXMaster::destroyComponentInstance( OMX_ERRORTYPE OMXStore::destroyComponentInstance( OMX_COMPONENTTYPE *component) { Mutex::Autolock autoLock(mLock); Loading @@ -193,7 +193,7 @@ OMX_ERRORTYPE OMXMaster::destroyComponentInstance( return plugin->destroyComponentInstance(component); } OMX_ERRORTYPE OMXMaster::enumerateComponents( OMX_ERRORTYPE OMXStore::enumerateComponents( OMX_STRING name, size_t size, OMX_U32 index) { Loading @@ -213,7 +213,7 @@ OMX_ERRORTYPE OMXMaster::enumerateComponents( return OMX_ErrorNone; } OMX_ERRORTYPE OMXMaster::getRolesOfComponent( OMX_ERRORTYPE OMXStore::getRolesOfComponent( const char *name, Vector<String8> *roles) { Mutex::Autolock autoLock(mLock); Loading
media/libstagefright/omx/include/media/stagefright/omx/1.0/Omx.h +3 −3 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ namespace android { struct OMXMaster; struct OMXStore; struct OMXNodeInstance; namespace hardware { Loading @@ -51,7 +51,7 @@ using ::android::hardware::Void; using ::android::sp; using ::android::wp; using ::android::OMXMaster; using ::android::OMXStore; using ::android::OMXNodeInstance; struct Omx : public IOmx, public hidl_death_recipient { Loading @@ -73,7 +73,7 @@ struct Omx : public IOmx, public hidl_death_recipient { status_t freeNode(sp<OMXNodeInstance> const& instance); protected: OMXMaster* mMaster; OMXStore* mStore; Mutex mLock; KeyedVector<wp<IBase>, sp<OMXNodeInstance> > mLiveNodes; KeyedVector<OMXNodeInstance*, wp<IBase> > mNode2Observer; Loading