Skip to main content

FusedDecoder

Struct FusedDecoder 

Source
pub struct FusedDecoder<D> { /* private fields */ }
Expand description

Makes errors and cancellation terminal for any decoder, as Fused does for IncrementalDecode. A successful reset reopens the session.

Implementations§

Source§

impl<D> FusedDecoder<D>

Source

pub const fn new(inner: D) -> Self

Wrap inner.

Source

pub fn into_inner(self) -> D

The wrapped decoder.

Trait Implementations§

Source§

impl<D: VideoDecoder> VideoDecoder for FusedDecoder<D>

Source§

type Error = <D as VideoDecoder>::Error

The implementation’s error.
Source§

fn configure( &mut self, config: &CodecConfig, pulse: Option<&dyn Pulse>, ) -> Result<(), SessionError<D::Error>>

Start a configuration epoch. Called before the first send and on every epoch change (new sequence header, new stsd entry).
Source§

fn send( &mut self, packet: &mut Packet, pulse: Option<&dyn Pulse>, ) -> Result<SendStatus, SessionError<D::Error>>

Offer one packet. Accepted takes its payload; ReceivePending leaves it intact for retry after receive.
Source§

fn receive( &mut self, pulse: Option<&dyn Pulse>, ) -> Result<Receive<Frame>, SessionError<D::Error>>

One frame at a time, in presentation order.
Source§

fn end_input(&mut self) -> Result<(), SessionError<D::Error>>

Declare end of input; idempotent. Then receive until EndOfStream.
Source§

fn reset(&mut self) -> Result<(), SessionError<D::Error>>

Discard queued input, output and references; keep configuration. Frames already returned stay valid.
Source§

fn stream_info(&self) -> Option<&VideoStreamInfo>

Facts about the stream seen so far.

Auto Trait Implementations§

§

impl<D> Freeze for FusedDecoder<D>
where D: Freeze,

§

impl<D> RefUnwindSafe for FusedDecoder<D>
where D: RefUnwindSafe,

§

impl<D> Send for FusedDecoder<D>
where D: Send,

§

impl<D> Sync for FusedDecoder<D>
where D: Sync,

§

impl<D> Unpin for FusedDecoder<D>
where D: Unpin,

§

impl<D> UnsafeUnpin for FusedDecoder<D>
where D: UnsafeUnpin,

§

impl<D> UnwindSafe for FusedDecoder<D>
where D: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.