pub struct HwAccelSelector;Expand description
Selects the best available hardware backend for a given task.
Implementations§
Source§impl HwAccelSelector
impl HwAccelSelector
Sourcepub fn select_best(
available: &[HwAccelCaps],
codec: &str,
resolution: (u32, u32),
) -> Option<HwAccelConfig>
pub fn select_best( available: &[HwAccelCaps], codec: &str, resolution: (u32, u32), ) -> Option<HwAccelConfig>
Selects the best backend from available that supports codec at
resolution.
Selection criterion: highest max_sessions among qualifying backends
that can encode and support the requested codec and resolution.
Returns None if no suitable backend is found.
Sourcepub fn select_best_or_software(
available: &[HwAccelCaps],
codec: &str,
resolution: (u32, u32),
) -> HwAccelConfig
pub fn select_best_or_software( available: &[HwAccelCaps], codec: &str, resolution: (u32, u32), ) -> HwAccelConfig
Selects the best backend or falls back to software.
Trait Implementations§
Source§impl Clone for HwAccelSelector
impl Clone for HwAccelSelector
Source§fn clone(&self) -> HwAccelSelector
fn clone(&self) -> HwAccelSelector
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HwAccelSelector
impl Debug for HwAccelSelector
Source§impl Default for HwAccelSelector
impl Default for HwAccelSelector
Source§fn default() -> HwAccelSelector
fn default() -> HwAccelSelector
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HwAccelSelector
impl RefUnwindSafe for HwAccelSelector
impl Send for HwAccelSelector
impl Sync for HwAccelSelector
impl Unpin for HwAccelSelector
impl UnsafeUnpin for HwAccelSelector
impl UnwindSafe for HwAccelSelector
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> 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>
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