pub enum DecodeHardwareAcceleration {
Auto,
PreferSoftware,
PreferHardware,
}
Expand description
How the video should be decoded.
Depending on the decoder backend, these settings are merely hints and may be ignored. However, they can be useful in some situations to work around issues.
On the web this directly corresponds to https://www.w3.org/TR/webcodecs/#hardware-acceleration
Variants§
Auto
May use hardware acceleration if available and compatible with the codec.
PreferSoftware
Should use a software decoder even if hardware acceleration is available.
If no software decoder is present, this may cause decoding to fail.
PreferHardware
Should use a hardware decoder.
If no hardware decoder is present, this may cause decoding to fail.
Trait Implementations§
source§impl Clone for DecodeHardwareAcceleration
impl Clone for DecodeHardwareAcceleration
source§fn clone(&self) -> DecodeHardwareAcceleration
fn clone(&self) -> DecodeHardwareAcceleration
Returns a copy 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 DecodeHardwareAcceleration
impl Debug for DecodeHardwareAcceleration
source§impl Default for DecodeHardwareAcceleration
impl Default for DecodeHardwareAcceleration
source§fn default() -> DecodeHardwareAcceleration
fn default() -> DecodeHardwareAcceleration
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for DecodeHardwareAcceleration
impl<'de> Deserialize<'de> for DecodeHardwareAcceleration
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for DecodeHardwareAcceleration
impl Display for DecodeHardwareAcceleration
source§impl FromStr for DecodeHardwareAcceleration
impl FromStr for DecodeHardwareAcceleration
source§impl Hash for DecodeHardwareAcceleration
impl Hash for DecodeHardwareAcceleration
source§impl PartialEq for DecodeHardwareAcceleration
impl PartialEq for DecodeHardwareAcceleration
source§fn eq(&self, other: &DecodeHardwareAcceleration) -> bool
fn eq(&self, other: &DecodeHardwareAcceleration) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for DecodeHardwareAcceleration
impl Eq for DecodeHardwareAcceleration
impl StructuralPartialEq for DecodeHardwareAcceleration
Auto Trait Implementations§
impl Freeze for DecodeHardwareAcceleration
impl RefUnwindSafe for DecodeHardwareAcceleration
impl Send for DecodeHardwareAcceleration
impl Sync for DecodeHardwareAcceleration
impl Unpin for DecodeHardwareAcceleration
impl UnwindSafe for DecodeHardwareAcceleration
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.