pub struct ToyDecoder { /* private fields */ }Expand description
Toy decoder. Pictures come out one packet late (a one-packet reorder),
so output trails input; a show-existing flag re-presents the previous
picture. Holds at most max_queued_frames before pushing back.
Implementations§
Trait Implementations§
Source§impl VideoDecoder for ToyDecoder
impl VideoDecoder for ToyDecoder
Source§fn configure(
&mut self,
config: &CodecConfig,
stop: Option<&dyn Pulse>,
) -> Result<(), SessionError<ToyError>>
fn configure( &mut self, config: &CodecConfig, stop: Option<&dyn Pulse>, ) -> Result<(), SessionError<ToyError>>
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,
stop: Option<&dyn Pulse>,
) -> Result<SendStatus, SessionError<ToyError>>
fn send( &mut self, packet: &mut Packet, stop: Option<&dyn Pulse>, ) -> Result<SendStatus, SessionError<ToyError>>
Offer one packet.
Accepted takes its payload; ReceivePending
leaves it intact for retry after receive.Source§fn receive(
&mut self,
stop: Option<&dyn Pulse>,
) -> Result<Receive<Frame>, SessionError<ToyError>>
fn receive( &mut self, stop: Option<&dyn Pulse>, ) -> Result<Receive<Frame>, SessionError<ToyError>>
One frame at a time, in presentation order.
Source§fn end_input(&mut self) -> Result<(), SessionError<ToyError>>
fn end_input(&mut self) -> Result<(), SessionError<ToyError>>
Declare end of input; idempotent. Then
receive until EndOfStream.Source§fn reset(&mut self) -> Result<(), SessionError<ToyError>>
fn reset(&mut self) -> Result<(), SessionError<ToyError>>
Discard queued input, output and references; keep configuration.
Frames already returned stay valid.
Source§fn stream_info(&self) -> Option<&VideoStreamInfo>
fn stream_info(&self) -> Option<&VideoStreamInfo>
Facts about the stream seen so far.
Auto Trait Implementations§
impl !RefUnwindSafe for ToyDecoder
impl !UnwindSafe for ToyDecoder
impl Freeze for ToyDecoder
impl Send for ToyDecoder
impl Sync for ToyDecoder
impl Unpin for ToyDecoder
impl UnsafeUnpin for ToyDecoder
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