universal7580: camera: convert to Android.bp
authorJan Altensen <info@stricted.net>
Tue, 10 Sep 2019 09:29:18 +0000 (11:29 +0200)
committerDanny Wood <danwood76@gmail.com>
Tue, 10 Mar 2020 15:25:55 +0000 (15:25 +0000)
Change-Id: I65f282be615d0bb5ff983114bff09bb38f7c54c2

camera/Android.bp [new file with mode: 0644]
camera/Android.mk [deleted file]
camera/CameraParametersExtra.h [new file with mode: 0644]
camera/CameraWrapper.h
include/camera/CameraParametersExtra.h [deleted file]

diff --git a/camera/Android.bp b/camera/Android.bp
new file mode 100644 (file)
index 0000000..103df11
--- /dev/null
@@ -0,0 +1,41 @@
+cc_library_shared {
+    name: "camera.universal7580",
+    relative_install_path: "hw",
+    
+    srcs: [
+        "CameraWrapper.cpp",
+        "Camera2Wrapper.cpp",
+        "CallbackWorkerThread.cpp",
+    ],
+
+    export_shared_lib_headers: [
+        "android.hardware.graphics.bufferqueue@1.0",
+        "android.hardware.graphics.bufferqueue@2.0",
+    ],
+
+    generated_headers: [
+        "android.hardware.graphics.bufferqueue@1.0_genc++_headers",
+        "android.hardware.graphics.bufferqueue@2.0_genc++_headers",
+    ],
+
+    shared_libs: [
+        "libhardware",
+        "liblog",
+        "libcamera_client",
+        "libutils",
+        "libcutils",
+        "android.hidl.token@1.0-utils",
+        "android.hardware.graphics.bufferqueue@1.0",
+        "android.hardware.graphics.bufferqueue@2.0",
+    ],
+
+    include_dirs: [
+        "frameworks/native/libs/nativewindow/include",
+        "frameworks/native/libs/arect/include",
+        "frameworks/av/media/ndk/include",
+    ],
+
+    header_libs: [
+        "libnativebase_headers",
+    ],
+}
diff --git a/camera/Android.mk b/camera/Android.mk
deleted file mode 100644 (file)
index 4d9cf0b..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
-    CameraWrapper.cpp \
-    Camera2Wrapper.cpp \
-    CallbackWorkerThread.cpp
-
-LOCAL_STATIC_LIBRARIES := libbase libarect
-LOCAL_SHARED_LIBRARIES := \
-    libhardware liblog libcamera_client libutils libcutils \
-    android.hidl.token@1.0-utils \
-    android.hardware.graphics.bufferqueue@1.0
-
-LOCAL_HEADER_LIBRARIES := libnativebase_headers
-
-LOCAL_MODULE_RELATIVE_PATH := hw
-
-LOCAL_MODULE := camera.$(TARGET_BOOTLOADER_BOARD_NAME)
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/camera/CameraParametersExtra.h b/camera/CameraParametersExtra.h
new file mode 100644 (file)
index 0000000..f781db9
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2014 The CyanogenMod 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.
+ */
+
+#define CAMERA_PARAMETERS_EXTRA_C \
+    const char CameraParameters::PIXEL_FORMAT_YUV420SP_NV21[] = "nv21"; \
+    const char CameraParameters::EFFECT_CARTOONIZE[] = "cartoonize"; \
+    const char CameraParameters::EFFECT_POINT_RED_YELLOW[] = "point-red-yellow"; \
+    const char CameraParameters::EFFECT_POINT_GREEN[] = "point-green"; \
+    const char CameraParameters::EFFECT_POINT_BLUE[] = "point-blue"; \
+    const char CameraParameters::EFFECT_VINTAGE_COLD[] = "vintage-cold"; \
+    const char CameraParameters::EFFECT_VINTAGE_WARM[] = "vintage-warm"; \
+    const char CameraParameters::EFFECT_WASHED[] = "washed"; \
+    const char CameraParameters::ISO_AUTO[] = "auto"; \
+    const char CameraParameters::ISO_NIGHT[] = "night"; \
+    const char CameraParameters::ISO_SPORTS[] = "sports"; \
+    const char CameraParameters::ISO_6400[] = "6400"; \
+    const char CameraParameters::ISO_3200[] = "3200"; \
+    const char CameraParameters::ISO_1600[] = "1600"; \
+    const char CameraParameters::ISO_800[] = "800"; \
+    const char CameraParameters::ISO_400[] = "400"; \
+    const char CameraParameters::ISO_200[] = "200"; \
+    const char CameraParameters::ISO_100[] = "100"; \
+    const char CameraParameters::ISO_80[] = "80"; \
+    const char CameraParameters::ISO_50[] = "50"; \
+    const char CameraParameters::KEY_SUPPORTED_METERING_MODE[] = "metering-values"; \
+    const char CameraParameters::METERING_CENTER[] = "center"; \
+    const char CameraParameters::METERING_MATRIX[] = "matrix"; \
+    const char CameraParameters::METERING_SPOT[] = "spot"; \
+    const char CameraParameters::METERING_OFF[] = "off"; \
+    const char CameraParameters::KEY_DYNAMIC_RANGE_CONTROL[] = "dynamic-range-control"; \
+    const char CameraParameters::KEY_SUPPORTED_PHASE_AF[] = "phase-af-values"; \
+    const char CameraParameters::KEY_PHASE_AF[] = "phase-af"; \
+    const char CameraParameters::KEY_SUPPORTED_RT_HDR[] = "rt-hdr-values"; \
+    const char CameraParameters::KEY_RT_HDR[] = "rt-hdr";
+
+#define CAMERA_PARAMETERS_EXTRA_H \
+    static const char PIXEL_FORMAT_YUV420SP_NV21[]; \
+    static const char EFFECT_CARTOONIZE[]; \
+    static const char EFFECT_POINT_RED_YELLOW[]; \
+    static const char EFFECT_POINT_GREEN[]; \
+    static const char EFFECT_POINT_BLUE[]; \
+    static const char EFFECT_VINTAGE_COLD[]; \
+    static const char EFFECT_VINTAGE_WARM[]; \
+    static const char EFFECT_WASHED[]; \
+    static const char ISO_AUTO[]; \
+    static const char ISO_NIGHT[]; \
+    static const char ISO_SPORTS[]; \
+    static const char ISO_6400[]; \
+    static const char ISO_3200[]; \
+    static const char ISO_1600[]; \
+    static const char ISO_800[]; \
+    static const char ISO_400[]; \
+    static const char ISO_200[]; \
+    static const char ISO_100[]; \
+    static const char ISO_80[]; \
+    static const char ISO_50[]; \
+    static const char KEY_SUPPORTED_METERING_MODE[]; \
+    static const char METERING_CENTER[]; \
+    static const char METERING_MATRIX[]; \
+    static const char METERING_SPOT[]; \
+    static const char METERING_OFF[]; \
+    static const char KEY_DYNAMIC_RANGE_CONTROL[]; \
+    static const char KEY_SUPPORTED_PHASE_AF[]; \
+    static const char KEY_PHASE_AF[]; \
+    static const char KEY_SUPPORTED_RT_HDR[]; \
+    static const char KEY_RT_HDR[];
+
index d9aeb9964963d2cb7691b7f6d44c511c18fddfe3..a084b1cde645af606341c1e201b1572323f679d7 100644 (file)
@@ -19,7 +19,7 @@
 #include <hardware/camera.h>
 #include <camera/Camera.h>
 #include <camera/CameraParameters.h>
-#include <camera/CameraParametersExtra.h>
+#include <CameraParametersExtra.h>
 
 static android::Mutex gCameraWrapperLock;
 
diff --git a/include/camera/CameraParametersExtra.h b/include/camera/CameraParametersExtra.h
deleted file mode 100644 (file)
index f781db9..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2014 The CyanogenMod 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.
- */
-
-#define CAMERA_PARAMETERS_EXTRA_C \
-    const char CameraParameters::PIXEL_FORMAT_YUV420SP_NV21[] = "nv21"; \
-    const char CameraParameters::EFFECT_CARTOONIZE[] = "cartoonize"; \
-    const char CameraParameters::EFFECT_POINT_RED_YELLOW[] = "point-red-yellow"; \
-    const char CameraParameters::EFFECT_POINT_GREEN[] = "point-green"; \
-    const char CameraParameters::EFFECT_POINT_BLUE[] = "point-blue"; \
-    const char CameraParameters::EFFECT_VINTAGE_COLD[] = "vintage-cold"; \
-    const char CameraParameters::EFFECT_VINTAGE_WARM[] = "vintage-warm"; \
-    const char CameraParameters::EFFECT_WASHED[] = "washed"; \
-    const char CameraParameters::ISO_AUTO[] = "auto"; \
-    const char CameraParameters::ISO_NIGHT[] = "night"; \
-    const char CameraParameters::ISO_SPORTS[] = "sports"; \
-    const char CameraParameters::ISO_6400[] = "6400"; \
-    const char CameraParameters::ISO_3200[] = "3200"; \
-    const char CameraParameters::ISO_1600[] = "1600"; \
-    const char CameraParameters::ISO_800[] = "800"; \
-    const char CameraParameters::ISO_400[] = "400"; \
-    const char CameraParameters::ISO_200[] = "200"; \
-    const char CameraParameters::ISO_100[] = "100"; \
-    const char CameraParameters::ISO_80[] = "80"; \
-    const char CameraParameters::ISO_50[] = "50"; \
-    const char CameraParameters::KEY_SUPPORTED_METERING_MODE[] = "metering-values"; \
-    const char CameraParameters::METERING_CENTER[] = "center"; \
-    const char CameraParameters::METERING_MATRIX[] = "matrix"; \
-    const char CameraParameters::METERING_SPOT[] = "spot"; \
-    const char CameraParameters::METERING_OFF[] = "off"; \
-    const char CameraParameters::KEY_DYNAMIC_RANGE_CONTROL[] = "dynamic-range-control"; \
-    const char CameraParameters::KEY_SUPPORTED_PHASE_AF[] = "phase-af-values"; \
-    const char CameraParameters::KEY_PHASE_AF[] = "phase-af"; \
-    const char CameraParameters::KEY_SUPPORTED_RT_HDR[] = "rt-hdr-values"; \
-    const char CameraParameters::KEY_RT_HDR[] = "rt-hdr";
-
-#define CAMERA_PARAMETERS_EXTRA_H \
-    static const char PIXEL_FORMAT_YUV420SP_NV21[]; \
-    static const char EFFECT_CARTOONIZE[]; \
-    static const char EFFECT_POINT_RED_YELLOW[]; \
-    static const char EFFECT_POINT_GREEN[]; \
-    static const char EFFECT_POINT_BLUE[]; \
-    static const char EFFECT_VINTAGE_COLD[]; \
-    static const char EFFECT_VINTAGE_WARM[]; \
-    static const char EFFECT_WASHED[]; \
-    static const char ISO_AUTO[]; \
-    static const char ISO_NIGHT[]; \
-    static const char ISO_SPORTS[]; \
-    static const char ISO_6400[]; \
-    static const char ISO_3200[]; \
-    static const char ISO_1600[]; \
-    static const char ISO_800[]; \
-    static const char ISO_400[]; \
-    static const char ISO_200[]; \
-    static const char ISO_100[]; \
-    static const char ISO_80[]; \
-    static const char ISO_50[]; \
-    static const char KEY_SUPPORTED_METERING_MODE[]; \
-    static const char METERING_CENTER[]; \
-    static const char METERING_MATRIX[]; \
-    static const char METERING_SPOT[]; \
-    static const char METERING_OFF[]; \
-    static const char KEY_DYNAMIC_RANGE_CONTROL[]; \
-    static const char KEY_SUPPORTED_PHASE_AF[]; \
-    static const char KEY_PHASE_AF[]; \
-    static const char KEY_SUPPORTED_RT_HDR[]; \
-    static const char KEY_RT_HDR[];
-