[libcamera-devel,5/6] libcamera: pipeline: simple: Set device's flip controls correctly
diff mbox series

Message ID 20221110144556.7858-6-david.plowman@raspberrypi.com
State Superseded
Headers show
Series
  • Resolve invalid attempts to set sensor flip controls
Related show

Commit Message

David Plowman Nov. 10, 2022, 2:45 p.m. UTC
Set the horizontal and vertical flip controls correctly by
calling the device's setTransform method now that this no longer
happens in CameraSensor::init().

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
---
 src/libcamera/pipeline/simple/simple.cpp | 3 +++
 1 file changed, 3 insertions(+)

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index a32de7f3..f25a8cc1 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -1120,6 +1120,9 @@  int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)
 	if (ret < 0)
 		return ret;
 
+	/* Set up the video device's horizontal and vertical flips. */
+	video->setTransform(c->transform);
+
 	/* Configure the video node. */
 	V4L2PixelFormat videoFormat = video->toV4L2PixelFormat(pipeConfig->captureFormat);