camera: common: add CaptureRequestKey and Metadata
Change-Id: I2b67f6f65300069e0e7925b7654db8c8a524492b
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
diff --git a/camera/common/src/main/java/com/shift/camera/CaptureRequestKey.java b/camera/common/src/main/java/com/shift/camera/CaptureRequestKey.java
new file mode 100644
index 0000000..9adefdc
--- /dev/null
+++ b/camera/common/src/main/java/com/shift/camera/CaptureRequestKey.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2020 SHIFT GmbH.
+ *
+ * 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.
+ */
+
+package com.shift.camera;
+
+import android.hardware.camera2.CaptureRequest;
+
+public final class CaptureRequestKey {
+ public static final CaptureRequest.Key<Integer> BOKEH_CAPTURE_LEVEL;
+ public static final CaptureRequest.Key<Integer> BOKEH_PREVIEW_LEVEL;
+ public static final CaptureRequest.Key<Integer> HDR_CAPTURE_ENABLE;
+ public static final CaptureRequest.Key<Byte> NOISE_REDUCTION_ENABLE;
+ public static final CaptureRequest.Key<Integer> SESSION_OPERATION_MODE;
+
+ static {
+ BOKEH_CAPTURE_LEVEL = new CaptureRequest.Key<>("com.shift.capture.bokeh.level", Integer.class);
+ BOKEH_PREVIEW_LEVEL = new CaptureRequest.Key<>("com.shift.preview.bokeh.level", Integer.class);
+ HDR_CAPTURE_ENABLE = new CaptureRequest.Key<>("com.shift.capture.hdr.enable", Integer.class);
+ NOISE_REDUCTION_ENABLE = new CaptureRequest.Key<>("org.quic.camera.CustomNoiseReduction.CustomNoiseReduction", Byte.class);
+ SESSION_OPERATION_MODE = new CaptureRequest.Key<>("com.shift.session.operation_mode", Integer.class);
+ }
+
+ private CaptureRequestKey() {
+ // empty
+ }
+}
diff --git a/camera/common/src/main/java/com/shift/camera/Dummy.java b/camera/common/src/main/java/com/shift/camera/Dummy.java
deleted file mode 100644
index e2c9f5f..0000000
--- a/camera/common/src/main/java/com/shift/camera/Dummy.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.shift.camera;
-
-class Dummy {
- // ignore me
-}
diff --git a/camera/common/src/main/java/com/shift/camera/Metadata.java b/camera/common/src/main/java/com/shift/camera/Metadata.java
new file mode 100644
index 0000000..3dc9ca3
--- /dev/null
+++ b/camera/common/src/main/java/com/shift/camera/Metadata.java
@@ -0,0 +1,29 @@
+package com.shift.camera;
+
+public final class Metadata {
+ private Metadata() {
+ // empty
+ }
+
+ public static final class Bokeh {
+ public static final Integer CAMERA_ID = 4;
+
+ public static final int CAPTURE_LEVEL_DEFAULT_VALUE = 75;
+ public static final int PREVIEW_LEVEL_DEFAULT_VALUE = 75;
+
+ private Bokeh() {
+ // empty
+ }
+ }
+
+ public static final class Session {
+ public static final Integer TYPE_HDR = 0x8001;
+ public static final Integer TYPE_LLS = 0x8001;
+ public static final Integer TYPE_BOKEH = 0x8003;
+ public static final Integer TYPE_VIDEO_STAB = 0x8004;
+
+ private Session() {
+ // empty
+ }
+ }
+}