From c4f19714f09d44e0ab456ec00cc2379c3814a818 Mon Sep 17 00:00:00 2001 From: daniml3 Date: Fri, 19 Aug 2022 13:56:19 +0200 Subject: [PATCH] sm6150-common: Add GetPreviewImageData shim for camera Signed-off-by: daniml3 Change-Id: Iad9d37b992775b6d7b9b52ed4637c70fd13ede7f --- camera/Android.bp | 17 +++++++++++++++++ camera/libpiex_shim.cpp | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 camera/Android.bp create mode 100644 camera/libpiex_shim.cpp diff --git a/camera/Android.bp b/camera/Android.bp new file mode 100644 index 0000000..609989e --- /dev/null +++ b/camera/Android.bp @@ -0,0 +1,17 @@ +// +// Copyright (C) 2022 The LineageOS Project +// +// SPDX-License-Identifier: Apache-2.0 +// + +cc_library_shared { + name: "libpiex_shim", + srcs: [ + "libpiex_shim.cpp", + ], + vendor: true, + shared_libs: [ + "libpiex", + "libutils", + ], +} diff --git a/camera/libpiex_shim.cpp b/camera/libpiex_shim.cpp new file mode 100644 index 0000000..e0b2a3e --- /dev/null +++ b/camera/libpiex_shim.cpp @@ -0,0 +1,17 @@ +#include + +namespace piex { + +using image_type_recognition::RawImageTypes; + +extern "C" void + _ZN4piex19GetPreviewImageDataEPNS_15StreamInterfaceEPNS_16PreviewImageDataEPNS_22image_type_recognition13RawImageTypesE( + StreamInterface* data, PreviewImageData* preview_image_data, RawImageTypes* output_type); + + +extern "C" void _ZN4piex19GetPreviewImageDataEPNS_15StreamInterfaceEPNS_16PreviewImageDataE( + StreamInterface* data, PreviewImageData* preview_image_data) { + return _ZN4piex19GetPreviewImageDataEPNS_15StreamInterfaceEPNS_16PreviewImageDataEPNS_22image_type_recognition13RawImageTypesE(data, preview_image_data, nullptr); +} + +} // namespace android