Skip to main content

build_readback_encoders

Function build_readback_encoders 

Source
pub(crate) fn build_readback_encoders(
    settings: &mut CaptureSettings,
    try_gpu: bool,
    rgba: bool,
    prior: Option<FrameEncoder>,
) -> Option<FrameEncoder>
Expand description

Build the readback-mode frame encoder on the thread that will own and drive it: the shared ladder with host frames (rgba for a GLES readback, BGRA otherwise), with the GPU rungs skipped when try_gpu is off (the recovery ladder’s demotion). None is the CPU path, where encode_cpu builds its own per-region state. A compatible NVENC session handed over from the previous encode thread is reconfigured in place rather than rebuilt, which would stall the stream.