#[non_exhaustive]pub enum Backend {
VideoToolbox,
Nvdec,
Vaapi,
Native,
}Available on crate feature
decode only.Expand description
Which decoder a Decoder is using.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
VideoToolbox
Apple’s, in hardware where the machine has it. macOS with the
videotoolbox feature.
Nvdec
An NVIDIA GPU’s NVDEC engine. Linux and Windows with the nvidia
feature, on a machine with the driver.
Vaapi
A VA driver (AMD, Intel, …). Linux with the vaapi feature, on a
machine with libva and a driver for the GPU.
Native
NativeDecoder: pure Rust, every platform.
Implementations§
Source§impl Backend
impl Backend
Sourcepub const HARDWARE: [Backend; 3]
pub const HARDWARE: [Backend; 3]
The hardware backends, in the order Decoder::new tries them.
Sourcepub fn available(self) -> bool
pub fn available(self) -> bool
Whether this build, on this machine, can decode with self. For
NVDEC that means loading the driver, which happens once.
Sourcepub fn preferred() -> Backend
pub fn preferred() -> Backend
The backend Decoder::new tries first.
Trait Implementations§
impl Copy for Backend
impl Eq for Backend
impl StructuralPartialEq for Backend
Auto Trait Implementations§
impl Freeze for Backend
impl RefUnwindSafe for Backend
impl Send for Backend
impl Sync for Backend
impl Unpin for Backend
impl UnsafeUnpin for Backend
impl UnwindSafe for Backend
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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