diff options
author | daniml3 <daniel@danielml.dev> | 2022-08-19 13:56:19 +0200 |
---|---|---|
committer | sinanmohd <pcmsinan@gmail.com> | 2023-01-05 21:30:23 +0530 |
commit | 9a0a2da53003775eb965207e47fd84c607d001da (patch) | |
tree | 47b3fe70c9fdd38419f8bf1ee15a3c86705e1834 | |
parent | b6d1b58c7f04751e9440e6a09ef1f6c4971c420b (diff) |
veux: shim the GetPreviewImageData symbol on libpiex
Signed-off-by: daniml3 <daniel@danielml.dev>
-rw-r--r-- | camera/Android.bp | 26 | ||||
-rw-r--r-- | camera/libpiex_shim.cpp | 17 | ||||
-rw-r--r-- | device.mk | 5 | ||||
-rwxr-xr-x | extract-files.sh | 3 |
4 files changed, 49 insertions, 2 deletions
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 <src/piex.h> + +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 @@ -116,7 +116,10 @@ PRODUCT_PACKAGES += \ vendor.qti.hardware.camera.device@1.0.vendor \ vendor.qti.hardware.camera.postproc@1.0.vendor -# Component Overrides +PRODUCT_PACKAGES += \ + libpiex_shim + +# Component overrides PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/component-overrides.xml diff --git a/extract-files.sh b/extract-files.sh index 96e4a74..7876bef 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -53,7 +53,8 @@ function blob_fixup() { case "${1}" in vendor/lib64/camera/components/com.qti.node.mialgocontrol.so) llvm-strip --strip-debug "${2}" - ;; + "${PATCHELF}" --add-needed "libpiex_shim.so" "${2}" + ;; esac } |