pub struct VideoEncoderConfig {
pub codec: CodecId,
pub input: FrameInfo,
pub frame_rate: Option<FrameRate>,
pub frame_limit: Option<usize>,
pub rate_control: VideoRateControl,
pub reconstruction: ReconstructionMode,
pub settings: Vec<VideoEncoderSetting>,
}Expand description
Codec-neutral configuration for constructing or driving a video encoder.
Fields§
§codec: CodecIdSelected codec id.
input: FrameInfoInput frame geometry and pixel format.
frame_rate: Option<FrameRate>Optional frame-rate metadata.
frame_limit: Option<usize>Optional caller/source frame limit.
rate_control: VideoRateControlRequested rate-control mode.
reconstruction: ReconstructionModeRequested reconstruction output mode.
settings: Vec<VideoEncoderSetting>Codec extension settings.
Implementations§
Source§impl VideoEncoderConfig
impl VideoEncoderConfig
Sourcepub fn new(codec: CodecId, input: FrameInfo) -> Self
pub fn new(codec: CodecId, input: FrameInfo) -> Self
Create an encoder config using codec defaults for optional fields.
Sourcepub fn for_codec(codec: impl AsRef<str>, input: FrameInfo) -> Result<Self>
pub fn for_codec(codec: impl AsRef<str>, input: FrameInfo) -> Result<Self>
Create an encoder config from a textual codec id.
Sourcepub fn with_frame_rate(self, frame_rate: FrameRate) -> Self
pub fn with_frame_rate(self, frame_rate: FrameRate) -> Self
Set optional frame-rate metadata.
Sourcepub fn with_frame_limit(self, frame_limit: usize) -> Self
pub fn with_frame_limit(self, frame_limit: usize) -> Self
Set an optional source/caller frame limit.
Sourcepub fn with_rate_control(self, rate_control: VideoRateControl) -> Self
pub fn with_rate_control(self, rate_control: VideoRateControl) -> Self
Set the requested rate-control mode.
Sourcepub fn with_reconstruction(self, reconstruction: ReconstructionMode) -> Self
pub fn with_reconstruction(self, reconstruction: ReconstructionMode) -> Self
Set the requested reconstruction mode.
Sourcepub fn with_setting(self, setting: VideoEncoderSetting) -> Self
pub fn with_setting(self, setting: VideoEncoderSetting) -> Self
Append one codec extension setting.
Sourcepub fn setting_specs(&self) -> Vec<String>
pub fn setting_specs(&self) -> Vec<String>
Return explicit CLI-compatible setting specs represented by this config.
This does not include manifest defaults. Use
VideoEncoderManifest::effective_setting_specs when a frontend needs
the full effective setting list that will be reported to users.