pub trait StreamOutput: Send {
// Required methods
fn push_video(&mut self, frame: &VideoFrame) -> Result<(), StreamError>;
fn push_audio(&mut self, frame: &AudioFrame) -> Result<(), StreamError>;
fn finish(self: Box<Self>) -> Result<(), StreamError>;
}Expand description
Common interface for all live stream outputs.
Implementors: LiveHlsOutput,
LiveDashOutput,
RtmpOutput,
FanoutOutput.
Required Methods§
Sourcefn push_video(&mut self, frame: &VideoFrame) -> Result<(), StreamError>
fn push_video(&mut self, frame: &VideoFrame) -> Result<(), StreamError>
Push one video frame into the stream.
Sourcefn push_audio(&mut self, frame: &AudioFrame) -> Result<(), StreamError>
fn push_audio(&mut self, frame: &AudioFrame) -> Result<(), StreamError>
Push one audio frame into the stream.