Skip to main content

scanout_dmabuf

Function scanout_dmabuf 

Source
pub(crate) fn scanout_dmabuf<R: Renderer + ImportAll>(
    surface: &WaylandSurfaceRenderElement<R>,
    size: (i32, i32),
    planes: usize,
) -> Result<(Dmabuf, Buffer, String), &'static str>
Expand description

A client’s dmabuf the zero-copy session encodes as it stands, with its description for the log, and a hold on the buffer, or why the session cannot take it: both hardware sessions import one of the four packed 8-bit RGB formats at their own width and height, so only a buffer of the capture’s size qualifies, and of no more planes than the session’s encoder imports (planes: VA-API maps a compressed layout’s metadata plane, NVENC one plane). What the driver then makes of its modifier and pitch only the import says, and a refusal there ends the direct path for the capture (WlEncodeControls::scanout_refused).