Skip to main content

probe_codecs

Function probe_codecs 

Source
pub(crate) fn probe_codecs(
    encode_node_index: i32,
) -> Result<Vec<(Codec, Formats)>, String>
Expand description

The video codecs the NVENC of the GPU behind encode_node_index has an engine for, read from a bare session’s GUID list the way a real session reads it (device_encodes): the driver is negotiated, the device bound by the render node’s PCI bus id (the first CUDA device where the node names none), and the session opened on its primary context with no input buffers, EGL, or encoder initialization. An error names the step that failed: no driver, no device, or a session that would not open, each of which a real session would fail on too. The CUDA and NVENC libraries stay loaded like a session’s, since the driver does not promise to survive libcuda being unloaded after cuInit.