Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9cdd3df9 authored by Sungtak Lee's avatar Sungtak Lee
Browse files

C2AIDL: add codec2 aidl library without inputsurface dependency

Certain C2 HALs do not have inputsurface dependency for example Audio
only Codec2 HAL. In the case link codec2 aidl library which has no
dependency to inputsurface.

Bug: 383153291
Flag: EXEMPT bugfix
Test: atp manual
Change-Id: I3f2ffad0cd524b9eac49c4b1081e8d61f3e1a697
parent 33400d83
Loading
Loading
Loading
Loading
+96 −0
Original line number Diff line number Diff line
@@ -54,6 +54,89 @@ cc_library {
    ],
}

// DO NOT DEPEND ON THIS DIRECTLY
// use libcodec2-aidl-noisurface-defaults instead
cc_library {
    name: "libcodec2_aidl_noisurface",
    min_sdk_version: "30",
    vendor_available: true,
    apex_available: [
        "//apex_available:platform",
        "com.android.media.swcodec",
    ],

    defaults: [
        "aconfig_lib_cc_static_link.defaults",
        "libcodec2_hal_selection",
    ],

    srcs: [
        "BufferTypes.cpp",
        "Component.cpp",
        "ComponentInterface.cpp",
        "ComponentStore.cpp",
        "Configurable.cpp",
        "InputBufferManager.cpp",
        "ParamTypes.cpp",
    ],

    header_libs: [
        "libcodec2_internal", // private
    ],

    shared_libs: [
        "android.hardware.common-V2-ndk",
        "android.hardware.media.bufferpool2-V2-ndk",
        "android.hardware.media.c2-V1-ndk",
        "libbase",
        "libbinder_ndk",
        "libcodec2",
        "libcodec2_hal_common",
        "libcodec2_hidl_plugin_stub",
        "libcodec2_vndk",
        "libcutils",
        "libhidlbase",
        "liblog",
        "libnativewindow",
        "libstagefright_aidl_bufferpool2",
        "libstagefright_bufferpool@2.0.1",
        "libui",
        "libutils",
    ],

    static_libs: [
        "libaidlcommonsupport",
    ],

    target: {
        vendor: {
            exclude_shared_libs: [
                "libcodec2_hidl_plugin_stub",
            ],
            shared_libs: [
                "libcodec2_hidl_plugin",
            ],
        },
        apex: {
            exclude_shared_libs: [
                "libcodec2_hidl_plugin_stub",
                "libcodec2_hidl_plugin",
            ],
        },
    },

    export_include_dirs: [
        "include",
    ],

    export_shared_lib_headers: [
        "android.hardware.media.c2-V1-ndk",
        "libcodec2",
        "libstagefright_bufferpool@2.0.1",
        "libui",
    ],
}

// DO NOT DEPEND ON THIS DIRECTLY
// use libcodec2-aidl-defaults instead
cc_library {
@@ -140,6 +223,19 @@ cc_library {
    ],
}

// public dependency for Codec 2.0 HAL service implementations
cc_defaults {
    name: "libcodec2-aidl-noisurface-defaults",
    min_sdk_version: "30",
    defaults: ["libcodec2-impl-defaults"],

    shared_libs: [
        "android.hardware.media.c2-V1-ndk",
        "libbinder_ndk",
        "libcodec2_aidl_noisurface",
    ],
}

// public dependency for Codec 2.0 HAL service implementations
cc_defaults {
    name: "libcodec2-aidl-defaults",