Struct x264::Encoder

source ·
pub struct Encoder { /* private fields */ }
Expand description

Encodes video.

Implementations§

Creates a new builder with default options.

For more options see Setup::new.

Feeds a frame to the encoder.

Panics

Panics if there is a mismatch between the image and the encoder regarding width, height or colorspace.

Feeds a frame to the encoder.

Unsafety

The caller must ensure that the width, height and colorspace of the image are the same as that of the encoder.

Gets the video headers, which should be sent first.

Begins flushing the encoder, to handle any delayed frames.

let mut flush = encoder.flush();

while let Some(result) = flush.next() {
    if let Ok((data, picture)) = result {
        // Handle data.
    }
}

The width required of any input images.

The height required of any input images.

The encoding required of any input images.

Trait Implementations§

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.