pub struct ToyEncoder { /* private fields */ }Expand description
Toy encoder: one gray picture per packet, lookahead frames held back,
a random-access point every keyint packets.
Implementations§
Trait Implementations§
Source§impl VideoEncoder for ToyEncoder
impl VideoEncoder for ToyEncoder
Source§fn send(
&mut self,
frame: &Frame,
stop: Option<&dyn Pulse>,
) -> Result<SendStatus, SessionError<ToyError>>
fn send( &mut self, frame: &Frame, stop: Option<&dyn Pulse>, ) -> Result<SendStatus, SessionError<ToyError>>
Offer a frame handle. The encoder clones it to queue (no pixel copy
is required by the contract; a backend may copy into padded planes).
Source§fn receive(
&mut self,
stop: Option<&dyn Pulse>,
) -> Result<Receive<Packet>, SessionError<ToyError>>
fn receive( &mut self, stop: Option<&dyn Pulse>, ) -> Result<Receive<Packet>, SessionError<ToyError>>
One packet at a time, in decode order, carrying the presentation
timestamp of the frame it shows.
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 output_config(&self) -> Option<&CodecConfig>
fn output_config(&self) -> Option<&CodecConfig>
Codec configuration a muxer needs before the first packet.
Source§fn output_fidelity(&self) -> Option<Fidelity>
fn output_fidelity(&self) -> Option<Fidelity>
Fidelity guaranteed by this actual prepared encoder for every accepted
input frame. None means unqualified, not lossy or lossless. A guarantee
must not be inferred from codec identity or an unvalidated request.
This describes encoding only; preceding conversion may lose samples.
Fixed-configuration operations bind this value with output_config and
reject a later change before publishing staged output.
Auto Trait Implementations§
impl !RefUnwindSafe for ToyEncoder
impl !UnwindSafe for ToyEncoder
impl Freeze for ToyEncoder
impl Send for ToyEncoder
impl Sync for ToyEncoder
impl Unpin for ToyEncoder
impl UnsafeUnpin for ToyEncoder
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