aboutsummaryrefslogtreecommitdiff
path: root/camera
diff options
context:
space:
mode:
Diffstat (limited to 'camera')
-rw-r--r--camera/Android.bp26
-rw-r--r--camera/libpiex_shim.cpp17
2 files changed, 43 insertions, 0 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