summaryrefslogtreecommitdiff
path: root/src/android/camera_capabilities.cpp
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2021-06-29 17:34:10 +0200
committerJacopo Mondi <jacopo@jmondi.org>2021-10-15 09:32:31 +0200
commit02f47869151fafb8252c6bd64fcebd161fc548b8 (patch)
treec9e9aefabf5350dfe6e4b8c3e942dc397b65bbd7 /src/android/camera_capabilities.cpp
parente3d7206fb5899ddcb4884ca69ab581e2652b6da9 (diff)
android: capabilities: Use per-configuration durations
Use the per-configuration stream durations as collected during initializeStreamConfigurations() to populate the ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT static metadata. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/android/camera_capabilities.cpp')
-rw-r--r--src/android/camera_capabilities.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
index e22bc35d..bf6135cc 100644
--- a/src/android/camera_capabilities.cpp
+++ b/src/android/camera_capabilities.cpp
@@ -1291,19 +1291,16 @@ int CameraCapabilities::initializeStaticMetadata()
staticMetadata_->addEntry(ANDROID_SCALER_AVAILABLE_STALL_DURATIONS,
availableStallDurations);
- /* Use the minimum frame duration for all the YUV/RGB formats. */
- if (minFrameDurationNsec > 0) {
- std::vector<int64_t> minFrameDurations;
- minFrameDurations.reserve(streamConfigurations_.size() * 4);
- for (const auto &entry : streamConfigurations_) {
- minFrameDurations.push_back(entry.androidFormat);
- minFrameDurations.push_back(entry.resolution.width);
- minFrameDurations.push_back(entry.resolution.height);
- minFrameDurations.push_back(minFrameDurationNsec);
- }
- staticMetadata_->addEntry(ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS,
- minFrameDurations);
+ std::vector<int64_t> minFrameDurations;
+ minFrameDurations.reserve(streamConfigurations_.size() * 4);
+ for (const auto &entry : streamConfigurations_) {
+ minFrameDurations.push_back(entry.androidFormat);
+ minFrameDurations.push_back(entry.resolution.width);
+ minFrameDurations.push_back(entry.resolution.height);
+ minFrameDurations.push_back(entry.minFrameDurationNsec);
}
+ staticMetadata_->addEntry(ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS,
+ minFrameDurations);
uint8_t croppingType = ANDROID_SCALER_CROPPING_TYPE_CENTER_ONLY;
staticMetadata_->addEntry(ANDROID_SCALER_CROPPING_TYPE, croppingType);