summaryrefslogtreecommitdiff
path: root/src/py/cam/cam_qt.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/py/cam/cam_qt.py')
-rw-r--r--src/py/cam/cam_qt.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/py/cam/cam_qt.py b/src/py/cam/cam_qt.py
index bff1175b..70bdb7bb 100644
--- a/src/py/cam/cam_qt.py
+++ b/src/py/cam/cam_qt.py
@@ -9,6 +9,7 @@ from PIL import Image
from PIL.ImageQt import ImageQt
from PyQt5 import QtCore, QtGui, QtWidgets
import libcamera as libcam
+import libcamera.utils
import numpy as np
import sys
@@ -285,7 +286,7 @@ class MainWindow(QtWidgets.QWidget):
controlsLayout.addStretch()
def buf_to_qpixmap(self, stream, fb):
- with fb.mmap() as mfb:
+ with libcamera.utils.MappedFrameBuffer(fb) as mfb:
cfg = stream.configuration
if cfg.pixel_format == libcam.formats.MJPEG: