Skip to main content

detect

Function detect 

Source
pub fn detect(codec: &str, samples: &[Vec<u8>]) -> PixelFormat
Expand description

Detect pixel format from the first sequence header in samples. Falls back to Yuv420p on any parse failure — that matches the previous hard-coded behavior so a bad probe doesn’t block the transcode, just the probe payload accuracy.