pub struct DecodeCapabilities {
pub backend_available: bool,
pub hardware_decode_available: bool,
pub known_decoder_names: Vec<String>,
}Expand description
Lightweight capability information about the decode backend.
Obtained via discover_decode_capabilities(). This is a snapshot; the
underlying system state may change after construction (e.g., a GPU driver
crash).
§Examples
use nv_media::DecodeCapabilities;
let caps = nv_media::discover_decode_capabilities();
if !caps.backend_available {
eprintln!("Media backend not compiled in or failed to initialise");
} else if caps.hardware_decode_available {
println!("Hardware decoders: {:?}", caps.known_decoder_names);
}Fields§
§backend_available: boolWhether the media backend is compiled in and initialized successfully.
When false, the remaining fields are meaningless — the backend
is absent or failed to initialize. Operators can use this to
distinguish a misbuild/misconfiguration from a genuine
no-hardware condition (backend_available == true but
hardware_decode_available == false).
hardware_decode_available: boolWhether at least one hardware video decoder was detected in the
backend registry. Only meaningful when backend_available is true.
known_decoder_names: Vec<String>Names of known hardware video decoder elements discovered in the
backend registry. Empty when hardware_decode_available is false
or the backend is not compiled in.
Trait Implementations§
Source§impl Clone for DecodeCapabilities
impl Clone for DecodeCapabilities
Source§fn clone(&self) -> DecodeCapabilities
fn clone(&self) -> DecodeCapabilities
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DecodeCapabilities
impl RefUnwindSafe for DecodeCapabilities
impl Send for DecodeCapabilities
impl Sync for DecodeCapabilities
impl Unpin for DecodeCapabilities
impl UnsafeUnpin for DecodeCapabilities
impl UnwindSafe for DecodeCapabilities
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