Struct mpeg_encoder::Encoder [] [src]

pub struct Encoder { /* fields omitted */ }

MPEG video recorder.

Methods

impl Encoder
[src]

[src]

Creates a new video recorder.

Arguments:

  • path - path to the output file.
  • width - width of the recorded video.
  • height - height of the recorded video.

[src]

Creates a new video recorder with custom recording parameters.

Arguments:

  • path - path to the output file.
  • width - width of the recorded video.
  • height - height of the recorded video.
  • bit_rate - the average bit rate. Default value: 400000.
  • time_base - this is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented. Default value: (1, 60), i-e, 60fps.
  • gop_size - the number of pictures in a group of pictures. Default value: 10.
  • max_b_frames - maximum number of B-frames between non-B-frames. Default value: 1.
  • pix_fmt - pixel format. Default value: AVPixelFormat::PIX_FMT_YUV420P.

[src]

Adds a image with a RGB pixel format to the video.

[src]

Adds a image with a RGBA pixel format to the video.

[src]

Initializes the recorder if needed.

This is automatically called when the first snapshot is made. Call this explicitly if you do not want the extra time overhead when the first snapshot is made.

Trait Implementations

impl Drop for Encoder
[src]

[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl !Send for Encoder

impl !Sync for Encoder