pub trait Muxer: Send {
fn configure(&mut self) -> Result<()>;
fn write_header<WO: WriteOwned, WS: WriteSeek>(
&mut self,
out: &mut Writer<WO, WS>
) -> Result<()>;
fn write_packet<WO: WriteOwned, WS: WriteSeek>(
&mut self,
out: &mut Writer<WO, WS>,
pkt: Arc<Packet>
) -> Result<()>;
fn write_trailer<WO: WriteOwned, WS: WriteSeek>(
&mut self,
out: &mut Writer<WO, WS>
) -> Result<()>;
fn set_global_info(&mut self, info: GlobalInfo) -> Result<()>;
fn set_option<'a>(&mut self, key: &str, val: Value<'a>) -> Result<()>;
}
Expand description
Used to implement muxing operations.
Required Methods
fn write_header<WO: WriteOwned, WS: WriteSeek>(
&mut self,
out: &mut Writer<WO, WS>
) -> Result<()>
fn write_header<WO: WriteOwned, WS: WriteSeek>(
&mut self,
out: &mut Writer<WO, WS>
) -> Result<()>
Writes a stream header into a data structure implementing
the Write
trait.
fn write_packet<WO: WriteOwned, WS: WriteSeek>(
&mut self,
out: &mut Writer<WO, WS>,
pkt: Arc<Packet>
) -> Result<()>
fn write_packet<WO: WriteOwned, WS: WriteSeek>(
&mut self,
out: &mut Writer<WO, WS>,
pkt: Arc<Packet>
) -> Result<()>
Writes a stream packet into a data structure implementing
the Write
trait.
fn write_trailer<WO: WriteOwned, WS: WriteSeek>(
&mut self,
out: &mut Writer<WO, WS>
) -> Result<()>
fn write_trailer<WO: WriteOwned, WS: WriteSeek>(
&mut self,
out: &mut Writer<WO, WS>
) -> Result<()>
Writes a stream trailer into a data structure implementing
the Write
trait.
fn set_global_info(&mut self, info: GlobalInfo) -> Result<()>
fn set_global_info(&mut self, info: GlobalInfo) -> Result<()>
Sets global media file information for a muxer.