#[repr(C)]pub struct _NV_ENC_INITIALIZE_PARAMS {Show 25 fields
pub version: u32,
pub encodeGUID: GUID,
pub presetGUID: GUID,
pub encodeWidth: u32,
pub encodeHeight: u32,
pub darWidth: u32,
pub darHeight: u32,
pub frameRateNum: u32,
pub frameRateDen: u32,
pub enableEncodeAsync: u32,
pub enablePTD: u32,
pub _bitfield_align_1: [u32; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4]>,
pub privDataSize: u32,
pub privData: *mut c_void,
pub encodeConfig: *mut NV_ENC_CONFIG,
pub maxEncodeWidth: u32,
pub maxEncodeHeight: u32,
pub maxMEHintCountsPerBlock: [NVENC_EXTERNAL_ME_HINT_COUNTS_PER_BLOCKTYPE; 2],
pub tuningInfo: NV_ENC_TUNING_INFO,
pub bufferFormat: NV_ENC_BUFFER_FORMAT,
pub numStateBuffers: u32,
pub outputStatsLevel: NV_ENC_OUTPUT_STATS_LEVEL,
pub reserved: [u32; 285],
pub reserved2: [*mut c_void; 64],
}
Fields§
§version: u32
§encodeGUID: GUID
§presetGUID: GUID
§encodeWidth: u32
§encodeHeight: u32
§darWidth: u32
§darHeight: u32
§frameRateNum: u32
§frameRateDen: u32
§enableEncodeAsync: u32
§enablePTD: u32
§_bitfield_align_1: [u32; 0]
§_bitfield_1: __BindgenBitfieldUnit<[u8; 4]>
§privDataSize: u32
§privData: *mut c_void
§encodeConfig: *mut NV_ENC_CONFIG
§maxEncodeWidth: u32
§maxEncodeHeight: u32
§maxMEHintCountsPerBlock: [NVENC_EXTERNAL_ME_HINT_COUNTS_PER_BLOCKTYPE; 2]
§tuningInfo: NV_ENC_TUNING_INFO
§bufferFormat: NV_ENC_BUFFER_FORMAT
§numStateBuffers: u32
§outputStatsLevel: NV_ENC_OUTPUT_STATS_LEVEL
§reserved: [u32; 285]
§reserved2: [*mut c_void; 64]
Implementations§
source§impl _NV_ENC_INITIALIZE_PARAMS
impl _NV_ENC_INITIALIZE_PARAMS
sourcepub fn new(encode_guid: GUID, width: u32, height: u32) -> Self
pub fn new(encode_guid: GUID, width: u32, height: u32) -> Self
Builder for NV_ENC_INITIALIZE_PARAMS
.
sourcepub fn preset_guid(&mut self, preset_guid: GUID) -> &mut Self
pub fn preset_guid(&mut self, preset_guid: GUID) -> &mut Self
Specifies the preset for encoding. If the preset GUID is set then the preset configuration will be applied before any other parameter.
sourcepub fn encode_config(&mut self, encode_config: &mut NV_ENC_CONFIG) -> &mut Self
pub fn encode_config(&mut self, encode_config: &mut NV_ENC_CONFIG) -> &mut Self
Specifies the advanced codec specific structure. If client has sent a
valid codec config structure, it will override parameters set by the
NV_ENC_INITIALIZE_PARAMS::preset_guid
.
The client can query the interface for codec-specific parameters
using Encoder::get_preset_config
.
It can then modify (if required) some of the codec config parameters and
send down a custom config structure using this method. Even in this
case the client is recommended to pass the same preset GUID it has
used to get the config.
sourcepub fn display_aspect_ratio(&mut self, width: u32, height: u32) -> &mut Self
pub fn display_aspect_ratio(&mut self, width: u32, height: u32) -> &mut Self
Specifies the display aspect ratio (H264/HEVC) or the render width/height (AV1).
sourcepub fn framerate(&mut self, numerator: u32, denominator: u32) -> &mut Self
pub fn framerate(&mut self, numerator: u32, denominator: u32) -> &mut Self
Specifies the framerate in frames per second as a fraction
numerator / denominator
.
sourcepub fn enable_picture_type_decision(&mut self) -> &mut Self
pub fn enable_picture_type_decision(&mut self) -> &mut Self
Enable the Picture Type Decision to be taken by the
NvEncodeAPI
interface.
source§impl _NV_ENC_INITIALIZE_PARAMS
impl _NV_ENC_INITIALIZE_PARAMS
pub fn reportSliceOffsets(&self) -> u32
pub fn set_reportSliceOffsets(&mut self, val: u32)
pub fn enableSubFrameWrite(&self) -> u32
pub fn set_enableSubFrameWrite(&mut self, val: u32)
pub fn enableExternalMEHints(&self) -> u32
pub fn set_enableExternalMEHints(&mut self, val: u32)
pub fn enableMEOnlyMode(&self) -> u32
pub fn set_enableMEOnlyMode(&mut self, val: u32)
pub fn enableWeightedPrediction(&self) -> u32
pub fn set_enableWeightedPrediction(&mut self, val: u32)
pub fn splitEncodeMode(&self) -> u32
pub fn set_splitEncodeMode(&mut self, val: u32)
pub fn enableOutputInVidmem(&self) -> u32
pub fn set_enableOutputInVidmem(&mut self, val: u32)
pub fn enableReconFrameOutput(&self) -> u32
pub fn set_enableReconFrameOutput(&mut self, val: u32)
pub fn enableOutputStats(&self) -> u32
pub fn set_enableOutputStats(&mut self, val: u32)
pub fn reservedBitFields(&self) -> u32
pub fn set_reservedBitFields(&mut self, val: u32)
pub fn new_bitfield_1( reportSliceOffsets: u32, enableSubFrameWrite: u32, enableExternalMEHints: u32, enableMEOnlyMode: u32, enableWeightedPrediction: u32, splitEncodeMode: u32, enableOutputInVidmem: u32, enableReconFrameOutput: u32, enableOutputStats: u32, reservedBitFields: u32 ) -> __BindgenBitfieldUnit<[u8; 4]>
Trait Implementations§
source§impl Clone for _NV_ENC_INITIALIZE_PARAMS
impl Clone for _NV_ENC_INITIALIZE_PARAMS
source§fn clone(&self) -> _NV_ENC_INITIALIZE_PARAMS
fn clone(&self) -> _NV_ENC_INITIALIZE_PARAMS
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for _NV_ENC_INITIALIZE_PARAMS
impl Debug for _NV_ENC_INITIALIZE_PARAMS
source§impl Default for _NV_ENC_INITIALIZE_PARAMS
impl Default for _NV_ENC_INITIALIZE_PARAMS
source§impl Hash for _NV_ENC_INITIALIZE_PARAMS
impl Hash for _NV_ENC_INITIALIZE_PARAMS
source§impl Ord for _NV_ENC_INITIALIZE_PARAMS
impl Ord for _NV_ENC_INITIALIZE_PARAMS
source§fn cmp(&self, other: &_NV_ENC_INITIALIZE_PARAMS) -> Ordering
fn cmp(&self, other: &_NV_ENC_INITIALIZE_PARAMS) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<_NV_ENC_INITIALIZE_PARAMS> for _NV_ENC_INITIALIZE_PARAMS
impl PartialEq<_NV_ENC_INITIALIZE_PARAMS> for _NV_ENC_INITIALIZE_PARAMS
source§fn eq(&self, other: &_NV_ENC_INITIALIZE_PARAMS) -> bool
fn eq(&self, other: &_NV_ENC_INITIALIZE_PARAMS) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<_NV_ENC_INITIALIZE_PARAMS> for _NV_ENC_INITIALIZE_PARAMS
impl PartialOrd<_NV_ENC_INITIALIZE_PARAMS> for _NV_ENC_INITIALIZE_PARAMS
source§fn partial_cmp(&self, other: &_NV_ENC_INITIALIZE_PARAMS) -> Option<Ordering>
fn partial_cmp(&self, other: &_NV_ENC_INITIALIZE_PARAMS) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more