summaryrefslogtreecommitdiff
path: root/src/qcam/viewfinder_qt.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-06 22:09:45 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-22 10:58:37 +0300
commitf3671b33d90cf2bb13ee59ac83822a3294689b22 (patch)
tree7ea7bdbfea3c01d79e315dcbf6a305a8acb21aef /src/qcam/viewfinder_qt.h
parentd165f7da34b83753ef70b094d6b49608c24e8f56 (diff)
qcam: viewfinder: Pass stride value to viewfinder
qcam currently assumes that no padding is used at end of lines, and uses the image width as the stride. This leads to rendering failures with some formats on some platforms. To prepare for stride support, add a stride parameter to the ViewFinder::setFormat() function to pass the stride from the stream configuration to the viewfinder. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src/qcam/viewfinder_qt.h')
-rw-r--r--src/qcam/viewfinder_qt.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qcam/viewfinder_qt.h b/src/qcam/viewfinder_qt.h
index 6b48ef48..756f3fa3 100644
--- a/src/qcam/viewfinder_qt.h
+++ b/src/qcam/viewfinder_qt.h
@@ -31,7 +31,8 @@ public:
const QList<libcamera::PixelFormat> &nativeFormats() const override;
- int setFormat(const libcamera::PixelFormat &format, const QSize &size) override;
+ int setFormat(const libcamera::PixelFormat &format, const QSize &size,
+ unsigned int stride) override;
void render(libcamera::FrameBuffer *buffer, Image *image) override;
void stop() override;