Struct VideoEncoderSettingsBuilder

Source
pub struct VideoEncoderSettingsBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> VideoEncoderSettingsBuilder<S>

Source

pub fn build(self) -> VideoEncoderSettings
where S: IsComplete,

Finish building and return the requested object

Source

pub fn width(self, value: i32) -> VideoEncoderSettingsBuilder<SetWidth<S>>
where S::Width: IsUnset,

Required.

Source

pub fn height(self, value: i32) -> VideoEncoderSettingsBuilder<SetHeight<S>>
where S::Height: IsUnset,

Required.

Source

pub fn frame_rate( self, value: Rational, ) -> VideoEncoderSettingsBuilder<SetFrameRate<S>>
where S::FrameRate: IsUnset,

Required.

Source

pub fn pixel_format( self, value: AVPixelFormat, ) -> VideoEncoderSettingsBuilder<SetPixelFormat<S>>
where S::PixelFormat: IsUnset,

Required.

Source

pub fn gop_size(self, value: i32) -> VideoEncoderSettingsBuilder<SetGopSize<S>>
where S::GopSize: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_gop_size( self, value: Option<i32>, ) -> VideoEncoderSettingsBuilder<SetGopSize<S>>
where S::GopSize: IsUnset,

Optional (Some / Option setters).

Source

pub fn qmax(self, value: i32) -> VideoEncoderSettingsBuilder<SetQmax<S>>
where S::Qmax: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_qmax( self, value: Option<i32>, ) -> VideoEncoderSettingsBuilder<SetQmax<S>>
where S::Qmax: IsUnset,

Optional (Some / Option setters).

Source

pub fn qmin(self, value: i32) -> VideoEncoderSettingsBuilder<SetQmin<S>>
where S::Qmin: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_qmin( self, value: Option<i32>, ) -> VideoEncoderSettingsBuilder<SetQmin<S>>
where S::Qmin: IsUnset,

Optional (Some / Option setters).

Source

pub fn thread_count( self, value: i32, ) -> VideoEncoderSettingsBuilder<SetThreadCount<S>>
where S::ThreadCount: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_thread_count( self, value: Option<i32>, ) -> VideoEncoderSettingsBuilder<SetThreadCount<S>>
where S::ThreadCount: IsUnset,

Optional (Some / Option setters).

Source

pub fn thread_type( self, value: i32, ) -> VideoEncoderSettingsBuilder<SetThreadType<S>>
where S::ThreadType: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_thread_type( self, value: Option<i32>, ) -> VideoEncoderSettingsBuilder<SetThreadType<S>>
where S::ThreadType: IsUnset,

Optional (Some / Option setters).

Source

pub fn sample_aspect_ratio( self, value: Rational, ) -> VideoEncoderSettingsBuilder<SetSampleAspectRatio<S>>
where S::SampleAspectRatio: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_sample_aspect_ratio( self, value: Option<Rational>, ) -> VideoEncoderSettingsBuilder<SetSampleAspectRatio<S>>
where S::SampleAspectRatio: IsUnset,

Optional (Some / Option setters).

Source

pub fn bitrate(self, value: i64) -> VideoEncoderSettingsBuilder<SetBitrate<S>>
where S::Bitrate: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_bitrate( self, value: Option<i64>, ) -> VideoEncoderSettingsBuilder<SetBitrate<S>>
where S::Bitrate: IsUnset,

Optional (Some / Option setters).

Source

pub fn rc_min_rate( self, value: i64, ) -> VideoEncoderSettingsBuilder<SetRcMinRate<S>>
where S::RcMinRate: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_rc_min_rate( self, value: Option<i64>, ) -> VideoEncoderSettingsBuilder<SetRcMinRate<S>>
where S::RcMinRate: IsUnset,

Optional (Some / Option setters).

Source

pub fn rc_max_rate( self, value: i64, ) -> VideoEncoderSettingsBuilder<SetRcMaxRate<S>>
where S::RcMaxRate: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_rc_max_rate( self, value: Option<i64>, ) -> VideoEncoderSettingsBuilder<SetRcMaxRate<S>>
where S::RcMaxRate: IsUnset,

Optional (Some / Option setters).

Source

pub fn rc_buffer_size( self, value: i32, ) -> VideoEncoderSettingsBuilder<SetRcBufferSize<S>>
where S::RcBufferSize: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_rc_buffer_size( self, value: Option<i32>, ) -> VideoEncoderSettingsBuilder<SetRcBufferSize<S>>
where S::RcBufferSize: IsUnset,

Optional (Some / Option setters).

Source

pub fn max_b_frames( self, value: i32, ) -> VideoEncoderSettingsBuilder<SetMaxBFrames<S>>
where S::MaxBFrames: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_max_b_frames( self, value: Option<i32>, ) -> VideoEncoderSettingsBuilder<SetMaxBFrames<S>>
where S::MaxBFrames: IsUnset,

Optional (Some / Option setters).

Source

pub fn codec_specific_options( self, value: Dictionary, ) -> VideoEncoderSettingsBuilder<SetCodecSpecificOptions<S>>
where S::CodecSpecificOptions: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_codec_specific_options( self, value: Option<Dictionary>, ) -> VideoEncoderSettingsBuilder<SetCodecSpecificOptions<S>>
where S::CodecSpecificOptions: IsUnset,

Optional (Some / Option setters).

Source

pub fn flags(self, value: i32) -> VideoEncoderSettingsBuilder<SetFlags<S>>
where S::Flags: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_flags( self, value: Option<i32>, ) -> VideoEncoderSettingsBuilder<SetFlags<S>>
where S::Flags: IsUnset,

Optional (Some / Option setters).

Source

pub fn flags2(self, value: i32) -> VideoEncoderSettingsBuilder<SetFlags2<S>>
where S::Flags2: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_flags2( self, value: Option<i32>, ) -> VideoEncoderSettingsBuilder<SetFlags2<S>>
where S::Flags2: IsUnset,

Optional (Some / Option setters).

Auto Trait Implementations§

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