Skip to main content

VideoEncoderShim

Struct VideoEncoderShim 

Source
pub struct VideoEncoderShim<E>(pub E);
Expand description

Erases an encoder’s error type.

Tuple Fields§

§0: E

Trait Implementations§

Source§

impl<E: VideoEncoder> VideoEncoder for VideoEncoderShim<E>

Source§

type Error = ErasedError

The implementation’s error.
Source§

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>>

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>>

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

fn output_config(&self) -> Option<&CodecConfig>

Codec configuration a muxer needs before the first packet.
Source§

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> 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.