Skip to main content

Packager

Trait Packager 

Source
pub trait Packager: Send {
    // Required methods
    fn push<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        frame: &'life1 MediaFrame,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn finish<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Available on crate feature hls only.
Expand description

Consumes a live frame stream and produces a packaged rendition.

Required Methods§

Source

fn push<'life0, 'life1, 'async_trait>( &'life0 mut self, frame: &'life1 MediaFrame, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Feed one frame; may finalize and emit a segment as a side effect.

Source

fn finish<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Flush the final segment and close the rendition.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§