diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-07-23 18:25:04 +0200 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-07-24 19:03:52 +0200 |
commit | 3530614fbf59b83f29bbd618742a6683c4fa244f (patch) | |
tree | 01fc2c1ae8f12d971ac55c57497f1de3b75fe979 /src | |
parent | 7145d15e043a9066a7e0a6a53ba95b1b1af851d5 (diff) |
android: camera_device: Remove ANDROID_SCALER_AVAILABLE_FORMATS
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 <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/android/camera_device.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
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<uint32_t, uint32_t> 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<uint32_t, uint32_t> 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<uint32_t> 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<uint32_t> 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, |