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

Commit 093f0b7a authored by Jiyong Park's avatar Jiyong Park
Browse files

provide libstagefright_foundation_vendor to vendors

libstagefright_foundation_vendor is a vendor-only variant of the
libstagefright_foundation. Vendor libs and other VNDK libs should link
against this _vendor.so library. This vendor-only variant does not have
dependency to libpowermanager which is not available to vendors.

Headers are moved from the global include dir to module-local include
dir. This is because global include dir (e.g. frameworks/av/include) is
not provided when building with BOARD_VNDK_VERSION=current. Instead the
headers are exported via the module's export_include_dirs directive.

Short summary on the directory movement:

"some" libstagefright headers are moved from libstagefright/include to
libstagefright/include/media/stagefright. This is because the headers
are included as <media/stagefright/HEADER_NAME,h>.

libstagefrigut_foundation headers are moved from
libstagefright/include/foundation to
libstagefright/foundation/include/media/stagefright/foundation. Again
this is because the headers are included as
<media/stagefright/foundation/HEADER_NAME.h>.

Furthermore, in order to prevent sudden breakage, symlinks to the
module-local header directories are added to the global include
directory.

frameworks/av/include/media/stagefright ->
<libstagefright>/include/media/stagefright

frameworks/av/include/media/stagefright/foundation ->
<libstagefright_foundation>/include/media/stagefright/foundation

Bug: 37462569
Test: sailfish builds and boots
Test: BOARD_VNDK_VERSION=current m libstagefright_foundation_vendor is
successful

Change-Id: Iadfa594e885e0bd39837ccb282993d3ba5b62852
parent 4c2dd1c2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
../../media/libstagefright/include
 No newline at end of file
../../media/libstagefright/include/media/stagefright/
 No newline at end of file
+6 −0
Original line number Diff line number Diff line
cc_library_headers {
    name: "libstagefright_headers",
    export_include_dirs: ["include"],
    vendor_available: true,
}

cc_library_shared {
    name: "libstagefright",

+42 −12
Original line number Diff line number Diff line
cc_library_shared {
    name: "libstagefright_foundation",

    srcs: [
COMMON_SRCS = [
        "AAtomizer.cpp",
        "ABitReader.cpp",
        "ABuffer.cpp",
@@ -14,7 +11,6 @@ cc_library_shared {
        "ANetworkSession.cpp",
        "AString.cpp",
        "AStringUtils.cpp",
        "AWakeLock.cpp",
        "ColorUtils.cpp",
        "MediaBuffer.cpp",
        "MediaBufferGroup.cpp",
@@ -22,19 +18,34 @@ cc_library_shared {
        "ParsedMessage.cpp",
        "base64.cpp",
        "hexdump.cpp",
    ],
]

    include_dirs: ["frameworks/av/include/media/stagefright/foundation"],

    export_include_dirs: ["include"],

    shared_libs: [
COMMON_LIBS = [
        "libbinder",
        "libutils",
        "libui",
        "libcutils",
        "liblog",
        "libpowermanager",
]

cc_defaults {
    name: "libstagefright_foundation-defaults",

    include_dirs: [
        "frameworks/av/include",
        "frameworks/native/include",
    ],

    local_include_dirs: [
        "include/media/stagefright/foundation",
    ],

    export_include_dirs: [
        "include",
    ],

    header_libs: [
        "libhardware_headers",
    ],

    export_shared_lib_headers: [
@@ -47,7 +58,9 @@ cc_library_shared {
        "-Werror",
        "-Wall",
    ],

    clang: true,

    sanitize: {
        misc_undefined: [
            "unsigned-integer-overflow",
@@ -59,3 +72,20 @@ cc_library_shared {
        },
    },
}

cc_library_shared {
    name: "libstagefright_foundation",
    defaults: ["libstagefright_foundation-defaults"],

    srcs: COMMON_SRCS + ["AWakeLock.cpp"],
    shared_libs: COMMON_LIBS + ["libpowermanager"],
}

cc_library_shared {
    name: "libstagefright_foundation_vendor",
    defaults: ["libstagefright_foundation-defaults"],
    vendor: true,

    srcs: COMMON_SRCS,
    shared_libs: COMMON_LIBS,
}
+0 −1
Original line number Diff line number Diff line
../include/
 No newline at end of file
Loading