From 9a0a2da53003775eb965207e47fd84c607d001da Mon Sep 17 00:00:00 2001 From: daniml3 Date: Fri, 19 Aug 2022 13:56:19 +0200 Subject: veux: shim the GetPreviewImageData symbol on libpiex Signed-off-by: daniml3 --- camera/Android.bp | 26 ++++++++++++++++++++++++++ camera/libpiex_shim.cpp | 17 +++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 camera/Android.bp create mode 100644 camera/libpiex_shim.cpp (limited to 'camera') diff --git a/camera/Android.bp b/camera/Android.bp new file mode 100644 index 0000000..421e3b3 --- /dev/null +++ b/camera/Android.bp @@ -0,0 +1,26 @@ +// +// Copyright (C) 2020 The LineageOS Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +cc_library_shared { + name: "libpiex_shim", + + shared_libs: [ + "libpiex", + "libutils", + ], + + proprietary: true, + srcs: ["libpiex_shim.cpp"], +} \ No newline at end of file diff --git a/camera/libpiex_shim.cpp b/camera/libpiex_shim.cpp new file mode 100644 index 0000000..2ce9e19 --- /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 piex \ No newline at end of file -- cgit v1.2.3