1
0
Fork 0
forked from wry/wry

video: add udmabuf allocator

This commit is contained in:
Julian Orth 2024-09-01 20:23:04 +02:00
parent 2579834a60
commit 62cd29056a
33 changed files with 883 additions and 256 deletions

View file

@ -3,6 +3,7 @@ use {
client::Client,
leaks::Tracker,
object::{Object, Version},
video::dmabuf::{DmaBuf, DmaBufPlane},
wire::{jay_screenshot::*, JayScreenshotId},
},
std::{convert::Infallible, rc::Rc},
@ -45,6 +46,31 @@ impl JayScreenshot {
msg,
});
}
pub fn send_drm_dev(&self, drm: &Rc<OwnedFd>) {
self.client.event(DrmDev {
self_id: self.id,
drm_dev: drm.clone(),
})
}
pub fn send_plane(&self, plane: &DmaBufPlane) {
self.client.event(Plane {
self_id: self.id,
fd: plane.fd.clone(),
offset: plane.offset,
stride: plane.stride,
})
}
pub fn send_dmabuf2(&self, buf: &DmaBuf) {
self.client.event(Dmabuf2 {
self_id: self.id,
width: buf.width,
height: buf.height,
modifier: buf.modifier,
})
}
}
impl JayScreenshotRequestHandler for JayScreenshot {