pub struct Output<T: Send + Sync> { /* private fields */ }
Expand description
A struct that represents the output.
Implementations§
Source§impl<T: Send + Sync> Output<T>
impl<T: Send + Sync> Output<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes the Output
and returns the inner data.
Source§impl<T: Write + Send + Sync> Output<T>
impl<T: Write + Send + Sync> Output<T>
Sourcepub fn new(output: T, options: OutputOptions) -> Result<Self, FfmpegError>
pub fn new(output: T, options: OutputOptions) -> Result<Self, FfmpegError>
Creates a new Output
with the given output and options.
Sourcepub fn seekable(output: T, options: OutputOptions) -> Result<Self, FfmpegError>where
T: Seek,
pub fn seekable(output: T, options: OutputOptions) -> Result<Self, FfmpegError>where
T: Seek,
Creates a new Output
with the given output and options. The output must be seekable.
Source§impl<T: Send + Sync> Output<T>
impl<T: Send + Sync> Output<T>
Sourcepub fn set_metadata(&mut self, metadata: Dictionary)
pub fn set_metadata(&mut self, metadata: Dictionary)
Sets the metadata for the output.
Sourcepub const fn as_ptr(&self) -> *const AVFormatContext
pub const fn as_ptr(&self) -> *const AVFormatContext
Returns the pointer to the underlying AVFormatContext.
Sourcepub const fn as_mut_ptr(&mut self) -> *mut AVFormatContext
pub const fn as_mut_ptr(&mut self) -> *mut AVFormatContext
Returns the pointer to the underlying AVFormatContext.
Sourcepub fn add_stream(
&mut self,
codec: Option<*const AVCodec>,
) -> Option<Stream<'_>>
pub fn add_stream( &mut self, codec: Option<*const AVCodec>, ) -> Option<Stream<'_>>
Adds a new stream to the output.
Sourcepub fn copy_stream<'a>(
&'a mut self,
stream: &Stream<'_>,
) -> Result<Option<Stream<'a>>, FfmpegError>
pub fn copy_stream<'a>( &'a mut self, stream: &Stream<'_>, ) -> Result<Option<Stream<'a>>, FfmpegError>
Copies a stream from the input to the output.
Sourcepub fn write_header(&mut self) -> Result<(), FfmpegError>
pub fn write_header(&mut self) -> Result<(), FfmpegError>
Writes the header to the output.
Sourcepub fn write_header_with_options(
&mut self,
options: &mut Dictionary,
) -> Result<(), FfmpegError>
pub fn write_header_with_options( &mut self, options: &mut Dictionary, ) -> Result<(), FfmpegError>
Writes the header to the output with the given options.
Sourcepub fn write_trailer(&mut self) -> Result<(), FfmpegError>
pub fn write_trailer(&mut self) -> Result<(), FfmpegError>
Writes the trailer to the output.
Sourcepub fn write_interleaved_packet(
&mut self,
packet: Packet,
) -> Result<(), FfmpegError>
pub fn write_interleaved_packet( &mut self, packet: Packet, ) -> Result<(), FfmpegError>
Writes the interleaved packet to the output.
The difference between this and write_packet
is that this function
writes the packet to the output and reorders the packets based on the
dts and pts.
Sourcepub fn write_packet(&mut self, packet: &Packet) -> Result<(), FfmpegError>
pub fn write_packet(&mut self, packet: &Packet) -> Result<(), FfmpegError>
Writes the packet to the output. Without reordering the packets.
Sourcepub const fn flags(&self) -> AVFmtFlags
pub const fn flags(&self) -> AVFmtFlags
Returns the flags for the output.
Sourcepub const fn output_flags(&self) -> Option<AVFormatFlags>
pub const fn output_flags(&self) -> Option<AVFormatFlags>
Returns the flags for the output.