summaryrefslogtreecommitdiff
path: root/src/qcam/viewfinder.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/viewfinder.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/viewfinder.cpp')
-rw-r--r--src/qcam/viewfinder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qcam/viewfinder.cpp b/src/qcam/viewfinder.cpp
index 5841dc03..224a227d 100644
--- a/src/qcam/viewfinder.cpp
+++ b/src/qcam/viewfinder.cpp
@@ -16,9 +16,9 @@ ViewFinder::ViewFinder(QWidget *parent)
{
}
-void ViewFinder::display(const unsigned char *raw)
+void ViewFinder::display(const unsigned char *raw, size_t size)
{
- converter_.convert(raw, image_->bits());
+ converter_.convert(raw, size, image_);
QPixmap pixmap = QPixmap::fromImage(*image_);
setPixmap(pixmap);