Loading media/codec2/hal/aidl/Component.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,7 @@ Component::Component( mListener{listener}, mStore{store}, mBufferPoolSender{clientPoolManager}, mReleased(false), mDeathContext(nullptr) { // Retrieve supported parameters from store // TODO: We could cache this per component/interface type Loading Loading @@ -457,6 +458,7 @@ ScopedAStatus Component::reset() { } ScopedAStatus Component::release() { mReleased = true; c2_status_t status = mComponent->release(); { std::lock_guard<std::mutex> lock(mBlockPoolsMutex); Loading Loading @@ -554,6 +556,10 @@ void Component::OnBinderUnlinked(void *cookie) { } Component::~Component() { if (!mReleased) { this->reset(); this->release(); } InputBufferManager::unregisterFrameData(mListener); mStore->reportComponentDeath(this); if (mDeathRecipient.get()) { Loading media/codec2/hal/aidl/include/codec2/aidl/Component.h +1 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ protected: // destroyBlockPool(), reset() or release(), or by destroying the component. std::map<uint64_t, std::shared_ptr<C2BlockPool>> mBlockPools; bool mBlockFenceSupport; bool mReleased; void initListener(const std::shared_ptr<Component>& self); Loading Loading
media/codec2/hal/aidl/Component.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,7 @@ Component::Component( mListener{listener}, mStore{store}, mBufferPoolSender{clientPoolManager}, mReleased(false), mDeathContext(nullptr) { // Retrieve supported parameters from store // TODO: We could cache this per component/interface type Loading Loading @@ -457,6 +458,7 @@ ScopedAStatus Component::reset() { } ScopedAStatus Component::release() { mReleased = true; c2_status_t status = mComponent->release(); { std::lock_guard<std::mutex> lock(mBlockPoolsMutex); Loading Loading @@ -554,6 +556,10 @@ void Component::OnBinderUnlinked(void *cookie) { } Component::~Component() { if (!mReleased) { this->reset(); this->release(); } InputBufferManager::unregisterFrameData(mListener); mStore->reportComponentDeath(this); if (mDeathRecipient.get()) { Loading
media/codec2/hal/aidl/include/codec2/aidl/Component.h +1 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ protected: // destroyBlockPool(), reset() or release(), or by destroying the component. std::map<uint64_t, std::shared_ptr<C2BlockPool>> mBlockPools; bool mBlockFenceSupport; bool mReleased; void initListener(const std::shared_ptr<Component>& self); Loading