Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0eed1580 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "MultiAccessUnit reflector helper allocated once per ComponentStore"...

Merge "MultiAccessUnit reflector helper allocated once per ComponentStore" into main am: 3eba0898 am: c3cf1de2

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/3261995



Change-Id: I02c78896da0591b0ca3c9b1c7aca112ae7a922be
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b8756d12 c3cf1de2
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -153,6 +153,13 @@ ComponentStore::ComponentStore(const std::shared_ptr<C2ComponentStore>& store)
        mParamReflectors.push_back(paramReflector);
    }
#endif
    // MultiAccessUnit reflector helper is allocated once per store.
    // All components in this store can reuse this reflector helper.
    if (MultiAccessUnitHelper::isEnabledOnPlatform()) {
        std::shared_ptr<C2ReflectorHelper> helper = std::make_shared<C2ReflectorHelper>();
        mParamReflectors.push_back(helper);
        mMultiAccessUnitReflector = helper;
    }

    // Retrieve supported parameters from store
    using namespace std::placeholders;
@@ -240,11 +247,9 @@ std::shared_ptr<MultiAccessUnitInterface> ComponentStore::tryCreateMultiAccessUn
                // 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].
                std::shared_ptr<C2ReflectorHelper> multiAccessReflector(new C2ReflectorHelper());
                multiAccessUnitIntf = std::make_shared<MultiAccessUnitInterface>(
                        c2interface,
                        multiAccessReflector);
                mParamReflectors.push_back(multiAccessReflector);
                        mMultiAccessUnitReflector);
            }
        }
    }
+3 −0
Original line number Diff line number Diff line
@@ -120,6 +120,9 @@ protected:
    std::shared_ptr<C2ComponentStore> mStore;
    std::vector<std::shared_ptr<C2ParamReflector>> mParamReflectors;

    // Reflector helper for MultiAccessUnitHelper
    std::shared_ptr<C2ReflectorHelper> mMultiAccessUnitReflector;

    std::map<C2Param::CoreIndex, std::shared_ptr<C2StructDescriptor>> mStructDescriptors;
    std::set<C2Param::CoreIndex> mUnsupportedStructDescriptors;
    std::set<C2String> mLoadedInterfaces;
+9 −4
Original line number Diff line number Diff line
@@ -149,6 +149,14 @@ ComponentStore::ComponentStore(const std::shared_ptr<C2ComponentStore>& store)
    }
#endif

    // MultiAccessUnit reflector helper is allocated once per store.
    // All components in this store can reuse this reflector helper.
    if (MultiAccessUnitHelper::isEnabledOnPlatform()) {
        std::shared_ptr<C2ReflectorHelper> helper = std::make_shared<C2ReflectorHelper>();
        mParamReflectors.push_back(helper);
        mMultiAccessUnitReflector = helper;
    }

    // Retrieve supported parameters from store
    using namespace std::placeholders;
    mInit = mConfigurable->init(mParameterCache);
@@ -231,12 +239,9 @@ std::shared_ptr<MultiAccessUnitInterface> ComponentStore::tryCreateMultiAccessUn
                }
            }
            if (!isComponentSupportsLargeAudioFrame) {
                std::shared_ptr<C2ReflectorHelper> multiAccessReflector(new C2ReflectorHelper());
                multiAccessUnitIntf = std::make_shared<MultiAccessUnitInterface>(
                        c2interface,
                        multiAccessReflector);
                mParamReflectors.push_back(multiAccessReflector);

                        mMultiAccessUnitReflector);
            }
        }
    }
+3 −0
Original line number Diff line number Diff line
@@ -124,6 +124,9 @@ protected:
    std::shared_ptr<C2ComponentStore> mStore;
    std::vector<std::shared_ptr<C2ParamReflector>> mParamReflectors;

    // Reflector helper for MultiAccessUnitHelper
    std::shared_ptr<C2ReflectorHelper> mMultiAccessUnitReflector;

    std::map<C2Param::CoreIndex, std::shared_ptr<C2StructDescriptor>> mStructDescriptors;
    std::set<C2Param::CoreIndex> mUnsupportedStructDescriptors;
    std::set<C2String> mLoadedInterfaces;
+9 −4
Original line number Diff line number Diff line
@@ -149,6 +149,14 @@ ComponentStore::ComponentStore(const std::shared_ptr<C2ComponentStore>& store)
    }
#endif

    // MultiAccessUnit reflector helper is allocated once per store.
    // All components in this store can reuse this reflector helper.
    if (MultiAccessUnitHelper::isEnabledOnPlatform()) {
        std::shared_ptr<C2ReflectorHelper> helper = std::make_shared<C2ReflectorHelper>();
        mParamReflectors.push_back(helper);
        mMultiAccessUnitReflector = helper;
    }

    // Retrieve supported parameters from store
    using namespace std::placeholders;
    mInit = mConfigurable->init(mParameterCache);
@@ -230,13 +238,10 @@ std::shared_ptr<MultiAccessUnitInterface> ComponentStore::tryCreateMultiAccessUn
                    break;
                }
            }

            if (!isComponentSupportsLargeAudioFrame) {
                std::shared_ptr<C2ReflectorHelper> multiAccessReflector(new C2ReflectorHelper());
                multiAccessUnitIntf = std::make_shared<MultiAccessUnitInterface>(
                        c2interface,
                        multiAccessReflector);
                mParamReflectors.push_back(multiAccessReflector);
                        mMultiAccessUnitReflector);
            }
        }
    }
Loading