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 moreSource§impl Debug for DecodePreference
impl Debug for DecodePreference
Source§impl Default for DecodePreference
impl Default for DecodePreference
Source§fn default() -> DecodePreference
fn default() -> DecodePreference
Source§impl Display for DecodePreference
impl Display for DecodePreference
Source§impl Hash for DecodePreference
impl Hash for DecodePreference
Source§impl PartialEq for DecodePreference
impl PartialEq for DecodePreference
impl Copy for DecodePreference
impl Eq for DecodePreference
impl StructuralPartialEq for DecodePreference
Auto Trait Implementations§
impl Freeze for DecodePreference
impl RefUnwindSafe for DecodePreference
impl Send for DecodePreference
impl Sync for DecodePreference
impl Unpin for DecodePreference
impl UnsafeUnpin for DecodePreference
impl UnwindSafe for DecodePreference
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more