pub struct FusedEncoder<E> { /* private fields */ }Expand description
Makes every encoder error and cancellation terminal, including native validation errors that an unwrapped backend might otherwise permit retrying.
Unlike a decoder, an encoder has no reset operation: create a fresh session
after failure. Informational output_config remains available. If a backend
unwinds and the application catches the panic, later work calls still refuse.
Implementations§
Source§impl<E> FusedEncoder<E>
impl<E> FusedEncoder<E>
Sourcepub fn into_inner(self) -> E
pub fn into_inner(self) -> E
Recover the backend, explicitly leaving the fused contract.
Trait Implementations§
Source§impl<E: VideoEncoder> VideoEncoder for FusedEncoder<E>
impl<E: VideoEncoder> VideoEncoder for FusedEncoder<E>
Source§type Error = <E as VideoEncoder>::Error
type Error = <E as VideoEncoder>::Error
The implementation’s error.
Source§fn send(
&mut self,
frame: &Frame,
pulse: Option<&dyn Pulse>,
) -> Result<SendStatus, SessionError<E::Error>>
fn send( &mut self, frame: &Frame, pulse: Option<&dyn Pulse>, ) -> Result<SendStatus, SessionError<E::Error>>
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<E::Error>>
fn receive( &mut self, pulse: Option<&dyn Pulse>, ) -> Result<Receive<Packet>, SessionError<E::Error>>
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<E::Error>>
fn end_input(&mut self) -> Result<(), SessionError<E::Error>>
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 FusedEncoder<E>where
E: Freeze,
impl<E> RefUnwindSafe for FusedEncoder<E>where
E: RefUnwindSafe,
impl<E> Send for FusedEncoder<E>where
E: Send,
impl<E> Sync for FusedEncoder<E>where
E: Sync,
impl<E> Unpin for FusedEncoder<E>where
E: Unpin,
impl<E> UnsafeUnpin for FusedEncoder<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for FusedEncoder<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