diff --git a/services/mediacodec/registrant/Android.bp b/services/mediacodec/registrant/Android.bp index f825373373..0441cfacd2 100644 --- a/services/mediacodec/registrant/Android.bp +++ b/services/mediacodec/registrant/Android.bp @@ -13,10 +13,11 @@ cc_library_shared { "libcodec2-hidl-defaults", ], shared_libs: [ - "android.hardware.media.c2@1.0", - "android.hardware.media.c2@1.1", "libbase", - "libcodec2_hidl@1.1", + "libcodec2_hidl@1.0", + "libcodec2_vndk", + "libhidlbase", + "libutils", ], // Codecs diff --git a/services/mediacodec/registrant/CodecServiceRegistrant.cpp b/services/mediacodec/registrant/CodecServiceRegistrant.cpp index 450af791de..83d233e283 100644 --- a/services/mediacodec/registrant/CodecServiceRegistrant.cpp +++ b/services/mediacodec/registrant/CodecServiceRegistrant.cpp @@ -22,10 +22,9 @@ #include #include -#include #include -#include -#include +#include +#include #include #include @@ -36,8 +35,8 @@ using ::android::hardware::hidl_string; using ::android::hardware::Return; using ::android::hardware::Void; using ::android::sp; -using namespace ::android::hardware::media::c2::V1_0; -using namespace ::android::hardware::media::c2::V1_0::utils; +using namespace ::android::hardware::media::c2::V1_1; +using namespace ::android::hardware::media::c2::V1_1::utils; constexpr c2_status_t C2_TRANSACTION_FAILED = C2_CORRUPTED; @@ -400,11 +399,10 @@ bool ionPropertiesDefined() { } // unnamed namespace extern "C" void RegisterCodecServices() { - using ComponentStore_Latest = ::android::hardware::media::c2::V1_1:: - utils::ComponentStore; + using namespace ::android::hardware::media::c2::V1_1; LOG(INFO) << "Creating software Codec2 service..."; - sp store = - new ComponentStore_Latest(::android::GetCodec2PlatformComponentStore()); + sp store = + new ComponentStore(::android::GetCodec2PlatformComponentStore()); if (store == nullptr) { LOG(ERROR) << "Cannot create software Codec2 service.";