mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-24 17:15:07 +03:00
py: Implement FrameBufferPlane
Implement FrameBufferPlane class and adjust the methods and uses accordingly. Note that we don't expose the fd as a SharedFD, but as an int. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
e8317de05c
commit
fbd6c4d1c8
4 changed files with 36 additions and 35 deletions
|
@ -131,10 +131,10 @@ class KMSRenderer:
|
|||
fds = []
|
||||
strides = []
|
||||
offsets = []
|
||||
for i in range(fb.num_planes):
|
||||
fds.append(fb.fd(i))
|
||||
for plane in fb.planes:
|
||||
fds.append(plane.fd)
|
||||
strides.append(cfg.stride)
|
||||
offsets.append(fb.offset(i))
|
||||
offsets.append(plane.offset)
|
||||
|
||||
drmfb = pykms.DmabufFramebuffer(self.card, w, h, fmt,
|
||||
fds, strides, offsets)
|
||||
|
|
|
@ -269,7 +269,7 @@ class MainWindow(QtWidgets.QWidget):
|
|||
EGL_WIDTH, w,
|
||||
EGL_HEIGHT, h,
|
||||
EGL_LINUX_DRM_FOURCC_EXT, fmt,
|
||||
EGL_DMA_BUF_PLANE0_FD_EXT, fb.fd(0),
|
||||
EGL_DMA_BUF_PLANE0_FD_EXT, fb.planes[0].fd,
|
||||
EGL_DMA_BUF_PLANE0_OFFSET_EXT, 0,
|
||||
EGL_DMA_BUF_PLANE0_PITCH_EXT, cfg.stride,
|
||||
EGL_NONE,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue