Struct Output

Source
pub struct Output<T: Send + Sync> { /* private fields */ }
Expand description

A struct that represents the output.

Implementations§

Source§

impl<T: Send + Sync> Output<T>

Source

pub fn into_inner(self) -> T

Consumes the Output and returns the inner data.

Source§

impl<T: Write + Send + Sync> Output<T>

Source

pub fn new(output: T, options: OutputOptions) -> Result<Self, FfmpegError>

Creates a new Output with the given output and options.

Source

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>

Source

pub fn set_metadata(&mut self, metadata: Dictionary)

Sets the metadata for the output.

Source

pub const fn as_ptr(&self) -> *const AVFormatContext

Returns the pointer to the underlying AVFormatContext.

Source

pub const fn as_mut_ptr(&mut self) -> *mut AVFormatContext

Returns the pointer to the underlying AVFormatContext.

Source

pub fn add_stream( &mut self, codec: Option<*const AVCodec>, ) -> Option<Stream<'_>>

Adds a new stream to the output.

Source

pub fn copy_stream<'a>( &'a mut self, stream: &Stream<'_>, ) -> Result<Option<Stream<'a>>, FfmpegError>

Copies a stream from the input to the output.

Source

pub fn write_header(&mut self) -> Result<(), FfmpegError>

Writes the header to the output.

Source

pub fn write_header_with_options( &mut self, options: &mut Dictionary, ) -> Result<(), FfmpegError>

Writes the header to the output with the given options.

Source

pub fn write_trailer(&mut self) -> Result<(), FfmpegError>

Writes the trailer to the output.

Source

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.

Source

pub fn write_packet(&mut self, packet: &Packet) -> Result<(), FfmpegError>

Writes the packet to the output. Without reordering the packets.

Source

pub const fn flags(&self) -> AVFmtFlags

Returns the flags for the output.

Source

pub const fn output_flags(&self) -> Option<AVFormatFlags>

Returns the flags for the output.

Source§

impl Output<()>

Source

pub fn open(path: &str) -> Result<Self, FfmpegError>

Opens the output with the given path.

Trait Implementations§

Source§

impl<T: Send + Sync> Send for Output<T>

Safety: T must be Send and Sync.

Auto Trait Implementations§

§

impl<T> Freeze for Output<T>

§

impl<T> RefUnwindSafe for Output<T>
where T: RefUnwindSafe,

§

impl<T> !Sync for Output<T>

§

impl<T> Unpin for Output<T>

§

impl<T> UnwindSafe for Output<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more