Loading media/codec2/hal/aidl/Component.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -411,7 +411,7 @@ void Component::initListener(const std::shared_ptr<Component>& self) { mDeathRecipient = ::ndk::ScopedAIBinder_DeathRecipient( mDeathRecipient = ::ndk::ScopedAIBinder_DeathRecipient( AIBinder_DeathRecipient_new(OnBinderDied)); AIBinder_DeathRecipient_new(OnBinderDied)); mDeathContext = new DeathContext{weak_from_this()}; mDeathContext = new DeathContext{ref<Component>()}; AIBinder_DeathRecipient_setOnUnlinked(mDeathRecipient.get(), OnBinderUnlinked); AIBinder_DeathRecipient_setOnUnlinked(mDeathRecipient.get(), OnBinderUnlinked); AIBinder_linkToDeath(mListener->asBinder().get(), mDeathRecipient.get(), mDeathContext); AIBinder_linkToDeath(mListener->asBinder().get(), mDeathRecipient.get(), mDeathContext); } else { } else { Loading media/codec2/hal/aidl/ComponentStore.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -216,7 +216,7 @@ ScopedAStatus ComponentStore::createComponent( #endif #endif onInterfaceLoaded(c2component->intf()); onInterfaceLoaded(c2component->intf()); std::shared_ptr<Component> comp = std::shared_ptr<Component> comp = SharedRefBase::make<Component>(c2component, listener, shared_from_this(), pool); SharedRefBase::make<Component>(c2component, listener, ref<ComponentStore>(), pool); *component = comp; *component = comp; if (!component) { if (!component) { status = C2_CORRUPTED; status = C2_CORRUPTED; Loading media/codec2/hal/aidl/include/codec2/aidl/Component.h +1 −2 Original line number Original line Diff line number Diff line Loading @@ -46,8 +46,7 @@ namespace utils { struct ComponentStore; struct ComponentStore; struct Component : public BnComponent, struct Component : public BnComponent { public std::enable_shared_from_this<Component> { Component( Component( const std::shared_ptr<C2Component>&, const std::shared_ptr<C2Component>&, const std::shared_ptr<IComponentListener>& listener, const std::shared_ptr<IComponentListener>& listener, Loading media/codec2/hal/aidl/include/codec2/aidl/ComponentStore.h +1 −2 Original line number Original line Diff line number Diff line Loading @@ -50,8 +50,7 @@ struct Component; using ::aidl::android::hardware::media::bufferpool2::IClientManager; using ::aidl::android::hardware::media::bufferpool2::IClientManager; struct ComponentStore : public BnComponentStore, struct ComponentStore : public BnComponentStore { public std::enable_shared_from_this<ComponentStore> { ComponentStore(const std::shared_ptr<C2ComponentStore>& store); ComponentStore(const std::shared_ptr<C2ComponentStore>& store); virtual ~ComponentStore(); virtual ~ComponentStore(); Loading Loading
media/codec2/hal/aidl/Component.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -411,7 +411,7 @@ void Component::initListener(const std::shared_ptr<Component>& self) { mDeathRecipient = ::ndk::ScopedAIBinder_DeathRecipient( mDeathRecipient = ::ndk::ScopedAIBinder_DeathRecipient( AIBinder_DeathRecipient_new(OnBinderDied)); AIBinder_DeathRecipient_new(OnBinderDied)); mDeathContext = new DeathContext{weak_from_this()}; mDeathContext = new DeathContext{ref<Component>()}; AIBinder_DeathRecipient_setOnUnlinked(mDeathRecipient.get(), OnBinderUnlinked); AIBinder_DeathRecipient_setOnUnlinked(mDeathRecipient.get(), OnBinderUnlinked); AIBinder_linkToDeath(mListener->asBinder().get(), mDeathRecipient.get(), mDeathContext); AIBinder_linkToDeath(mListener->asBinder().get(), mDeathRecipient.get(), mDeathContext); } else { } else { Loading
media/codec2/hal/aidl/ComponentStore.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -216,7 +216,7 @@ ScopedAStatus ComponentStore::createComponent( #endif #endif onInterfaceLoaded(c2component->intf()); onInterfaceLoaded(c2component->intf()); std::shared_ptr<Component> comp = std::shared_ptr<Component> comp = SharedRefBase::make<Component>(c2component, listener, shared_from_this(), pool); SharedRefBase::make<Component>(c2component, listener, ref<ComponentStore>(), pool); *component = comp; *component = comp; if (!component) { if (!component) { status = C2_CORRUPTED; status = C2_CORRUPTED; Loading
media/codec2/hal/aidl/include/codec2/aidl/Component.h +1 −2 Original line number Original line Diff line number Diff line Loading @@ -46,8 +46,7 @@ namespace utils { struct ComponentStore; struct ComponentStore; struct Component : public BnComponent, struct Component : public BnComponent { public std::enable_shared_from_this<Component> { Component( Component( const std::shared_ptr<C2Component>&, const std::shared_ptr<C2Component>&, const std::shared_ptr<IComponentListener>& listener, const std::shared_ptr<IComponentListener>& listener, Loading
media/codec2/hal/aidl/include/codec2/aidl/ComponentStore.h +1 −2 Original line number Original line Diff line number Diff line Loading @@ -50,8 +50,7 @@ struct Component; using ::aidl::android::hardware::media::bufferpool2::IClientManager; using ::aidl::android::hardware::media::bufferpool2::IClientManager; struct ComponentStore : public BnComponentStore, struct ComponentStore : public BnComponentStore { public std::enable_shared_from_this<ComponentStore> { ComponentStore(const std::shared_ptr<C2ComponentStore>& store); ComponentStore(const std::shared_ptr<C2ComponentStore>& store); virtual ~ComponentStore(); virtual ~ComponentStore(); Loading