pub trait Muxer: Send {
// Required methods
fn write_header(&mut self, streams: &[Stream]) -> Result<()>;
fn write_packet(&mut self, packet: &Packet) -> Result<()>;
fn write_trailer(&mut self) -> Result<()>;
// Provided method
fn set_metadata(&mut self, _metadata: &Dictionary) { ... }
}Expand description
Writes a container format: declare streams, write packets, finalize.
Required Methods§
Sourcefn write_header(&mut self, streams: &[Stream]) -> Result<()>
fn write_header(&mut self, streams: &[Stream]) -> Result<()>
Write the container header for the given set of streams.
Sourcefn write_packet(&mut self, packet: &Packet) -> Result<()>
fn write_packet(&mut self, packet: &Packet) -> Result<()>
Write one packet (its stream_index selects the target stream).
Sourcefn write_trailer(&mut self) -> Result<()>
fn write_trailer(&mut self) -> Result<()>
Finalize the container (indexes, trailers, fixups).
Provided Methods§
Sourcefn set_metadata(&mut self, _metadata: &Dictionary)
fn set_metadata(&mut self, _metadata: &Dictionary)
Hand the muxer output metadata (-metadata title=...). Called before
write_header; formats without a metadata slot
simply ignore it (the default).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".