[libcamera-devel,v2,2/6] libcamera: Initialise the SensorOutputSize property

Message ID 20200925085127.17214-3-david.plowman@raspberrypi.com
State Superseded
Headers show
Series
  • Digital zoom
Related show

Commit Message

David Plowman Sept. 25, 2020, 8:51 a.m. UTC
Add a default initialisation according to the sensor resolution,
though it will need updating when the camera mode changes.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/libcamera/camera_sensor.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

Patch

diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp
index d2679a4..c9a19b0 100644
--- a/src/libcamera/camera_sensor.cpp
+++ b/src/libcamera/camera_sensor.cpp
@@ -277,6 +277,12 @@  int CameraSensor::init()
 	 */
 	resolution_ = sizes_.back();
 
+	/*
+	 * Set a default value for the SensorOutputSize, though it will have to
+	 * be updated when new camera modes are chosen.
+	 */
+	properties_.set(properties::SensorOutputSize, resolution_);
+
 	return 0;
 }