pub struct VideoEncoderShim<E>(pub E);Expand description
Erases an encoder’s error type.
Tuple Fields§
§0: ETrait Implementations§
Source§impl<E: VideoEncoder> VideoEncoder for VideoEncoderShim<E>
impl<E: VideoEncoder> VideoEncoder for VideoEncoderShim<E>
Source§type Error = ErasedError
type Error = ErasedError
The implementation’s error.
Source§fn send(
&mut self,
frame: &Frame,
pulse: Option<&dyn Pulse>,
) -> Result<SendStatus, SessionError<ErasedError>>
fn send( &mut self, frame: &Frame, pulse: Option<&dyn Pulse>, ) -> Result<SendStatus, SessionError<ErasedError>>
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,
pulse: Option<&dyn Pulse>,
) -> Result<Receive<Packet>, SessionError<ErasedError>>
fn receive( &mut self, pulse: Option<&dyn Pulse>, ) -> Result<Receive<Packet>, SessionError<ErasedError>>
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<ErasedError>>
fn end_input(&mut self) -> Result<(), SessionError<ErasedError>>
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<E> Freeze for VideoEncoderShim<E>where
E: Freeze,
impl<E> RefUnwindSafe for VideoEncoderShim<E>where
E: RefUnwindSafe,
impl<E> Send for VideoEncoderShim<E>where
E: Send,
impl<E> Sync for VideoEncoderShim<E>where
E: Sync,
impl<E> Unpin for VideoEncoderShim<E>where
E: Unpin,
impl<E> UnsafeUnpin for VideoEncoderShim<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for VideoEncoderShim<E>where
E: UnwindSafe,
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