From 3530614fbf59b83f29bbd618742a6683c4fa244f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Thu, 23 Jul 2020 18:25:04 +0200 Subject: android: camera_device: Remove ANDROID_SCALER_AVAILABLE_FORMATS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to the documentation the tag ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS deprecates the ANDROID_SCALER_AVAILABLE_FORMATS tag. As the HAL implements both tags remove the deprecated one. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/android/camera_device.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'src/android/camera_device.cpp') diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 48f8090a..6e767358 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -376,7 +376,7 @@ std::tuple CameraDevice::calculateStaticMetadataSize() * \todo Keep this in sync with the actual number of entries. * Currently: 50 entries, 647 bytes of static metadata */ - uint32_t numEntries = 50; + uint32_t numEntries = 49; uint32_t byteSize = 647; /* @@ -385,10 +385,9 @@ std::tuple CameraDevice::calculateStaticMetadataSize() * * Each stream configuration entry requires 52 bytes: * 4 32bits integers for ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS - * 1 32bits integer for ANDROID_SCALER_AVAILABLE_FORMATS * 4 64bits integers for ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS */ - byteSize += streamConfigurations_.size() * 52; + byteSize += streamConfigurations_.size() * 48; return std::make_tuple(numEntries, byteSize); } @@ -656,15 +655,6 @@ const camera_metadata_t *CameraDevice::getStaticMetadata() staticMetadata_->addEntry(ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM, &maxDigitalZoom, 1); - std::vector availableStreamFormats; - availableStreamFormats.reserve(streamConfigurations_.size()); - std::transform(streamConfigurations_.begin(), streamConfigurations_.end(), - std::back_inserter(availableStreamFormats), - [](const auto &entry) { return entry.androidScalerCode; }); - staticMetadata_->addEntry(ANDROID_SCALER_AVAILABLE_FORMATS, - availableStreamFormats.data(), - availableStreamFormats.size()); - std::vector availableStreamConfigurations; availableStreamConfigurations.reserve(streamConfigurations_.size() * 4); for (const auto &entry : streamConfigurations_) { @@ -761,7 +751,6 @@ const camera_metadata_t *CameraDevice::getStaticMetadata() ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE, ANDROID_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES, ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM, - ANDROID_SCALER_AVAILABLE_FORMATS, ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS, ANDROID_SCALER_AVAILABLE_STALL_DURATIONS, ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS, -- cgit v1.2.1