summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2021-06-17 18:25:18 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2021-08-02 18:07:38 +0900
commitf0a427d4b74612e1583ea300d758bd00fe281d42 (patch)
tree250d80f9f14402235dec5f9972cd3ae1aa894914 /src
parent719ac763388a44685855562039226823681c1f57 (diff)
android, controls: Add and plumb MaxLatency control
Add a MaxLatency control, and plumb it into the HAL accordingly. Bug: https://bugs.libcamera.org/show_bug.cgi?id=50 Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src')
-rw-r--r--src/android/camera_capabilities.cpp6
-rw-r--r--src/libcamera/control_ids.yaml10
2 files changed, 14 insertions, 2 deletions
diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
index 4f764402..bd661675 100644
--- a/src/android/camera_capabilities.cpp
+++ b/src/android/camera_capabilities.cpp
@@ -1119,8 +1119,10 @@ int CameraCapabilities::initializeStaticMetadata()
}
/* Sync static metadata. */
- int32_t maxLatency = ANDROID_SYNC_MAX_LATENCY_UNKNOWN;
- staticMetadata_->addEntry(ANDROID_SYNC_MAX_LATENCY, maxLatency);
+ setMetadata(staticMetadata_.get(), ANDROID_SYNC_MAX_LATENCY,
+ controlsInfo, controls::draft::MaxLatency,
+ ControlRange::Def,
+ ANDROID_SYNC_MAX_LATENCY_UNKNOWN);
/* Flash static metadata. */
char flashAvailable = ANDROID_FLASH_INFO_AVAILABLE_FALSE;
diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml
index d92f29f5..9d4638ae 100644
--- a/src/libcamera/control_ids.yaml
+++ b/src/libcamera/control_ids.yaml
@@ -622,6 +622,16 @@ controls:
detection, additional format conversions etc) count as an additional
pipeline stage.
+ - MaxLatency:
+ type: int32_t
+ draft: true
+ description: |
+ The maximum number of frames that can occur after a request (different
+ than the previous) has been submitted, and before the result's state
+ becomes synchronized. A value of -1 indicates unknown latency, and 0
+ indicates per-frame control. Currently identical to
+ ANDROID_SYNC_MAX_LATENCY.
+
- TestPatternMode:
type: int32_t
draft: true