Struct x264::Encoder [−][src]
pub struct Encoder { /* fields omitted */ }
Encodes video.
Methods
impl Encoder
[src]
impl Encoder
pub fn builder() -> Setup
[src]
pub fn builder() -> Setup
Creates a new builder with default options.
For more options see Setup::new
.
pub fn encode(&mut self, pts: i64, image: Image) -> Result<(Data, Picture)>
[src]
pub fn encode(&mut self, pts: i64, image: Image) -> Result<(Data, Picture)>
Feeds a frame to the encoder.
Panics
Panics if there is a mismatch between the image and the encoder regarding width, height or colorspace.
pub unsafe fn encode_unchecked(
&mut self,
pts: i64,
image: Image
) -> Result<(Data, Picture)>
[src]
pub unsafe fn encode_unchecked(
&mut self,
pts: i64,
image: Image
) -> Result<(Data, Picture)>
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.
pub fn headers(&mut self) -> Result<Data>
[src]
pub fn headers(&mut self) -> Result<Data>
Gets the video headers, which should be sent first.
pub fn flush(self) -> Flush
[src]
pub fn flush(self) -> Flush
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. } }
pub fn width(&self) -> i32
[src]
pub fn width(&self) -> i32
The width required of any input images.
pub fn height(&self) -> i32
[src]
pub fn height(&self) -> i32
The height required of any input images.
pub fn encoding(&self) -> Encoding
[src]
pub fn encoding(&self) -> Encoding
The encoding required of any input images.