Loading media/codec2/hal/client/client.cpp +7 −10 Original line number Diff line number Diff line Loading @@ -770,16 +770,9 @@ struct Codec2Client::Component::OutputBufferQueue : // Codec2Client Codec2Client::Codec2Client(sp<Base> const& base, sp<c2_hidl::IConfigurable> const& configurable, size_t serviceIndex) : Configurable{ [base]() -> sp<c2_hidl::IConfigurable> { Return<sp<c2_hidl::IConfigurable>> transResult = base->getConfigurable(); return transResult.isOk() ? static_cast<sp<c2_hidl::IConfigurable>>(transResult) : nullptr; }() }, : Configurable{configurable}, mBase1_0{base}, mBase1_1{Base1_1::castFrom(base)}, mBase1_2{Base1_2::castFrom(base)}, Loading Loading @@ -1163,7 +1156,11 @@ std::shared_ptr<Codec2Client> Codec2Client::_CreateFromIndex(size_t index) { CHECK(baseStore) << "Codec2 service \"" << name << "\"" " inaccessible for unknown reasons."; LOG(VERBOSE) << "Client to Codec2 service \"" << name << "\" created"; return std::make_shared<Codec2Client>(baseStore, index); Return<sp<IConfigurable>> transResult = baseStore->getConfigurable(); CHECK(transResult.isOk()) << "Codec2 service \"" << name << "\"" "does not have IConfigurable."; sp<IConfigurable> configurable = static_cast<sp<IConfigurable>>(transResult); return std::make_shared<Codec2Client>(baseStore, configurable, index); } c2_status_t Codec2Client::ForAllServices( Loading media/codec2/hal/client/include/codec2/hidl/client.h +7 −2 Original line number Diff line number Diff line Loading @@ -178,6 +178,8 @@ struct Codec2Client : public Codec2ConfigurableClient { typedef ::android::hardware::media::c2::V1_2::IComponentStore Base1_2; typedef Base1_0 Base; typedef ::android::hardware::media::c2::V1_0::IConfigurable IConfigurable; struct Listener; typedef Codec2ConfigurableClient Configurable; Loading Loading @@ -262,8 +264,11 @@ struct Codec2Client : public Codec2ConfigurableClient { static std::shared_ptr<InputSurface> CreateInputSurface( char const* serviceName = nullptr); // base cannot be null. Codec2Client(sp<Base> const& base, size_t serviceIndex); // base and/or configurable cannot be null. Codec2Client( sp<Base> const& base, sp<IConfigurable> const& configurable, size_t serviceIndex); protected: sp<Base1_0> mBase1_0; Loading Loading
media/codec2/hal/client/client.cpp +7 −10 Original line number Diff line number Diff line Loading @@ -770,16 +770,9 @@ struct Codec2Client::Component::OutputBufferQueue : // Codec2Client Codec2Client::Codec2Client(sp<Base> const& base, sp<c2_hidl::IConfigurable> const& configurable, size_t serviceIndex) : Configurable{ [base]() -> sp<c2_hidl::IConfigurable> { Return<sp<c2_hidl::IConfigurable>> transResult = base->getConfigurable(); return transResult.isOk() ? static_cast<sp<c2_hidl::IConfigurable>>(transResult) : nullptr; }() }, : Configurable{configurable}, mBase1_0{base}, mBase1_1{Base1_1::castFrom(base)}, mBase1_2{Base1_2::castFrom(base)}, Loading Loading @@ -1163,7 +1156,11 @@ std::shared_ptr<Codec2Client> Codec2Client::_CreateFromIndex(size_t index) { CHECK(baseStore) << "Codec2 service \"" << name << "\"" " inaccessible for unknown reasons."; LOG(VERBOSE) << "Client to Codec2 service \"" << name << "\" created"; return std::make_shared<Codec2Client>(baseStore, index); Return<sp<IConfigurable>> transResult = baseStore->getConfigurable(); CHECK(transResult.isOk()) << "Codec2 service \"" << name << "\"" "does not have IConfigurable."; sp<IConfigurable> configurable = static_cast<sp<IConfigurable>>(transResult); return std::make_shared<Codec2Client>(baseStore, configurable, index); } c2_status_t Codec2Client::ForAllServices( Loading
media/codec2/hal/client/include/codec2/hidl/client.h +7 −2 Original line number Diff line number Diff line Loading @@ -178,6 +178,8 @@ struct Codec2Client : public Codec2ConfigurableClient { typedef ::android::hardware::media::c2::V1_2::IComponentStore Base1_2; typedef Base1_0 Base; typedef ::android::hardware::media::c2::V1_0::IConfigurable IConfigurable; struct Listener; typedef Codec2ConfigurableClient Configurable; Loading Loading @@ -262,8 +264,11 @@ struct Codec2Client : public Codec2ConfigurableClient { static std::shared_ptr<InputSurface> CreateInputSurface( char const* serviceName = nullptr); // base cannot be null. Codec2Client(sp<Base> const& base, size_t serviceIndex); // base and/or configurable cannot be null. Codec2Client( sp<Base> const& base, sp<IConfigurable> const& configurable, size_t serviceIndex); protected: sp<Base1_0> mBase1_0; Loading