mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 05:49:27 +00:00
media.c2 aidl: Use bufferpool2 V2
Bug: 254050314 Change-Id: I1597fa92214086378d48fa37401a389a32c72bba
This commit is contained in:
@@ -33,15 +33,16 @@ cc_library {
|
||||
"libcutils",
|
||||
"libfmq",
|
||||
"liblog",
|
||||
"libnativewindow",
|
||||
"libutils",
|
||||
"android.hardware.media.bufferpool2-V1-ndk",
|
||||
"android.hardware.media.bufferpool2-V2-ndk",
|
||||
],
|
||||
static_libs: [
|
||||
"libaidlcommonsupport",
|
||||
],
|
||||
export_shared_lib_headers: [
|
||||
"libfmq",
|
||||
"android.hardware.media.bufferpool2-V1-ndk",
|
||||
"android.hardware.media.bufferpool2-V2-ndk",
|
||||
],
|
||||
double_loadable: true,
|
||||
cflags: [
|
||||
|
||||
@@ -757,7 +757,13 @@ BufferPoolStatus BufferPoolClient::Impl::fetchBufferHandle(
|
||||
return svcSpecific ? svcSpecific : ResultStatus::CRITICAL_ERROR;
|
||||
}
|
||||
if (results[0].getTag() == FetchResult::buffer) {
|
||||
*handle = ::android::dupFromAidl(results[0].get<FetchResult::buffer>().buffer);
|
||||
if (results[0].get<FetchResult::buffer>().buffer.has_value()) {
|
||||
*handle = ::android::dupFromAidl(results[0].get<FetchResult::buffer>().buffer.value());
|
||||
} else {
|
||||
// TODO: Support HardwareBuffer
|
||||
ALOGW("handle nullptr");
|
||||
*handle = nullptr;
|
||||
}
|
||||
return ResultStatus::OK;
|
||||
}
|
||||
return results[0].get<FetchResult::failure>();
|
||||
|
||||
@@ -36,8 +36,9 @@ cc_test {
|
||||
"libcutils",
|
||||
"libfmq",
|
||||
"liblog",
|
||||
"libnativewindow",
|
||||
"libutils",
|
||||
"android.hardware.media.bufferpool2-V1-ndk",
|
||||
"android.hardware.media.bufferpool2-V2-ndk",
|
||||
],
|
||||
static_libs: [
|
||||
"libaidlcommonsupport",
|
||||
@@ -59,8 +60,9 @@ cc_test {
|
||||
"libcutils",
|
||||
"libfmq",
|
||||
"liblog",
|
||||
"libnativewindow",
|
||||
"libutils",
|
||||
"android.hardware.media.bufferpool2-V1-ndk",
|
||||
"android.hardware.media.bufferpool2-V2-ndk",
|
||||
],
|
||||
static_libs: [
|
||||
"libaidlcommonsupport",
|
||||
@@ -82,8 +84,9 @@ cc_test {
|
||||
"libcutils",
|
||||
"libfmq",
|
||||
"liblog",
|
||||
"libnativewindow",
|
||||
"libutils",
|
||||
"android.hardware.media.bufferpool2-V1-ndk",
|
||||
"android.hardware.media.bufferpool2-V2-ndk",
|
||||
],
|
||||
static_libs: [
|
||||
"libaidlcommonsupport",
|
||||
|
||||
@@ -20,7 +20,7 @@ aidl_interface {
|
||||
],
|
||||
imports: [
|
||||
"android.hardware.common-V2",
|
||||
"android.hardware.media.bufferpool2-V1",
|
||||
"android.hardware.media.bufferpool2-V2",
|
||||
],
|
||||
include_dirs: [
|
||||
"frameworks/native/aidl/gui",
|
||||
|
||||
Reference in New Issue
Block a user