pub struct TranscodeSettings {Show 18 fields
pub mode: Option<Mode>,
pub rungs: Vec<(u32, u32)>,
pub ladder: bool,
pub max_short_side: Option<u32>,
pub segment_seconds: Option<f32>,
pub crf: Option<u8>,
pub speed: Option<u8>,
pub audio: Option<AudioPolicy>,
pub color: Option<ColorPolicy>,
pub bit_depth: Option<BitDepth>,
pub seam: Option<ChunkSeamMode>,
pub max_fps: Option<f64>,
pub gpu: Option<u32>,
pub gpu_family: Option<GpuFamily>,
pub single_gpu: bool,
pub decode_gpu: Option<u32>,
pub width: Option<u32>,
pub height: Option<u32>,
}Expand description
Every optional transcode knob, surface-agnostic. All-None/empty is “use the
defaults” (source-resolution single file, AV1 + audio passthrough, SDR).
Fields§
§mode: Option<Mode>§rungs: Vec<(u32, u32)>Explicit rungs as (width, height). Wins over ladder / width.
ladder: boolDerive a standard ABR ladder from the source.
max_short_side: Option<u32>§segment_seconds: Option<f32>§crf: Option<u8>§speed: Option<u8>§audio: Option<AudioPolicy>§color: Option<ColorPolicy>§bit_depth: Option<BitDepth>§seam: Option<ChunkSeamMode>§max_fps: Option<f64>§gpu: Option<u32>Pin encode to one GPU index.
gpu_family: Option<GpuFamily>Restrict encode to one vendor family.
single_gpu: boolUse a single GPU (serial), the first available.
decode_gpu: Option<u32>Pin the decode pump to a GPU index.
width: Option<u32>Single-output width/height (the pipe/ipc scaling knobs). Used only
when neither rungs nor ladder is set; defaults to the source size.
height: Option<u32>Implementations§
Source§impl TranscodeSettings
impl TranscodeSettings
Sourcepub fn into_spec(self, src_w: u32, src_h: u32) -> Result<OutputSpec>
pub fn into_spec(self, src_w: u32, src_h: u32) -> Result<OutputSpec>
Build an OutputSpec from these settings against a source resolution.
This is the single spec-building implementation for all surfaces.
Sourcepub fn apply_kv(&mut self, key: &str, val: &str) -> Result<()>
pub fn apply_kv(&mut self, key: &str, val: &str) -> Result<()>
Apply one key=value setting (the IPC header / generic string form).
Keys mirror the CLI flags. Unknown keys error.
Sourcepub fn parse_kv_line(line: &str) -> Result<Self>
pub fn parse_kv_line(line: &str) -> Result<Self>
Parse a whole key=value key=value … line into settings.
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for TranscodeSettings
impl Clone for TranscodeSettings
Source§fn clone(&self) -> TranscodeSettings
fn clone(&self) -> TranscodeSettings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more