Loading media/codec2/hal/aidl/Component.cpp +13 −1 Original line number Diff line number Diff line Loading @@ -487,7 +487,19 @@ void Component::initListener(const std::shared_ptr<Component>& self) { if (__builtin_available(android __ANDROID_API_T__, *)) { std::shared_ptr<C2Component::Listener> c2listener; if (mMultiAccessUnitIntf) { mMultiAccessUnitHelper = std::make_shared<MultiAccessUnitHelper>(mMultiAccessUnitIntf); std::shared_ptr<C2Allocator> allocator; std::shared_ptr<C2BlockPool> linearPool; std::shared_ptr<C2AllocatorStore> store = ::android::GetCodec2PlatformAllocatorStore(); if(store->fetchAllocator(C2AllocatorStore::DEFAULT_LINEAR, &allocator) == C2_OK) { ::android::C2PlatformAllocatorDesc desc; desc.allocatorId = allocator->getId(); if (C2_OK == CreateCodec2BlockPool(desc, mComponent, &linearPool)) { if (linearPool) { mMultiAccessUnitHelper = std::make_shared<MultiAccessUnitHelper>( mMultiAccessUnitIntf, linearPool); } } } } c2listener = mMultiAccessUnitHelper ? std::make_shared<MultiAccessUnitListener>(self, mMultiAccessUnitHelper) : Loading media/codec2/hal/common/MultiAccessUnitHelper.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -126,12 +126,12 @@ class C2MultiAccessUnitBuffer : public C2Buffer { //MultiAccessUnitHelper MultiAccessUnitHelper::MultiAccessUnitHelper( const std::shared_ptr<MultiAccessUnitInterface>& intf): const std::shared_ptr<MultiAccessUnitInterface>& intf, std::shared_ptr<C2BlockPool>& linearPool): mInit(false), mInterface(intf) { std::shared_ptr<C2AllocatorStore> store = GetCodec2PlatformAllocatorStore(); if(store->fetchAllocator(C2AllocatorStore::DEFAULT_LINEAR, &mLinearAllocator) == C2_OK) { mLinearPool = std::make_shared<C2PooledBlockPool>(mLinearAllocator, ++mBlockPoolId); mInterface(intf), mLinearPool(linearPool) { if (mLinearPool) { mInit = true; } } Loading media/codec2/hal/common/include/codec2/common/MultiAccessUnitHelper.h +2 −3 Original line number Diff line number Diff line Loading @@ -58,7 +58,8 @@ protected: struct MultiAccessUnitHelper { public: MultiAccessUnitHelper( const std::shared_ptr<MultiAccessUnitInterface>& intf); const std::shared_ptr<MultiAccessUnitInterface>& intf, std::shared_ptr<C2BlockPool> &linearPool); virtual ~MultiAccessUnitHelper(); Loading Loading @@ -202,8 +203,6 @@ protected: C2BlockPool::local_id_t mBlockPoolId; // C2Blockpool for output buffer allocation std::shared_ptr<C2BlockPool> mLinearPool; // Allocator for output buffer allocation std::shared_ptr<C2Allocator> mLinearAllocator; // FrameIndex for the current outgoing work std::atomic_uint64_t mFrameIndex; // Mutex to protect mFrameHolder Loading media/codec2/hal/hidl/1.0/utils/Component.cpp +13 −1 Original line number Diff line number Diff line Loading @@ -570,7 +570,19 @@ std::shared_ptr<C2Component> Component::findLocalComponent( void Component::initListener(const sp<Component>& self) { std::shared_ptr<C2Component::Listener> c2listener; if (mMultiAccessUnitIntf) { mMultiAccessUnitHelper = std::make_shared<MultiAccessUnitHelper>(mMultiAccessUnitIntf); std::shared_ptr<C2Allocator> allocator; std::shared_ptr<C2BlockPool> linearPool; std::shared_ptr<C2AllocatorStore> store = ::android::GetCodec2PlatformAllocatorStore(); if(store->fetchAllocator(C2AllocatorStore::DEFAULT_LINEAR, &allocator) == C2_OK) { ::android::C2PlatformAllocatorDesc desc; desc.allocatorId = allocator->getId(); if (C2_OK == CreateCodec2BlockPool(desc, mComponent, &linearPool)) { if (linearPool) { mMultiAccessUnitHelper = std::make_shared<MultiAccessUnitHelper>( mMultiAccessUnitIntf, linearPool); } } } } c2listener = mMultiAccessUnitHelper ? std::make_shared<MultiAccessUnitListener>(self, mMultiAccessUnitHelper) : Loading media/codec2/hal/hidl/1.1/utils/Component.cpp +13 −1 Original line number Diff line number Diff line Loading @@ -583,7 +583,19 @@ std::shared_ptr<C2Component> Component::findLocalComponent( void Component::initListener(const sp<Component>& self) { std::shared_ptr<C2Component::Listener> c2listener; if (mMultiAccessUnitIntf) { mMultiAccessUnitHelper = std::make_shared<MultiAccessUnitHelper>(mMultiAccessUnitIntf); std::shared_ptr<C2Allocator> allocator; std::shared_ptr<C2BlockPool> linearPool; std::shared_ptr<C2AllocatorStore> store = ::android::GetCodec2PlatformAllocatorStore(); if(store->fetchAllocator(C2AllocatorStore::DEFAULT_LINEAR, &allocator) == C2_OK) { ::android::C2PlatformAllocatorDesc desc; desc.allocatorId = allocator->getId(); if (C2_OK == CreateCodec2BlockPool(desc, mComponent, &linearPool)) { if (linearPool) { mMultiAccessUnitHelper = std::make_shared<MultiAccessUnitHelper>( mMultiAccessUnitIntf, linearPool); } } } } c2listener = mMultiAccessUnitHelper ? std::make_shared<MultiAccessUnitListener>(self, mMultiAccessUnitHelper) : Loading Loading
media/codec2/hal/aidl/Component.cpp +13 −1 Original line number Diff line number Diff line Loading @@ -487,7 +487,19 @@ void Component::initListener(const std::shared_ptr<Component>& self) { if (__builtin_available(android __ANDROID_API_T__, *)) { std::shared_ptr<C2Component::Listener> c2listener; if (mMultiAccessUnitIntf) { mMultiAccessUnitHelper = std::make_shared<MultiAccessUnitHelper>(mMultiAccessUnitIntf); std::shared_ptr<C2Allocator> allocator; std::shared_ptr<C2BlockPool> linearPool; std::shared_ptr<C2AllocatorStore> store = ::android::GetCodec2PlatformAllocatorStore(); if(store->fetchAllocator(C2AllocatorStore::DEFAULT_LINEAR, &allocator) == C2_OK) { ::android::C2PlatformAllocatorDesc desc; desc.allocatorId = allocator->getId(); if (C2_OK == CreateCodec2BlockPool(desc, mComponent, &linearPool)) { if (linearPool) { mMultiAccessUnitHelper = std::make_shared<MultiAccessUnitHelper>( mMultiAccessUnitIntf, linearPool); } } } } c2listener = mMultiAccessUnitHelper ? std::make_shared<MultiAccessUnitListener>(self, mMultiAccessUnitHelper) : Loading
media/codec2/hal/common/MultiAccessUnitHelper.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -126,12 +126,12 @@ class C2MultiAccessUnitBuffer : public C2Buffer { //MultiAccessUnitHelper MultiAccessUnitHelper::MultiAccessUnitHelper( const std::shared_ptr<MultiAccessUnitInterface>& intf): const std::shared_ptr<MultiAccessUnitInterface>& intf, std::shared_ptr<C2BlockPool>& linearPool): mInit(false), mInterface(intf) { std::shared_ptr<C2AllocatorStore> store = GetCodec2PlatformAllocatorStore(); if(store->fetchAllocator(C2AllocatorStore::DEFAULT_LINEAR, &mLinearAllocator) == C2_OK) { mLinearPool = std::make_shared<C2PooledBlockPool>(mLinearAllocator, ++mBlockPoolId); mInterface(intf), mLinearPool(linearPool) { if (mLinearPool) { mInit = true; } } Loading
media/codec2/hal/common/include/codec2/common/MultiAccessUnitHelper.h +2 −3 Original line number Diff line number Diff line Loading @@ -58,7 +58,8 @@ protected: struct MultiAccessUnitHelper { public: MultiAccessUnitHelper( const std::shared_ptr<MultiAccessUnitInterface>& intf); const std::shared_ptr<MultiAccessUnitInterface>& intf, std::shared_ptr<C2BlockPool> &linearPool); virtual ~MultiAccessUnitHelper(); Loading Loading @@ -202,8 +203,6 @@ protected: C2BlockPool::local_id_t mBlockPoolId; // C2Blockpool for output buffer allocation std::shared_ptr<C2BlockPool> mLinearPool; // Allocator for output buffer allocation std::shared_ptr<C2Allocator> mLinearAllocator; // FrameIndex for the current outgoing work std::atomic_uint64_t mFrameIndex; // Mutex to protect mFrameHolder Loading
media/codec2/hal/hidl/1.0/utils/Component.cpp +13 −1 Original line number Diff line number Diff line Loading @@ -570,7 +570,19 @@ std::shared_ptr<C2Component> Component::findLocalComponent( void Component::initListener(const sp<Component>& self) { std::shared_ptr<C2Component::Listener> c2listener; if (mMultiAccessUnitIntf) { mMultiAccessUnitHelper = std::make_shared<MultiAccessUnitHelper>(mMultiAccessUnitIntf); std::shared_ptr<C2Allocator> allocator; std::shared_ptr<C2BlockPool> linearPool; std::shared_ptr<C2AllocatorStore> store = ::android::GetCodec2PlatformAllocatorStore(); if(store->fetchAllocator(C2AllocatorStore::DEFAULT_LINEAR, &allocator) == C2_OK) { ::android::C2PlatformAllocatorDesc desc; desc.allocatorId = allocator->getId(); if (C2_OK == CreateCodec2BlockPool(desc, mComponent, &linearPool)) { if (linearPool) { mMultiAccessUnitHelper = std::make_shared<MultiAccessUnitHelper>( mMultiAccessUnitIntf, linearPool); } } } } c2listener = mMultiAccessUnitHelper ? std::make_shared<MultiAccessUnitListener>(self, mMultiAccessUnitHelper) : Loading
media/codec2/hal/hidl/1.1/utils/Component.cpp +13 −1 Original line number Diff line number Diff line Loading @@ -583,7 +583,19 @@ std::shared_ptr<C2Component> Component::findLocalComponent( void Component::initListener(const sp<Component>& self) { std::shared_ptr<C2Component::Listener> c2listener; if (mMultiAccessUnitIntf) { mMultiAccessUnitHelper = std::make_shared<MultiAccessUnitHelper>(mMultiAccessUnitIntf); std::shared_ptr<C2Allocator> allocator; std::shared_ptr<C2BlockPool> linearPool; std::shared_ptr<C2AllocatorStore> store = ::android::GetCodec2PlatformAllocatorStore(); if(store->fetchAllocator(C2AllocatorStore::DEFAULT_LINEAR, &allocator) == C2_OK) { ::android::C2PlatformAllocatorDesc desc; desc.allocatorId = allocator->getId(); if (C2_OK == CreateCodec2BlockPool(desc, mComponent, &linearPool)) { if (linearPool) { mMultiAccessUnitHelper = std::make_shared<MultiAccessUnitHelper>( mMultiAccessUnitIntf, linearPool); } } } } c2listener = mMultiAccessUnitHelper ? std::make_shared<MultiAccessUnitListener>(self, mMultiAccessUnitHelper) : Loading