pub struct HwAccelDevice {
pub kind: HwKind,
pub driver: Option<String>,
pub render_node: Option<PathBuf>,
pub supported_codecs: Vec<String>,
pub max_width: u32,
pub max_height: u32,
pub supports_hdr: bool,
}Expand description
A single hardware-accelerated device discovered during platform probing.
Codec names follow the OxiMedia convention ("h264", "hevc", "av1",
"vp9", "vp8", "mjpeg"). Note that OxiMedia’s Green-List-only
CodecId does not include H.264/HEVC;
those names appear here because VideoToolbox and VAAPI do in fact support
them on the underlying OS hardware — they are reported verbatim so callers
can decide whether to use them via FFmpeg compat or platform APIs.
Fields§
§kind: HwKindBackend kind (VideoToolbox, VAAPI, …).
driver: Option<String>Kernel-level driver name, if detectable (e.g., "i915", "amdgpu").
render_node: Option<PathBuf>DRI render node path (Linux only, e.g., /dev/dri/renderD128).
supported_codecs: Vec<String>Codec names supported by this device.
max_width: u32Maximum encode/decode width in pixels.
max_height: u32Maximum encode/decode height in pixels.
supports_hdr: boolWhether HDR (10-bit, PQ/HLG) is supported.
Implementations§
Source§impl HwAccelDevice
impl HwAccelDevice
Sourcepub fn supports_codec(&self, codec: &str) -> bool
pub fn supports_codec(&self, codec: &str) -> bool
Returns true if this device advertises support for codec.
Comparison is case-insensitive.
Trait Implementations§
Source§impl Clone for HwAccelDevice
impl Clone for HwAccelDevice
Source§fn clone(&self) -> HwAccelDevice
fn clone(&self) -> HwAccelDevice
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for HwAccelDevice
impl RefUnwindSafe for HwAccelDevice
impl Send for HwAccelDevice
impl Sync for HwAccelDevice
impl Unpin for HwAccelDevice
impl UnsafeUnpin for HwAccelDevice
impl UnwindSafe for HwAccelDevice
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