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

Commit 9da62e1c authored by Chong Zhang's avatar Chong Zhang
Browse files

Make swcodec service link to no-binder version of bufferqueue

Make the media.swcodec always link to the no-binder version of
bufferqueue, even if the device build doesn't use vndk. These
devices don't have a "vendor" target and the same system build
of libstagefright_bufferqueue_helper.so is used on the apex,
which brought in libgui/libEGL*.

bug: 150155192
bug: 139201422
Change-Id: Ib356e65019dba4495f2fc1eb6db6de4ff251bbde
Merged-In: Ib356e65019dba4495f2fc1eb6db6de4ff251bbde
parent 590a4e63
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -83,11 +83,22 @@ cc_library {
        "libhidlbase",
        "liblog",
        "libstagefright_bufferpool@2.0.1",
        "libstagefright_bufferqueue_helper",
        "libstagefright_bufferqueue_helper_novndk",
        "libui",
        "libutils",
    ],

    target: {
        vendor: {
            exclude_shared_libs: [
                "libstagefright_bufferqueue_helper_novndk",
            ],
            shared_libs: [
                "libstagefright_bufferqueue_helper",
            ],
        },
    },

    export_include_dirs: [
        "include",
    ],
+12 −2
Original line number Diff line number Diff line
@@ -89,11 +89,22 @@ cc_library {
        "libhidlbase",
        "liblog",
        "libstagefright_bufferpool@2.0.1",
        "libstagefright_bufferqueue_helper",
        "libstagefright_bufferqueue_helper_novndk",
        "libui",
        "libutils",
    ],

    target: {
        vendor: {
            exclude_shared_libs: [
                "libstagefright_bufferqueue_helper_novndk",
            ],
            shared_libs: [
                "libstagefright_bufferqueue_helper",
            ],
        },
    },

    export_include_dirs: [
        "include",
    ],
@@ -106,7 +117,6 @@ cc_library {
        "libcodec2_vndk",
        "libhidlbase",
        "libstagefright_bufferpool@2.0.1",
        "libstagefright_bufferqueue_helper",
        "libui",
    ],
}
+46 −15
Original line number Diff line number Diff line
cc_library_shared {
    name: "libstagefright_bufferqueue_helper",
    vendor_available: true,
    vndk: {
        enabled: true,
    },

cc_defaults {
    name: "libstagefright_bufferqueue-defaults",
    double_loadable: true,

    srcs: [
        "FrameDropper.cpp",
        "GraphicBufferSource.cpp",
@@ -26,7 +22,6 @@ cc_library_shared {
    shared_libs: [
        "libbase",
        "libcutils",
        "libgui",
        "libhidlbase",
        "libhidlmemory",
        "liblog",
@@ -52,6 +47,23 @@ cc_library_shared {
        "-Wno-documentation",
    ],

    sanitize: {
        misc_undefined: [
            "signed-integer-overflow",
            "unsigned-integer-overflow",
        ],
        cfi: true,
    },
}

cc_library_shared {
    name: "libstagefright_bufferqueue_helper",
    defaults: ["libstagefright_bufferqueue-defaults"],
    vendor_available: true,
    vndk: {
        enabled: true,
    },
    shared_libs: [ "libgui" ],
    target: {
        vendor: {
            exclude_shared_libs: [
@@ -71,12 +83,31 @@ cc_library_shared {
            ],
        },
    },
}

    sanitize: {
        misc_undefined: [
            "signed-integer-overflow",
            "unsigned-integer-overflow",
// This lib is needed on devices that doesn't use vndk,
// on these devices we still don't want libgui to be pulled
// in onto the apex build. It should only be used by
// libcodec2_hidl@1.x, etc. from service side. It could
// be removed if all builds are using vndk.
cc_library_shared {
    name: "libstagefright_bufferqueue_helper_novndk",
    defaults: ["libstagefright_bufferqueue-defaults"],
    apex_available: [
        "com.android.media.swcodec",
        "test_com.android.media.swcodec",
    ],
    vendor_available: false,
    static_libs: [
        "libgui_bufferqueue_static",
    ],
    shared_libs: [
        "android.hidl.token@1.0-utils",
        "libEGL",
        "libnativewindow",
        "libvndksupport",
    ],
    cflags: [
        "-DNO_BINDER",
    ],
        cfi: true,
    },
}