summaryrefslogtreecommitdiff
path: root/src/qcam/viewfinder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcam/viewfinder.cpp')
-rw-r--r--src/qcam/viewfinder.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qcam/viewfinder.cpp b/src/qcam/viewfinder.cpp
index 066ac605..d00edc33 100644
--- a/src/qcam/viewfinder.cpp
+++ b/src/qcam/viewfinder.cpp
@@ -24,7 +24,8 @@ ViewFinder::~ViewFinder()
delete image_;
}
-void ViewFinder::display(const unsigned char *raw, size_t size)
+void ViewFinder::display(const libcamera::FrameBuffer *buffer,
+ MappedBuffer *map)
{
QMutexLocker locker(&mutex_);
@@ -34,7 +35,8 @@ void ViewFinder::display(const unsigned char *raw, size_t size)
* impacting performances.
*/
- converter_.convert(raw, size, image_);
+ converter_.convert(static_cast<unsigned char *>(map->memory),
+ buffer->metadata().planes[0].bytesused, image_);
update();
}