summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-09-04 16:18:20 +0200
committerJacopo Mondi <jacopo@jmondi.org>2019-09-05 23:07:53 +0200
commit31f784c47bfefddaab794df08c9bf4c6f9d8532c (patch)
tree9fbff1f79a7af50c87241686b93e7da4979943a4
parent48504ba143fd5e2db625540cafbf953a97a78aec (diff)
android: camera_device: Remove tags from request template
Remove metadata tags wrongly added to the request template constructed by the libcamera HAL. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--src/android/camera_device.cpp97
1 files changed, 0 insertions, 97 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index dee60e3d..bd69198e 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -557,39 +557,6 @@ const camera_metadata_t *CameraDevice::constructDefaultRequestSettings(int type)
return nullptr;
}
- /* Set to 0 the number of 'processed and stalling' streams (ie JPEG). */
- int32_t maxOutStream[] = { 0, 2, 0 };
- ret = add_camera_metadata_entry(requestTemplate_,
- ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS,
- maxOutStream, 3);
- METADATA_ASSERT(ret);
-
- uint8_t maxPipelineDepth = 5;
- ret = add_camera_metadata_entry(requestTemplate_,
- ANDROID_REQUEST_PIPELINE_MAX_DEPTH,
- &maxPipelineDepth, 1);
- METADATA_ASSERT(ret);
-
- int32_t inputStreams = 0;
- ret = add_camera_metadata_entry(requestTemplate_,
- ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS,
- &inputStreams, 1);
- METADATA_ASSERT(ret);
-
- int32_t partialResultCount = 1;
- ret = add_camera_metadata_entry(requestTemplate_,
- ANDROID_REQUEST_PARTIAL_RESULT_COUNT,
- &partialResultCount, 1);
- METADATA_ASSERT(ret);
-
- uint8_t availableCapabilities[] = {
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE,
- };
- ret = add_camera_metadata_entry(requestTemplate_,
- ANDROID_REQUEST_AVAILABLE_CAPABILITIES,
- availableCapabilities, 1);
- METADATA_ASSERT(ret);
-
uint8_t aeMode = ANDROID_CONTROL_AE_MODE_ON;
ret = add_camera_metadata_entry(requestTemplate_,
ANDROID_CONTROL_AE_MODE,
@@ -632,12 +599,6 @@ const camera_metadata_t *CameraDevice::constructDefaultRequestSettings(int type)
&awbLock, 1);
METADATA_ASSERT(ret);
- uint8_t awbLockAvailable = ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE;
- ret = add_camera_metadata_entry(requestTemplate_,
- ANDROID_CONTROL_AWB_LOCK_AVAILABLE,
- &awbLockAvailable, 1);
- METADATA_ASSERT(ret);
-
uint8_t flashMode = ANDROID_FLASH_MODE_OFF;
ret = add_camera_metadata_entry(requestTemplate_,
ANDROID_FLASH_MODE,
@@ -655,64 +616,6 @@ const camera_metadata_t *CameraDevice::constructDefaultRequestSettings(int type)
&captureIntent, 1);
METADATA_ASSERT(ret);
- /*
- * This is quite hard to list at the moment wihtout knowing what
- * we could control.
- *
- * For now, just list in the available Request keys and in the available
- * result keys the control and reporting of the AE algorithm.
- */
- std::vector<int32_t> availableRequestKeys = {
- ANDROID_CONTROL_AE_MODE,
- ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION,
- ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER,
- ANDROID_CONTROL_AE_LOCK,
- ANDROID_CONTROL_AF_TRIGGER,
- ANDROID_CONTROL_AWB_MODE,
- ANDROID_CONTROL_AWB_LOCK,
- ANDROID_CONTROL_AWB_LOCK_AVAILABLE,
- ANDROID_CONTROL_CAPTURE_INTENT,
- ANDROID_FLASH_MODE,
- ANDROID_STATISTICS_FACE_DETECT_MODE,
- };
-
- ret = add_camera_metadata_entry(requestTemplate_,
- ANDROID_REQUEST_AVAILABLE_REQUEST_KEYS,
- availableRequestKeys.data(),
- availableRequestKeys.size());
- METADATA_ASSERT(ret);
-
- std::vector<int32_t> availableResultKeys = {
- ANDROID_CONTROL_AE_MODE,
- ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION,
- ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER,
- ANDROID_CONTROL_AE_LOCK,
- ANDROID_CONTROL_AF_TRIGGER,
- ANDROID_CONTROL_AWB_MODE,
- ANDROID_CONTROL_AWB_LOCK,
- ANDROID_CONTROL_AWB_LOCK_AVAILABLE,
- ANDROID_CONTROL_CAPTURE_INTENT,
- ANDROID_FLASH_MODE,
- ANDROID_STATISTICS_FACE_DETECT_MODE,
- };
- ret = add_camera_metadata_entry(requestTemplate_,
- ANDROID_REQUEST_AVAILABLE_RESULT_KEYS,
- availableResultKeys.data(),
- availableResultKeys.size());
- METADATA_ASSERT(ret);
-
- /*
- * \todo The available characteristics are be the tags reported
- * as part of the static metadata reported at hal_get_camera_info()
- * time. As of now, report an empty list.
- */
- std::vector<int32_t> availableCharacteristicsKeys = {};
- ret = add_camera_metadata_entry(requestTemplate_,
- ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS,
- availableCharacteristicsKeys.data(),
- availableCharacteristicsKeys.size());
- METADATA_ASSERT(ret);
-
return requestTemplate_;
}