pub struct Context<M: Muxer + Send, WO: WriteOwned, WS: WriteSeek> {
pub user_private: Option<Box<dyn Any + Send + Sync>>,
/* private fields */
}
Expand description
Auxiliary structure to encapsulate a muxer object and its additional data.
Fields
user_private: Option<Box<dyn Any + Send + Sync>>
User private data.
This data cannot be cloned.
Implementations
sourceimpl<M: Muxer + Send, WO: WriteOwned, WS: WriteSeek> Context<M, WO, WS>
impl<M: Muxer + Send, WO: WriteOwned, WS: WriteSeek> Context<M, WO, WS>
sourcepub fn write_header(&mut self) -> Result<()>
pub fn write_header(&mut self) -> Result<()>
Writes a stream header to an internal buffer and returns how many bytes were written or an error.
sourcepub fn write_packet(&mut self, pkt: Arc<Packet>) -> Result<()>
pub fn write_packet(&mut self, pkt: Arc<Packet>) -> Result<()>
Writes a stream packet to an internal buffer and returns how many bytes were written or an error.
sourcepub fn write_trailer(&mut self) -> Result<()>
pub fn write_trailer(&mut self) -> Result<()>
Writes a stream trailer to an internal buffer and returns how many bytes were written or an error.
sourcepub fn set_global_info(&mut self, info: GlobalInfo) -> Result<()>
pub fn set_global_info(&mut self, info: GlobalInfo) -> Result<()>
Sets global media file information for a muxer.
Auto Trait Implementations
impl<M, WO, WS> !RefUnwindSafe for Context<M, WO, WS>
impl<M, WO, WS> Send for Context<M, WO, WS> where
WO: Send,
WS: Send,
impl<M, WO, WS> Sync for Context<M, WO, WS> where
M: Sync,
WO: Sync,
WS: Sync,
impl<M, WO, WS> Unpin for Context<M, WO, WS> where
M: Unpin,
WO: Unpin,
WS: Unpin,
impl<M, WO, WS> !UnwindSafe for Context<M, WO, WS>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more