Enum Backend
pub enum Backend {
Auto,
Hardware,
Software,
Named(&'static str),
}Expand description
A choice of encoder or decoder backend: a strategy, or one backend by name.
Converts into moq-video’s encode::Backend and decode::Backend. It
displays as the name it parses from.
§Examples
use moq_ext_sources::Backend;
assert_eq!(Backend::parse_encoder("hw"), Ok(Backend::Hardware));
let backend: moq_video::encode::Backend = Backend::Software.into();
assert_eq!(backend, moq_video::encode::Backend::Software);Variants§
Auto
Tries the hardware backends in turn, then software.
Hardware
Hardware only, with no fallback to software.
Software
Software only.
Named(&'static str)
Only the backend of this name, one of moq-video’s backend names.
Implementations§
§impl Backend
impl Backend
pub fn encoders() -> impl Iterator<Item = Backend>
pub fn encoders() -> impl Iterator<Item = Backend>
Returns every encoder choice: the strategies, then each encoder backend by name.
pub fn decoders() -> impl Iterator<Item = Backend>
pub fn decoders() -> impl Iterator<Item = Backend>
Returns every decoder choice: the strategies, then each decoder backend by name.
pub fn parse_encoder(value: &str) -> Result<Backend, UnknownBackend>
pub fn parse_encoder(value: &str) -> Result<Backend, UnknownBackend>
Parses an encoder choice, ignoring case.
Takes auto, hardware or hw, software or sw, or a name from
encode::NAMES.
§Errors
Fails for any other value, with a message that lists the names.
pub fn parse_decoder(value: &str) -> Result<Backend, UnknownBackend>
pub fn parse_decoder(value: &str) -> Result<Backend, UnknownBackend>
Parses a decoder choice, ignoring case.
Takes the strategies as parse_encoder does, or
a name from decode::NAMES.
§Errors
Fails for any other value, with a message that lists the names.
Trait Implementations§
impl Copy for Backend
impl Eq for Backend
impl StructuralPartialEq for Backend
Auto Trait Implementations§
impl Freeze for Backend
impl RefUnwindSafe for Backend
impl Send for Backend
impl Sync for Backend
impl Unpin for Backend
impl UnsafeUnpin for Backend
impl UnwindSafe for Backend
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
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.