pub struct D3d11NvencEncoderOptions {
pub codec: D3d11NvencCodec,
pub input_format: D3d11NvencInputFormat,
pub width: u32,
pub height: u32,
pub time_base: Rational,
pub frame_rate: Rational,
pub bit_rate: usize,
pub gop_size: u32,
}d3d11 only.Expand description
Everything avcodec_open2 needs before this encoder can be opened at
all — same convention, and the same reasoning, as
crate::elements::SwEncoderOptions, which documents at length why
time_base and frame_rate are separate values rather than one
derived from the other.
Fields§
§codec: D3d11NvencCodec§input_format: D3d11NvencInputFormatThe texture format every input frame must carry. See
D3d11NvencInputFormat.
width: u32§height: u32§time_base: RationalMust match the pts unit of whatever frames this receives.
frame_rate: RationalThe nominal rate NVENC uses for rate control and writes into the
bitstream — not required to match the real interval between
consume calls. See crate::elements::SwEncoderOptions::frame_rate.
bit_rate: usize§gop_size: u32Frames between keyframes (AVCodecContext.gop_size). Always set
explicitly, for the join-latency and segmenting reasons
crate::elements::SwEncoderOptions::gop_size documents.
Trait Implementations§
Source§impl Clone for D3d11NvencEncoderOptions
impl Clone for D3d11NvencEncoderOptions
Source§fn clone(&self) -> D3d11NvencEncoderOptions
fn clone(&self) -> D3d11NvencEncoderOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more