pub struct Decoder { /* private fields */ }Available on crate feature
decode only.Expand description
A video decoder on whichever Backend suits the platform.
Implementations§
Source§impl Decoder
impl Decoder
Sourcepub fn new(track: &VideoTrack) -> Result<Self, String>
pub fn new(track: &VideoTrack) -> Result<Self, String>
The first hardware backend available that takes
track, or the native decoder when none does.
Sourcepub fn from_config(
codec: TrackCodec,
config: &[u8],
width: u32,
height: u32,
timescale: u32,
) -> Result<Self, String>
pub fn from_config( codec: TrackCodec, config: &[u8], width: u32, height: u32, timescale: u32, ) -> Result<Self, String>
Sourcepub fn with_backend(
track: &VideoTrack,
backend: Backend,
) -> Result<Self, String>
pub fn with_backend( track: &VideoTrack, backend: Backend, ) -> Result<Self, String>
Exactly backend, without falling back: an error when this build does
not have it or it will not take the stream.
Sourcepub fn size(&self) -> (u32, u32)
pub fn size(&self) -> (u32, u32)
Size of the pictures, as the stream’s configuration states it.
Auto Trait Implementations§
impl !RefUnwindSafe for Decoder
impl !Send for Decoder
impl !Sync for Decoder
impl !UnwindSafe for Decoder
impl Freeze for Decoder
impl Unpin for Decoder
impl UnsafeUnpin for Decoder
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> 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