fn nvenc_struct_ver(s: NvStruct, maj: u32, min: u32) -> u32Expand description
Assemble the NVENCAPI_STRUCT_VERSION word for struct s at API version (maj, min).
The 32-bit word packs, from NvStruct::rev and the API version:
- API major in bits 0-7, API minor in bits 24-27.
- Struct revision (
rev) in bits 16-23. - Magic
0x7in bits 28-30. - The
1<<31flag in bit 31, when this struct sets it at this version.
For the pinned nvcodec-sys headers this reproduces the compile-time NV_ENC_*_VER constants
exactly, so a current driver is stamped byte-for-byte identically to its own SDK’s constant; the
version_tests module asserts that identity.