#[non_exhaustive]pub enum Device {
Auto,
Render(PathBuf),
Video(PathBuf),
}Expand description
The hardware a decoder, encoder, or scaler opens.
Present on every platform and honoured by whichever backend opens. A Linux
hardware backend that drives another kind of device is passed over, so a
named node also steers automatic backend selection; software and a platform
API that picks its own device (VideoToolbox, Media Foundation, MediaCodec)
ignore it. A named device that fails to open is an error rather than a
search for another one: only Auto chooses. Whether software
may take over when no hardware opens is the Backend’s call, not this.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Auto
Let each backend pick its device.
Render(PathBuf)
A DRM render node, such as /dev/dri/renderD129: VA-API opens it, and
NVENC and NVDEC open the CUDA device behind it when an NVIDIA driver runs it.
Video(PathBuf)
A V4L2 memory-to-memory codec node, such as /dev/video11.
Trait Implementations§
impl Eq for Device
impl StructuralPartialEq for Device
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnsafeUnpin for Device
impl UnwindSafe for Device
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.