Loading media/codec2/hal/aidl/Android.bp +6 −2 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ package { // use libcodec2-aidl-client-defaults instead cc_library { name: "libcodec2_aidl_client", min_sdk_version: "31", srcs: [ "BufferTypes.cpp", Loading Loading @@ -35,6 +36,7 @@ cc_library { ], static_libs: [ "libPlatformProperties", "libaidlcommonsupport", ], Loading @@ -53,7 +55,7 @@ cc_library { // use libcodec2-aidl-defaults instead cc_library { name: "libcodec2_aidl", min_sdk_version: "30", min_sdk_version: "31", vendor_available: true, apex_available: [ "//apex_available:platform", Loading Loading @@ -96,6 +98,7 @@ cc_library { ], static_libs: [ "libPlatformProperties", "libaidlcommonsupport", ], Loading Loading @@ -131,7 +134,7 @@ cc_library { // public dependency for Codec 2.0 HAL service implementations cc_defaults { name: "libcodec2-aidl-defaults", min_sdk_version: "30", min_sdk_version: "31", defaults: ["libcodec2-impl-defaults"], shared_libs: [ Loading @@ -144,6 +147,7 @@ cc_defaults { // public dependency for Codec 2.0 HAL client cc_defaults { name: "libcodec2-aidl-client-defaults", min_sdk_version: "31", defaults: ["libcodec2-impl-defaults"], shared_libs: [ Loading media/codec2/hal/aidl/ParamTypes.cpp +1 −15 Original line number Diff line number Diff line Loading @@ -19,9 +19,7 @@ #include <android-base/logging.h> #include <android/binder_manager.h> // NOTE: due to dependency from mainline modules cannot use libsysprop // #include <android/sysprop/MediaProperties.sysprop.h> #include <android-base/properties.h> #include <android/sysprop/MediaProperties.sysprop.h> #include <codec2/aidl/ParamTypes.h> #include <codec2/common/ParamTypes.h> Loading Loading @@ -169,8 +167,6 @@ bool IsSelected() { // Cannot select AIDL if not enabled return false; } #if 0 // NOTE: due to dependency from mainline modules cannot use libsysprop using ::android::sysprop::MediaProperties::codec2_hal_selection; using ::android::sysprop::MediaProperties::codec2_hal_selection_values; constexpr codec2_hal_selection_values AIDL = codec2_hal_selection_values::AIDL; Loading @@ -184,16 +180,6 @@ bool IsSelected() { default: LOG(FATAL) << "Unexpected codec2 HAL selection value: " << (int)selection; } #else std::string selection = ::android::base::GetProperty("media.c2.hal.selection", "hidl"); if (selection == "aidl") { return true; } else if (selection == "hidl") { return false; } else { LOG(FATAL) << "Unexpected codec2 HAL selection value: " << selection; } #endif return false; } Loading media/codec2/hal/client/client.cpp +20 −29 Original line number Diff line number Diff line Loading @@ -45,7 +45,6 @@ #include <aidl/android/hardware/media/c2/StructDescriptor.h> #include <aidlcommonsupport/NativeHandle.h> #include <android/api-level.h> #include <android/binder_auto_utils.h> #include <android/binder_ibinder.h> #include <android/binder_manager.h> Loading Loading @@ -1440,16 +1439,12 @@ std::vector<std::string> Codec2Client::CacheServiceNames() { std::vector<std::string> names; if (c2_aidl::utils::IsSelected()) { if (__builtin_available(android __ANDROID_API_S__, *)) { // Get AIDL service names AServiceManager_forEachDeclaredInstance( AidlBase::descriptor, &names, [](const char *name, void *context) { std::vector<std::string> *names = (std::vector<std::string> *)context; names->emplace_back(name); }); } else { LOG(FATAL) << "C2 AIDL cannot be selected on Android version older than 35"; } } else { // Get HIDL service names using ::android::hardware::media::c2::V1_0::IComponentStore; Loading Loading @@ -1551,7 +1546,6 @@ std::shared_ptr<Codec2Client> Codec2Client::_CreateFromIndex(size_t index) { LOG(VERBOSE) << "Creating a Codec2 client to service \"" << name << "\""; if (c2_aidl::utils::IsSelected()) { if (__builtin_available(android __ANDROID_API_S__, *)) { std::string instanceName = ::android::base::StringPrintf("%s/%s", AidlBase::descriptor, name.c_str()); if (AServiceManager_isDeclared(instanceName.c_str())) { Loading @@ -1568,9 +1562,6 @@ std::shared_ptr<Codec2Client> Codec2Client::_CreateFromIndex(size_t index) { } else { LOG(ERROR) << "Codec2 AIDL service \"" << name << "\" is not declared"; } } else { LOG(FATAL) << "C2 AIDL cannot be selected on Android version older than 35"; } } else { std::string instanceName = "android.hardware.media.c2/" + name; sp<HidlBase> baseStore = HidlBase::getService(name); Loading media/mediaserver/manifest_media_c2_software.xml +0 −5 Original line number Diff line number Diff line Loading @@ -8,9 +8,4 @@ <instance>software</instance> </interface> </hal> <hal format="aidl"> <name>android.hardware.media.c2</name> <version>1</version> <fqname>IComponentStore/software</fqname> </hal> </manifest> media/module/codecserviceregistrant/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,6 @@ cc_library { ], defaults: [ "libcodec2-aidl-defaults", "libcodec2-hidl-defaults", "libcodec2-runtime-libs", ], Loading Loading
media/codec2/hal/aidl/Android.bp +6 −2 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ package { // use libcodec2-aidl-client-defaults instead cc_library { name: "libcodec2_aidl_client", min_sdk_version: "31", srcs: [ "BufferTypes.cpp", Loading Loading @@ -35,6 +36,7 @@ cc_library { ], static_libs: [ "libPlatformProperties", "libaidlcommonsupport", ], Loading @@ -53,7 +55,7 @@ cc_library { // use libcodec2-aidl-defaults instead cc_library { name: "libcodec2_aidl", min_sdk_version: "30", min_sdk_version: "31", vendor_available: true, apex_available: [ "//apex_available:platform", Loading Loading @@ -96,6 +98,7 @@ cc_library { ], static_libs: [ "libPlatformProperties", "libaidlcommonsupport", ], Loading Loading @@ -131,7 +134,7 @@ cc_library { // public dependency for Codec 2.0 HAL service implementations cc_defaults { name: "libcodec2-aidl-defaults", min_sdk_version: "30", min_sdk_version: "31", defaults: ["libcodec2-impl-defaults"], shared_libs: [ Loading @@ -144,6 +147,7 @@ cc_defaults { // public dependency for Codec 2.0 HAL client cc_defaults { name: "libcodec2-aidl-client-defaults", min_sdk_version: "31", defaults: ["libcodec2-impl-defaults"], shared_libs: [ Loading
media/codec2/hal/aidl/ParamTypes.cpp +1 −15 Original line number Diff line number Diff line Loading @@ -19,9 +19,7 @@ #include <android-base/logging.h> #include <android/binder_manager.h> // NOTE: due to dependency from mainline modules cannot use libsysprop // #include <android/sysprop/MediaProperties.sysprop.h> #include <android-base/properties.h> #include <android/sysprop/MediaProperties.sysprop.h> #include <codec2/aidl/ParamTypes.h> #include <codec2/common/ParamTypes.h> Loading Loading @@ -169,8 +167,6 @@ bool IsSelected() { // Cannot select AIDL if not enabled return false; } #if 0 // NOTE: due to dependency from mainline modules cannot use libsysprop using ::android::sysprop::MediaProperties::codec2_hal_selection; using ::android::sysprop::MediaProperties::codec2_hal_selection_values; constexpr codec2_hal_selection_values AIDL = codec2_hal_selection_values::AIDL; Loading @@ -184,16 +180,6 @@ bool IsSelected() { default: LOG(FATAL) << "Unexpected codec2 HAL selection value: " << (int)selection; } #else std::string selection = ::android::base::GetProperty("media.c2.hal.selection", "hidl"); if (selection == "aidl") { return true; } else if (selection == "hidl") { return false; } else { LOG(FATAL) << "Unexpected codec2 HAL selection value: " << selection; } #endif return false; } Loading
media/codec2/hal/client/client.cpp +20 −29 Original line number Diff line number Diff line Loading @@ -45,7 +45,6 @@ #include <aidl/android/hardware/media/c2/StructDescriptor.h> #include <aidlcommonsupport/NativeHandle.h> #include <android/api-level.h> #include <android/binder_auto_utils.h> #include <android/binder_ibinder.h> #include <android/binder_manager.h> Loading Loading @@ -1440,16 +1439,12 @@ std::vector<std::string> Codec2Client::CacheServiceNames() { std::vector<std::string> names; if (c2_aidl::utils::IsSelected()) { if (__builtin_available(android __ANDROID_API_S__, *)) { // Get AIDL service names AServiceManager_forEachDeclaredInstance( AidlBase::descriptor, &names, [](const char *name, void *context) { std::vector<std::string> *names = (std::vector<std::string> *)context; names->emplace_back(name); }); } else { LOG(FATAL) << "C2 AIDL cannot be selected on Android version older than 35"; } } else { // Get HIDL service names using ::android::hardware::media::c2::V1_0::IComponentStore; Loading Loading @@ -1551,7 +1546,6 @@ std::shared_ptr<Codec2Client> Codec2Client::_CreateFromIndex(size_t index) { LOG(VERBOSE) << "Creating a Codec2 client to service \"" << name << "\""; if (c2_aidl::utils::IsSelected()) { if (__builtin_available(android __ANDROID_API_S__, *)) { std::string instanceName = ::android::base::StringPrintf("%s/%s", AidlBase::descriptor, name.c_str()); if (AServiceManager_isDeclared(instanceName.c_str())) { Loading @@ -1568,9 +1562,6 @@ std::shared_ptr<Codec2Client> Codec2Client::_CreateFromIndex(size_t index) { } else { LOG(ERROR) << "Codec2 AIDL service \"" << name << "\" is not declared"; } } else { LOG(FATAL) << "C2 AIDL cannot be selected on Android version older than 35"; } } else { std::string instanceName = "android.hardware.media.c2/" + name; sp<HidlBase> baseStore = HidlBase::getService(name); Loading
media/mediaserver/manifest_media_c2_software.xml +0 −5 Original line number Diff line number Diff line Loading @@ -8,9 +8,4 @@ <instance>software</instance> </interface> </hal> <hal format="aidl"> <name>android.hardware.media.c2</name> <version>1</version> <fqname>IComponentStore/software</fqname> </hal> </manifest>
media/module/codecserviceregistrant/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,6 @@ cc_library { ], defaults: [ "libcodec2-aidl-defaults", "libcodec2-hidl-defaults", "libcodec2-runtime-libs", ], Loading