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

Commit 98bff839 authored by Pawin Vongmasa's avatar Pawin Vongmasa Committed by android-build-merger
Browse files

Merge "Codec2: Retain compatibility with old HAL" into qt-qpr1-dev am: 5ebddd62

am: 06f75804

Change-Id: I3af9feed2b584706f5f23c78d3c2b8838c8463e2
parents 06088ce2 06f75804
Loading
Loading
Loading
Loading
+22 −6
Original line number Diff line number Diff line
cc_library {
    name: "libstagefright_bufferpool@2.0",
    vendor_available: true,
    vndk: {
        enabled: true,
    },
cc_defaults {
    name: "libstagefright_bufferpool@2.0-default",
    srcs: [
        "Accessor.cpp",
        "AccessorImpl.cpp",
@@ -29,3 +25,23 @@ cc_library {
        "android.hardware.media.bufferpool@2.0",
    ],
}

cc_library {
    name: "libstagefright_bufferpool@2.0.1",
    defaults: ["libstagefright_bufferpool@2.0-default"],
    vendor_available: true,
    cflags: [
        "-DBUFFERPOOL_CLONE_HANDLES",
    ],
}

// Deprecated. Do not use. Use libstagefright_bufferpool@2.0.1 instead.
cc_library {
    name: "libstagefright_bufferpool@2.0",
    defaults: ["libstagefright_bufferpool@2.0-default"],
    vendor_available: true,
    vndk: {
        enabled: true,
    },
}
+8 −0
Original line number Diff line number Diff line
@@ -351,6 +351,7 @@ ResultStatus ClientManager::Impl::allocate(
        }
        client = it->second;
    }
#ifdef BUFFERPOOL_CLONE_HANDLES
    native_handle_t *origHandle;
    ResultStatus res = client->allocate(params, &origHandle, buffer);
    if (res != ResultStatus::OK) {
@@ -362,6 +363,9 @@ ResultStatus ClientManager::Impl::allocate(
        return ResultStatus::NO_MEMORY;
    }
    return ResultStatus::OK;
#else
    return client->allocate(params, handle, buffer);
#endif
}

ResultStatus ClientManager::Impl::receive(
@@ -377,6 +381,7 @@ ResultStatus ClientManager::Impl::receive(
        }
        client = it->second;
    }
#ifdef BUFFERPOOL_CLONE_HANDLES
    native_handle_t *origHandle;
    ResultStatus res = client->receive(
            transactionId, bufferId, timestampUs, &origHandle, buffer);
@@ -389,6 +394,9 @@ ResultStatus ClientManager::Impl::receive(
        return ResultStatus::NO_MEMORY;
    }
    return ResultStatus::OK;
#else
    return client->receive(transactionId, bufferId, timestampUs, handle, buffer);
#endif
}

ResultStatus ClientManager::Impl::postSend(
+4 −4
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ cc_library {
        "libgui",
        "libhidlbase",
        "liblog",
        "libstagefright_bufferpool@2.0",
        "libstagefright_bufferpool@2.0.1",
        "libui",
        "libutils",
    ],
@@ -37,7 +37,7 @@ cc_library {
        "android.hardware.media.c2@1.0",
        "libcodec2",
        "libgui",
        "libstagefright_bufferpool@2.0",
        "libstagefright_bufferpool@2.0.1",
        "libui",
    ],
}
@@ -81,7 +81,7 @@ cc_library {
        "libcutils",
        "libhidlbase",
        "liblog",
        "libstagefright_bufferpool@2.0",
        "libstagefright_bufferpool@2.0.1",
        "libstagefright_bufferqueue_helper",
        "libui",
        "libutils",
@@ -96,7 +96,7 @@ cc_library {
        "libcodec2",
        "libcodec2_vndk",
        "libhidlbase",
        "libstagefright_bufferpool@2.0",
        "libstagefright_bufferpool@2.0.1",
        "libui",
    ],
}
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ cc_library {
        "libgui",
        "libhidlbase",
        "liblog",
        "libstagefright_bufferpool@2.0",
        "libstagefright_bufferpool@2.0.1",
        "libui",
        "libutils",
    ],
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ cc_library_shared {
        "liblog",
        "libnativewindow",
        "libstagefright_foundation",
        "libstagefright_bufferpool@2.0",
        "libstagefright_bufferpool@2.0.1",
        "libui",
        "libutils",
    ],