Loading media/codec2/hal/aidl/ComponentStore.cpp +32 −11 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ #include <ostream> #include <sstream> #ifndef __ANDROID_APEX__ #ifndef __ANDROID_APEX__ // Filters are not supported for APEX modules #include <codec2/hidl/plugin/FilterPlugin.h> #include <dlfcn.h> #include <C2Config.h> Loading @@ -51,7 +51,7 @@ namespace media { namespace c2 { namespace utils { #ifndef __ANDROID_APEX__ #ifndef __ANDROID_APEX__ // Filters are not supported for APEX modules using ::android::DefaultFilterPlugin; using ::android::FilterWrapper; #endif Loading Loading @@ -144,7 +144,15 @@ ComponentStore::ComponentStore(const std::shared_ptr<C2ComponentStore>& store) ::android::SetPreferredCodec2ComponentStore(store); // Retrieve struct descriptors mParamReflector = mStore->getParamReflector(); mParamReflectors.push_back(mStore->getParamReflector()); #ifndef __ANDROID_APEX__ // Filters are not supported for APEX modules std::shared_ptr<C2ParamReflector> paramReflector = GetFilterWrapper()->getParamReflector(); if (paramReflector != nullptr) { ALOGD("[%s] added param reflector from filter wrapper", mStore->getName().c_str()); mParamReflectors.push_back(paramReflector); } #endif // Retrieve supported parameters from store using namespace std::placeholders; Loading Loading @@ -173,8 +181,7 @@ c2_status_t ComponentStore::validateSupportedParams( std::lock_guard<std::mutex> lock(mStructDescriptorsMutex); auto it = mStructDescriptors.find(coreIndex); if (it == mStructDescriptors.end()) { std::shared_ptr<C2StructDescriptor> structDesc = mParamReflector->describe(coreIndex); std::shared_ptr<C2StructDescriptor> structDesc = describe(coreIndex); if (!structDesc) { // All supported params must be described res = C2_BAD_INDEX; Loading @@ -189,7 +196,7 @@ std::shared_ptr<ParameterCache> ComponentStore::getParameterCache() const { return mParameterCache; } #ifndef __ANDROID_APEX__ #ifndef __ANDROID_APEX__ // Filters are not supported for APEX modules // static std::shared_ptr<FilterWrapper> ComponentStore::GetFilterWrapper() { constexpr const char kPluginPath[] = "libc2filterplugin.so"; Loading Loading @@ -221,8 +228,13 @@ std::shared_ptr<MultiAccessUnitInterface> ComponentStore::tryCreateMultiAccessUn } } if (!isComponentSupportsLargeAudioFrame) { // TODO - b/342269852: MultiAccessUnitInterface also needs to take multiple // param reflectors. Currently filters work on video domain only, // and the MultiAccessUnitHelper is only enabled on audio domain; // thus we pass the component's param reflector, which is mParamReflectors[0]. multiAccessUnitIntf = std::make_shared<MultiAccessUnitInterface>( c2interface, std::static_pointer_cast<C2ReflectorHelper>(mParamReflector)); c2interface, std::static_pointer_cast<C2ReflectorHelper>(mParamReflectors[0])); } } } Loading Loading @@ -250,7 +262,7 @@ ScopedAStatus ComponentStore::createComponent( mStore->createComponent(name, &c2component); if (status == C2_OK) { #ifndef __ANDROID_APEX__ #ifndef __ANDROID_APEX__ // Filters are not supported for APEX modules c2component = GetFilterWrapper()->maybeWrapComponent(c2component); #endif onInterfaceLoaded(c2component->intf()); Loading Loading @@ -284,7 +296,7 @@ ScopedAStatus ComponentStore::createInterface( std::shared_ptr<C2ComponentInterface> c2interface; c2_status_t res = mStore->createInterface(name, &c2interface); if (res == C2_OK) { #ifndef __ANDROID_APEX__ #ifndef __ANDROID_APEX__ // Filters are not supported for APEX modules c2interface = GetFilterWrapper()->maybeWrapInterface(c2interface); #endif onInterfaceLoaded(c2interface); Loading Loading @@ -347,8 +359,7 @@ ScopedAStatus ComponentStore::getStructDescriptors( if (item == mStructDescriptors.end()) { // not in the cache, and not known to be unsupported, query local reflector if (!mUnsupportedStructDescriptors.count(coreIndex)) { std::shared_ptr<C2StructDescriptor> structDesc = mParamReflector->describe(coreIndex); std::shared_ptr<C2StructDescriptor> structDesc = describe(coreIndex); if (!structDesc) { mUnsupportedStructDescriptors.emplace(coreIndex); } else { Loading Loading @@ -401,6 +412,16 @@ ScopedAStatus ComponentStore::getConfigurable( return ScopedAStatus::ok(); } std::shared_ptr<C2StructDescriptor> ComponentStore::describe(const C2Param::CoreIndex &index) { for (const std::shared_ptr<C2ParamReflector> &reflector : mParamReflectors) { std::shared_ptr<C2StructDescriptor> desc = reflector->describe(index); if (desc) { return desc; } } return nullptr; } // Called from createComponent() after a successful creation of `component`. void ComponentStore::reportComponentBirth(Component* component) { ComponentStatus componentStatus; Loading media/codec2/hal/aidl/include/codec2/aidl/ComponentStore.h +4 −1 Original line number Diff line number Diff line Loading @@ -118,7 +118,7 @@ protected: c2_status_t mInit; std::shared_ptr<C2ComponentStore> mStore; std::shared_ptr<C2ParamReflector> mParamReflector; std::vector<std::shared_ptr<C2ParamReflector>> mParamReflectors; std::map<C2Param::CoreIndex, std::shared_ptr<C2StructDescriptor>> mStructDescriptors; std::set<C2Param::CoreIndex> mUnsupportedStructDescriptors; Loading @@ -135,6 +135,9 @@ protected: mutable std::mutex mComponentRosterMutex; std::map<Component*, ComponentStatus> mComponentRoster; // describe from mParamReflectors std::shared_ptr<C2StructDescriptor> describe(const C2Param::CoreIndex &index); // Called whenever Component is created. void reportComponentBirth(Component* component); // Called only from the destructor of Component. Loading media/codec2/hal/hidl/1.0/utils/ComponentStore.cpp +23 −6 Original line number Diff line number Diff line Loading @@ -139,7 +139,15 @@ ComponentStore::ComponentStore(const std::shared_ptr<C2ComponentStore>& store) SetPreferredCodec2ComponentStore(store); // Retrieve struct descriptors mParamReflector = mStore->getParamReflector(); mParamReflectors.push_back(mStore->getParamReflector()); #ifndef __ANDROID_APEX__ std::shared_ptr<C2ParamReflector> paramReflector = GetFilterWrapper()->getParamReflector(); if (paramReflector != nullptr) { ALOGD("[%s] added param reflector from filter wrapper", mStore->getName().c_str()); mParamReflectors.push_back(paramReflector); } #endif // Retrieve supported parameters from store using namespace std::placeholders; Loading Loading @@ -168,8 +176,7 @@ c2_status_t ComponentStore::validateSupportedParams( std::lock_guard<std::mutex> lock(mStructDescriptorsMutex); auto it = mStructDescriptors.find(coreIndex); if (it == mStructDescriptors.end()) { std::shared_ptr<C2StructDescriptor> structDesc = mParamReflector->describe(coreIndex); std::shared_ptr<C2StructDescriptor> structDesc = describe(coreIndex); if (!structDesc) { // All supported params must be described res = C2_BAD_INDEX; Loading Loading @@ -217,7 +224,8 @@ std::shared_ptr<MultiAccessUnitInterface> ComponentStore::tryCreateMultiAccessUn } if (!isComponentSupportsLargeAudioFrame) { multiAccessUnitIntf = std::make_shared<MultiAccessUnitInterface>( c2interface, std::static_pointer_cast<C2ReflectorHelper>(mParamReflector)); c2interface, std::static_pointer_cast<C2ReflectorHelper>(mParamReflectors[0])); } } } Loading Loading @@ -339,8 +347,7 @@ Return<void> ComponentStore::getStructDescriptors( if (item == mStructDescriptors.end()) { // not in the cache, and not known to be unsupported, query local reflector if (!mUnsupportedStructDescriptors.count(coreIndex)) { std::shared_ptr<C2StructDescriptor> structDesc = mParamReflector->describe(coreIndex); std::shared_ptr<C2StructDescriptor> structDesc = describe(coreIndex); if (!structDesc) { mUnsupportedStructDescriptors.emplace(coreIndex); } else { Loading Loading @@ -386,6 +393,16 @@ Return<sp<IConfigurable>> ComponentStore::getConfigurable() { return mConfigurable; } std::shared_ptr<C2StructDescriptor> ComponentStore::describe(const C2Param::CoreIndex &index) { for (const std::shared_ptr<C2ParamReflector> &reflector : mParamReflectors) { std::shared_ptr<C2StructDescriptor> desc = reflector->describe(index); if (desc) { return desc; } } return nullptr; } // Called from createComponent() after a successful creation of `component`. void ComponentStore::reportComponentBirth(Component* component) { ComponentStatus componentStatus; Loading media/codec2/hal/hidl/1.0/utils/include/codec2/hidl/1.0/ComponentStore.h +4 −1 Original line number Diff line number Diff line Loading @@ -117,9 +117,12 @@ protected: // Does bookkeeping for an interface that has been loaded. void onInterfaceLoaded(const std::shared_ptr<C2ComponentInterface> &intf); // describe from mParamReflectors std::shared_ptr<C2StructDescriptor> describe(const C2Param::CoreIndex &index); c2_status_t mInit; std::shared_ptr<C2ComponentStore> mStore; std::shared_ptr<C2ParamReflector> mParamReflector; std::vector<std::shared_ptr<C2ParamReflector>> mParamReflectors; std::map<C2Param::CoreIndex, std::shared_ptr<C2StructDescriptor>> mStructDescriptors; std::set<C2Param::CoreIndex> mUnsupportedStructDescriptors; Loading media/codec2/hal/hidl/1.1/utils/ComponentStore.cpp +23 −6 Original line number Diff line number Diff line Loading @@ -139,7 +139,15 @@ ComponentStore::ComponentStore(const std::shared_ptr<C2ComponentStore>& store) SetPreferredCodec2ComponentStore(store); // Retrieve struct descriptors mParamReflector = mStore->getParamReflector(); mParamReflectors.push_back(mStore->getParamReflector()); #ifndef __ANDROID_APEX__ std::shared_ptr<C2ParamReflector> paramReflector = GetFilterWrapper()->getParamReflector(); if (paramReflector != nullptr) { ALOGD("[%s] added param reflector from filter wrapper", mStore->getName().c_str()); mParamReflectors.push_back(paramReflector); } #endif // Retrieve supported parameters from store using namespace std::placeholders; Loading Loading @@ -168,8 +176,7 @@ c2_status_t ComponentStore::validateSupportedParams( std::lock_guard<std::mutex> lock(mStructDescriptorsMutex); auto it = mStructDescriptors.find(coreIndex); if (it == mStructDescriptors.end()) { std::shared_ptr<C2StructDescriptor> structDesc = mParamReflector->describe(coreIndex); std::shared_ptr<C2StructDescriptor> structDesc = describe(coreIndex); if (!structDesc) { // All supported params must be described res = C2_BAD_INDEX; Loading Loading @@ -218,7 +225,8 @@ std::shared_ptr<MultiAccessUnitInterface> ComponentStore::tryCreateMultiAccessUn if (!isComponentSupportsLargeAudioFrame) { multiAccessUnitIntf = std::make_shared<MultiAccessUnitInterface>( c2interface, std::static_pointer_cast<C2ReflectorHelper>(mParamReflector)); c2interface, std::static_pointer_cast<C2ReflectorHelper>(mParamReflectors[0])); } } } Loading Loading @@ -340,8 +348,7 @@ Return<void> ComponentStore::getStructDescriptors( if (item == mStructDescriptors.end()) { // not in the cache, and not known to be unsupported, query local reflector if (!mUnsupportedStructDescriptors.count(coreIndex)) { std::shared_ptr<C2StructDescriptor> structDesc = mParamReflector->describe(coreIndex); std::shared_ptr<C2StructDescriptor> structDesc = describe(coreIndex); if (!structDesc) { mUnsupportedStructDescriptors.emplace(coreIndex); } else { Loading Loading @@ -423,6 +430,16 @@ Return<void> ComponentStore::createComponent_1_1( return Void(); } std::shared_ptr<C2StructDescriptor> ComponentStore::describe(const C2Param::CoreIndex &index) { for (const std::shared_ptr<C2ParamReflector> &reflector : mParamReflectors) { std::shared_ptr<C2StructDescriptor> desc = reflector->describe(index); if (desc) { return desc; } } return nullptr; } // Called from createComponent() after a successful creation of `component`. void ComponentStore::reportComponentBirth(Component* component) { ComponentStatus componentStatus; Loading Loading
media/codec2/hal/aidl/ComponentStore.cpp +32 −11 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ #include <ostream> #include <sstream> #ifndef __ANDROID_APEX__ #ifndef __ANDROID_APEX__ // Filters are not supported for APEX modules #include <codec2/hidl/plugin/FilterPlugin.h> #include <dlfcn.h> #include <C2Config.h> Loading @@ -51,7 +51,7 @@ namespace media { namespace c2 { namespace utils { #ifndef __ANDROID_APEX__ #ifndef __ANDROID_APEX__ // Filters are not supported for APEX modules using ::android::DefaultFilterPlugin; using ::android::FilterWrapper; #endif Loading Loading @@ -144,7 +144,15 @@ ComponentStore::ComponentStore(const std::shared_ptr<C2ComponentStore>& store) ::android::SetPreferredCodec2ComponentStore(store); // Retrieve struct descriptors mParamReflector = mStore->getParamReflector(); mParamReflectors.push_back(mStore->getParamReflector()); #ifndef __ANDROID_APEX__ // Filters are not supported for APEX modules std::shared_ptr<C2ParamReflector> paramReflector = GetFilterWrapper()->getParamReflector(); if (paramReflector != nullptr) { ALOGD("[%s] added param reflector from filter wrapper", mStore->getName().c_str()); mParamReflectors.push_back(paramReflector); } #endif // Retrieve supported parameters from store using namespace std::placeholders; Loading Loading @@ -173,8 +181,7 @@ c2_status_t ComponentStore::validateSupportedParams( std::lock_guard<std::mutex> lock(mStructDescriptorsMutex); auto it = mStructDescriptors.find(coreIndex); if (it == mStructDescriptors.end()) { std::shared_ptr<C2StructDescriptor> structDesc = mParamReflector->describe(coreIndex); std::shared_ptr<C2StructDescriptor> structDesc = describe(coreIndex); if (!structDesc) { // All supported params must be described res = C2_BAD_INDEX; Loading @@ -189,7 +196,7 @@ std::shared_ptr<ParameterCache> ComponentStore::getParameterCache() const { return mParameterCache; } #ifndef __ANDROID_APEX__ #ifndef __ANDROID_APEX__ // Filters are not supported for APEX modules // static std::shared_ptr<FilterWrapper> ComponentStore::GetFilterWrapper() { constexpr const char kPluginPath[] = "libc2filterplugin.so"; Loading Loading @@ -221,8 +228,13 @@ std::shared_ptr<MultiAccessUnitInterface> ComponentStore::tryCreateMultiAccessUn } } if (!isComponentSupportsLargeAudioFrame) { // TODO - b/342269852: MultiAccessUnitInterface also needs to take multiple // param reflectors. Currently filters work on video domain only, // and the MultiAccessUnitHelper is only enabled on audio domain; // thus we pass the component's param reflector, which is mParamReflectors[0]. multiAccessUnitIntf = std::make_shared<MultiAccessUnitInterface>( c2interface, std::static_pointer_cast<C2ReflectorHelper>(mParamReflector)); c2interface, std::static_pointer_cast<C2ReflectorHelper>(mParamReflectors[0])); } } } Loading Loading @@ -250,7 +262,7 @@ ScopedAStatus ComponentStore::createComponent( mStore->createComponent(name, &c2component); if (status == C2_OK) { #ifndef __ANDROID_APEX__ #ifndef __ANDROID_APEX__ // Filters are not supported for APEX modules c2component = GetFilterWrapper()->maybeWrapComponent(c2component); #endif onInterfaceLoaded(c2component->intf()); Loading Loading @@ -284,7 +296,7 @@ ScopedAStatus ComponentStore::createInterface( std::shared_ptr<C2ComponentInterface> c2interface; c2_status_t res = mStore->createInterface(name, &c2interface); if (res == C2_OK) { #ifndef __ANDROID_APEX__ #ifndef __ANDROID_APEX__ // Filters are not supported for APEX modules c2interface = GetFilterWrapper()->maybeWrapInterface(c2interface); #endif onInterfaceLoaded(c2interface); Loading Loading @@ -347,8 +359,7 @@ ScopedAStatus ComponentStore::getStructDescriptors( if (item == mStructDescriptors.end()) { // not in the cache, and not known to be unsupported, query local reflector if (!mUnsupportedStructDescriptors.count(coreIndex)) { std::shared_ptr<C2StructDescriptor> structDesc = mParamReflector->describe(coreIndex); std::shared_ptr<C2StructDescriptor> structDesc = describe(coreIndex); if (!structDesc) { mUnsupportedStructDescriptors.emplace(coreIndex); } else { Loading Loading @@ -401,6 +412,16 @@ ScopedAStatus ComponentStore::getConfigurable( return ScopedAStatus::ok(); } std::shared_ptr<C2StructDescriptor> ComponentStore::describe(const C2Param::CoreIndex &index) { for (const std::shared_ptr<C2ParamReflector> &reflector : mParamReflectors) { std::shared_ptr<C2StructDescriptor> desc = reflector->describe(index); if (desc) { return desc; } } return nullptr; } // Called from createComponent() after a successful creation of `component`. void ComponentStore::reportComponentBirth(Component* component) { ComponentStatus componentStatus; Loading
media/codec2/hal/aidl/include/codec2/aidl/ComponentStore.h +4 −1 Original line number Diff line number Diff line Loading @@ -118,7 +118,7 @@ protected: c2_status_t mInit; std::shared_ptr<C2ComponentStore> mStore; std::shared_ptr<C2ParamReflector> mParamReflector; std::vector<std::shared_ptr<C2ParamReflector>> mParamReflectors; std::map<C2Param::CoreIndex, std::shared_ptr<C2StructDescriptor>> mStructDescriptors; std::set<C2Param::CoreIndex> mUnsupportedStructDescriptors; Loading @@ -135,6 +135,9 @@ protected: mutable std::mutex mComponentRosterMutex; std::map<Component*, ComponentStatus> mComponentRoster; // describe from mParamReflectors std::shared_ptr<C2StructDescriptor> describe(const C2Param::CoreIndex &index); // Called whenever Component is created. void reportComponentBirth(Component* component); // Called only from the destructor of Component. Loading
media/codec2/hal/hidl/1.0/utils/ComponentStore.cpp +23 −6 Original line number Diff line number Diff line Loading @@ -139,7 +139,15 @@ ComponentStore::ComponentStore(const std::shared_ptr<C2ComponentStore>& store) SetPreferredCodec2ComponentStore(store); // Retrieve struct descriptors mParamReflector = mStore->getParamReflector(); mParamReflectors.push_back(mStore->getParamReflector()); #ifndef __ANDROID_APEX__ std::shared_ptr<C2ParamReflector> paramReflector = GetFilterWrapper()->getParamReflector(); if (paramReflector != nullptr) { ALOGD("[%s] added param reflector from filter wrapper", mStore->getName().c_str()); mParamReflectors.push_back(paramReflector); } #endif // Retrieve supported parameters from store using namespace std::placeholders; Loading Loading @@ -168,8 +176,7 @@ c2_status_t ComponentStore::validateSupportedParams( std::lock_guard<std::mutex> lock(mStructDescriptorsMutex); auto it = mStructDescriptors.find(coreIndex); if (it == mStructDescriptors.end()) { std::shared_ptr<C2StructDescriptor> structDesc = mParamReflector->describe(coreIndex); std::shared_ptr<C2StructDescriptor> structDesc = describe(coreIndex); if (!structDesc) { // All supported params must be described res = C2_BAD_INDEX; Loading Loading @@ -217,7 +224,8 @@ std::shared_ptr<MultiAccessUnitInterface> ComponentStore::tryCreateMultiAccessUn } if (!isComponentSupportsLargeAudioFrame) { multiAccessUnitIntf = std::make_shared<MultiAccessUnitInterface>( c2interface, std::static_pointer_cast<C2ReflectorHelper>(mParamReflector)); c2interface, std::static_pointer_cast<C2ReflectorHelper>(mParamReflectors[0])); } } } Loading Loading @@ -339,8 +347,7 @@ Return<void> ComponentStore::getStructDescriptors( if (item == mStructDescriptors.end()) { // not in the cache, and not known to be unsupported, query local reflector if (!mUnsupportedStructDescriptors.count(coreIndex)) { std::shared_ptr<C2StructDescriptor> structDesc = mParamReflector->describe(coreIndex); std::shared_ptr<C2StructDescriptor> structDesc = describe(coreIndex); if (!structDesc) { mUnsupportedStructDescriptors.emplace(coreIndex); } else { Loading Loading @@ -386,6 +393,16 @@ Return<sp<IConfigurable>> ComponentStore::getConfigurable() { return mConfigurable; } std::shared_ptr<C2StructDescriptor> ComponentStore::describe(const C2Param::CoreIndex &index) { for (const std::shared_ptr<C2ParamReflector> &reflector : mParamReflectors) { std::shared_ptr<C2StructDescriptor> desc = reflector->describe(index); if (desc) { return desc; } } return nullptr; } // Called from createComponent() after a successful creation of `component`. void ComponentStore::reportComponentBirth(Component* component) { ComponentStatus componentStatus; Loading
media/codec2/hal/hidl/1.0/utils/include/codec2/hidl/1.0/ComponentStore.h +4 −1 Original line number Diff line number Diff line Loading @@ -117,9 +117,12 @@ protected: // Does bookkeeping for an interface that has been loaded. void onInterfaceLoaded(const std::shared_ptr<C2ComponentInterface> &intf); // describe from mParamReflectors std::shared_ptr<C2StructDescriptor> describe(const C2Param::CoreIndex &index); c2_status_t mInit; std::shared_ptr<C2ComponentStore> mStore; std::shared_ptr<C2ParamReflector> mParamReflector; std::vector<std::shared_ptr<C2ParamReflector>> mParamReflectors; std::map<C2Param::CoreIndex, std::shared_ptr<C2StructDescriptor>> mStructDescriptors; std::set<C2Param::CoreIndex> mUnsupportedStructDescriptors; Loading
media/codec2/hal/hidl/1.1/utils/ComponentStore.cpp +23 −6 Original line number Diff line number Diff line Loading @@ -139,7 +139,15 @@ ComponentStore::ComponentStore(const std::shared_ptr<C2ComponentStore>& store) SetPreferredCodec2ComponentStore(store); // Retrieve struct descriptors mParamReflector = mStore->getParamReflector(); mParamReflectors.push_back(mStore->getParamReflector()); #ifndef __ANDROID_APEX__ std::shared_ptr<C2ParamReflector> paramReflector = GetFilterWrapper()->getParamReflector(); if (paramReflector != nullptr) { ALOGD("[%s] added param reflector from filter wrapper", mStore->getName().c_str()); mParamReflectors.push_back(paramReflector); } #endif // Retrieve supported parameters from store using namespace std::placeholders; Loading Loading @@ -168,8 +176,7 @@ c2_status_t ComponentStore::validateSupportedParams( std::lock_guard<std::mutex> lock(mStructDescriptorsMutex); auto it = mStructDescriptors.find(coreIndex); if (it == mStructDescriptors.end()) { std::shared_ptr<C2StructDescriptor> structDesc = mParamReflector->describe(coreIndex); std::shared_ptr<C2StructDescriptor> structDesc = describe(coreIndex); if (!structDesc) { // All supported params must be described res = C2_BAD_INDEX; Loading Loading @@ -218,7 +225,8 @@ std::shared_ptr<MultiAccessUnitInterface> ComponentStore::tryCreateMultiAccessUn if (!isComponentSupportsLargeAudioFrame) { multiAccessUnitIntf = std::make_shared<MultiAccessUnitInterface>( c2interface, std::static_pointer_cast<C2ReflectorHelper>(mParamReflector)); c2interface, std::static_pointer_cast<C2ReflectorHelper>(mParamReflectors[0])); } } } Loading Loading @@ -340,8 +348,7 @@ Return<void> ComponentStore::getStructDescriptors( if (item == mStructDescriptors.end()) { // not in the cache, and not known to be unsupported, query local reflector if (!mUnsupportedStructDescriptors.count(coreIndex)) { std::shared_ptr<C2StructDescriptor> structDesc = mParamReflector->describe(coreIndex); std::shared_ptr<C2StructDescriptor> structDesc = describe(coreIndex); if (!structDesc) { mUnsupportedStructDescriptors.emplace(coreIndex); } else { Loading Loading @@ -423,6 +430,16 @@ Return<void> ComponentStore::createComponent_1_1( return Void(); } std::shared_ptr<C2StructDescriptor> ComponentStore::describe(const C2Param::CoreIndex &index) { for (const std::shared_ptr<C2ParamReflector> &reflector : mParamReflectors) { std::shared_ptr<C2StructDescriptor> desc = reflector->describe(index); if (desc) { return desc; } } return nullptr; } // Called from createComponent() after a successful creation of `component`. void ComponentStore::reportComponentBirth(Component* component) { ComponentStatus componentStatus; Loading