#[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

source

pub fn new(encode_guid: GUID, width: u32, height: u32) -> Self

source

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.

source

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.

source

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).

source

pub fn framerate(&mut self, numerator: u32, denominator: u32) -> &mut Self

Specifies the framerate in frames per second as a fraction numerator / denominator.

source

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

source

pub fn reportSliceOffsets(&self) -> u32

source

pub fn set_reportSliceOffsets(&mut self, val: u32)

source

pub fn enableSubFrameWrite(&self) -> u32

source

pub fn set_enableSubFrameWrite(&mut self, val: u32)

source

pub fn enableExternalMEHints(&self) -> u32

source

pub fn set_enableExternalMEHints(&mut self, val: u32)

source

pub fn enableMEOnlyMode(&self) -> u32

source

pub fn set_enableMEOnlyMode(&mut self, val: u32)

source

pub fn enableWeightedPrediction(&self) -> u32

source

pub fn set_enableWeightedPrediction(&mut self, val: u32)

source

pub fn splitEncodeMode(&self) -> u32

source

pub fn set_splitEncodeMode(&mut self, val: u32)

source

pub fn enableOutputInVidmem(&self) -> u32

source

pub fn set_enableOutputInVidmem(&mut self, val: u32)

source

pub fn enableReconFrameOutput(&self) -> u32

source

pub fn set_enableReconFrameOutput(&mut self, val: u32)

source

pub fn enableOutputStats(&self) -> u32

source

pub fn set_enableOutputStats(&mut self, val: u32)

source

pub fn reservedBitFields(&self) -> u32

source

pub fn set_reservedBitFields(&mut self, val: u32)

source

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

source§

fn clone(&self) -> _NV_ENC_INITIALIZE_PARAMS

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for _NV_ENC_INITIALIZE_PARAMS

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for _NV_ENC_INITIALIZE_PARAMS

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Hash for _NV_ENC_INITIALIZE_PARAMS

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for _NV_ENC_INITIALIZE_PARAMS

source§

fn cmp(&self, other: &_NV_ENC_INITIALIZE_PARAMS) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<_NV_ENC_INITIALIZE_PARAMS> for _NV_ENC_INITIALIZE_PARAMS

source§

fn eq(&self, other: &_NV_ENC_INITIALIZE_PARAMS) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<_NV_ENC_INITIALIZE_PARAMS> for _NV_ENC_INITIALIZE_PARAMS

source§

fn partial_cmp(&self, other: &_NV_ENC_INITIALIZE_PARAMS) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for _NV_ENC_INITIALIZE_PARAMS

source§

impl Eq for _NV_ENC_INITIALIZE_PARAMS

source§

impl StructuralEq for _NV_ENC_INITIALIZE_PARAMS

source§

impl StructuralPartialEq for _NV_ENC_INITIALIZE_PARAMS

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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.

source§

impl<T, U> Into<U> for Twhere 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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.