nvidia_video_codec_sdk/sys/
version.rs

1#![allow(missing_docs)]
2//! Constants from `nvEncodeAPI` that bindgen fails to generate.
3
4#[must_use]
5#[allow(non_snake_case)]
6/// Macro to generate per-structure version for use with API.
7pub const fn NVENCAPI_STRUCT_VERSION(ver: u32) -> u32 {
8    super::nvEncodeAPI::NVENCAPI_VERSION | (ver << 16) | (0x7 << 28)
9}
10
11// Search for `#define \w+_VER` and copy the whole line.
12// Then remove constants which are already defined in `nvEncodeAPI.rs`.
13// Finally convert to Rust syntax by a swapping `#define` for `pub const`,
14// adding type, equals, and semicolon.
15
16pub const NV_ENC_CAPS_PARAM_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
17pub const NV_ENC_RESTORE_ENCODER_STATE_PARAMS_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
18pub const NV_ENC_OUTPUT_STATS_BLOCK_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
19pub const NV_ENC_OUTPUT_STATS_ROW_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
20pub const NV_ENC_ENCODE_OUT_PARAMS_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
21pub const NV_ENC_LOOKAHEAD_PIC_PARAMS_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
22pub const NV_ENC_CREATE_INPUT_BUFFER_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
23pub const NV_ENC_CREATE_BITSTREAM_BUFFER_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
24pub const NV_ENC_CREATE_MV_BUFFER_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
25pub const NV_ENC_RC_PARAMS_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
26pub const NV_ENC_CONFIG_VER: u32 = NVENCAPI_STRUCT_VERSION(8) | (1 << 31);
27pub const NV_ENC_INITIALIZE_PARAMS_VER: u32 = NVENCAPI_STRUCT_VERSION(6) | (1 << 31);
28pub const NV_ENC_RECONFIGURE_PARAMS_VER: u32 = NVENCAPI_STRUCT_VERSION(1) | (1 << 31);
29pub const NV_ENC_PRESET_CONFIG_VER: u32 = NVENCAPI_STRUCT_VERSION(4) | (1 << 31);
30pub const NV_ENC_PIC_PARAMS_MVC_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
31pub const NV_ENC_PIC_PARAMS_VER: u32 = NVENCAPI_STRUCT_VERSION(6) | (1 << 31);
32pub const NV_ENC_MEONLY_PARAMS_VER: u32 = NVENCAPI_STRUCT_VERSION(3);
33pub const NV_ENC_LOCK_BITSTREAM_VER: u32 = NVENCAPI_STRUCT_VERSION(1) | (1 << 31);
34pub const NV_ENC_LOCK_INPUT_BUFFER_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
35pub const NV_ENC_MAP_INPUT_RESOURCE_VER: u32 = NVENCAPI_STRUCT_VERSION(4);
36pub const NV_ENC_FENCE_POINT_D3D12_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
37pub const NV_ENC_INPUT_RESOURCE_D3D12_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
38pub const NV_ENC_OUTPUT_RESOURCE_D3D12_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
39pub const NV_ENC_REGISTER_RESOURCE_VER: u32 = NVENCAPI_STRUCT_VERSION(4);
40pub const NV_ENC_STAT_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
41pub const NV_ENC_SEQUENCE_PARAM_PAYLOAD_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
42pub const NV_ENC_EVENT_PARAMS_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
43pub const NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS_VER: u32 = NVENCAPI_STRUCT_VERSION(1);
44pub const NV_ENCODE_API_FUNCTION_LIST_VER: u32 = NVENCAPI_STRUCT_VERSION(2);