pub enum DecodePreference {
Auto,
CpuOnly,
PreferHardware,
RequireHardware,
}Expand description
User-facing decode preference for a feed.
Controls which decoder strategy the media backend uses when constructing
the decode pipeline. The default is Auto, which preserves
the backend’s existing selection heuristic.
This type is backend-neutral — it does not expose GStreamer element names, GPU memory modes, or inference-framework details.
| Variant | Behavior |
|---|---|
Auto | Backend picks the best available decoder (default). |
CpuOnly | Force software decoding — never use a hardware decoder. |
PreferHardware | Try hardware first; fall back to software silently. |
RequireHardware | Demand hardware decoding; fail-fast if unavailable. |
Variants§
Auto
Automatically select the best decoder: prefer hardware, fall back to software. This is the current default behavior preserved exactly.
CpuOnly
Force software decoding. The backend must never attempt a hardware decoder. Useful in environments without GPU access or where deterministic CPU-only behaviour is required.
PreferHardware
Prefer hardware decoding, but fall back to software silently if no hardware decoder is available. No error is raised on fallback.
RequireHardware
Require hardware decoding. If no hardware decoder is available, the
backend must fail-fast with a MediaError
instead of silently falling back to software.
Trait Implementations§
Source§impl Clone for DecodePreference
impl Clone for DecodePreference
Source§fn clone(&self) -> DecodePreference
fn clone(&self) -> DecodePreference
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more