summaryrefslogtreecommitdiff
path: root/src/qcam/main_window.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-03-29 17:20:07 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-04-02 17:24:41 +0300
commit80e236e19b61a1267948433fd6855da138d6f527 (patch)
treef2ff6a8311b5c4d4cef65e4a7260e75c84aee6ec /src/qcam/main_window.cpp
parent29f323eea84c5bf5037658b0042478124ed58ff1 (diff)
qcam: Add JPEG format support
When the camera provides MJPEG, use the QImage JPEG decompression code to convert that to RGB. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/qcam/main_window.cpp')
-rw-r--r--src/qcam/main_window.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
index a148aa4d..fea70142 100644
--- a/src/qcam/main_window.cpp
+++ b/src/qcam/main_window.cpp
@@ -222,7 +222,7 @@ int MainWindow::display(Buffer *buffer)
Plane &plane = buffer->planes().front();
unsigned char *raw = static_cast<unsigned char *>(plane.mem());
- viewfinder_->display(raw);
+ viewfinder_->display(raw, buffer->bytesused());
return 0;
}