pub struct Encoder { /* private fields */ }
Expand description
Represents an encoder.
Implementations§
Source§impl Encoder
impl Encoder
Sourcepub fn new<T: Send + Sync>(
codec: EncoderCodec,
output: &mut Output<T>,
incoming_time_base: impl Into<Rational>,
outgoing_time_base: impl Into<Rational>,
settings: impl Into<EncoderSettings>,
) -> Result<Self, FfmpegError>
pub fn new<T: Send + Sync>( codec: EncoderCodec, output: &mut Output<T>, incoming_time_base: impl Into<Rational>, outgoing_time_base: impl Into<Rational>, settings: impl Into<EncoderSettings>, ) -> Result<Self, FfmpegError>
Creates a new encoder.
Sourcepub fn send_eof(&mut self) -> Result<(), FfmpegError>
pub fn send_eof(&mut self) -> Result<(), FfmpegError>
Sends an EOF frame to the encoder.
Sourcepub fn send_frame(&mut self, frame: &GenericFrame) -> Result<(), FfmpegError>
pub fn send_frame(&mut self, frame: &GenericFrame) -> Result<(), FfmpegError>
Sends a frame to the encoder.
Sourcepub fn receive_packet(&mut self) -> Result<Option<Packet>, FfmpegError>
pub fn receive_packet(&mut self) -> Result<Option<Packet>, FfmpegError>
Receives a packet from the encoder.
Sourcepub const fn stream_index(&self) -> i32
pub const fn stream_index(&self) -> i32
Returns the stream index of the encoder.
Sourcepub const fn incoming_time_base(&self) -> Rational
pub const fn incoming_time_base(&self) -> Rational
Returns the incoming time base of the encoder.
Sourcepub const fn outgoing_time_base(&self) -> Rational
pub const fn outgoing_time_base(&self) -> Rational
Returns the outgoing time base of the encoder.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Encoder
impl RefUnwindSafe for Encoder
impl !Sync for Encoder
impl Unpin for Encoder
impl UnwindSafe for Encoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more