1pub const _STDINT_H: u32 = 1;
4pub const _FEATURES_H: u32 = 1;
5pub const _DEFAULT_SOURCE: u32 = 1;
6pub const __GLIBC_USE_ISOC2X: u32 = 0;
7pub const __USE_ISOC11: u32 = 1;
8pub const __USE_ISOC99: u32 = 1;
9pub const __USE_ISOC95: u32 = 1;
10pub const __USE_POSIX_IMPLICITLY: u32 = 1;
11pub const _POSIX_SOURCE: u32 = 1;
12pub const _POSIX_C_SOURCE: u32 = 200809;
13pub const __USE_POSIX: u32 = 1;
14pub const __USE_POSIX2: u32 = 1;
15pub const __USE_POSIX199309: u32 = 1;
16pub const __USE_POSIX199506: u32 = 1;
17pub const __USE_XOPEN2K: u32 = 1;
18pub const __USE_XOPEN2K8: u32 = 1;
19pub const _ATFILE_SOURCE: u32 = 1;
20pub const __WORDSIZE: u32 = 64;
21pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
22pub const __SYSCALL_WORDSIZE: u32 = 64;
23pub const __TIMESIZE: u32 = 64;
24pub const __USE_MISC: u32 = 1;
25pub const __USE_ATFILE: u32 = 1;
26pub const __USE_FORTIFY_LEVEL: u32 = 0;
27pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
28pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
29pub const _STDC_PREDEF_H: u32 = 1;
30pub const __STDC_IEC_559__: u32 = 1;
31pub const __STDC_IEC_60559_BFP__: u32 = 201404;
32pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
33pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
34pub const __STDC_ISO_10646__: u32 = 201706;
35pub const __GNU_LIBRARY__: u32 = 6;
36pub const __GLIBC__: u32 = 2;
37pub const __GLIBC_MINOR__: u32 = 35;
38pub const _SYS_CDEFS_H: u32 = 1;
39pub const __glibc_c99_flexarr_available: u32 = 1;
40pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
41pub const __HAVE_GENERIC_SELECTION: u32 = 1;
42pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
43pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
44pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
45pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
46pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
47pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
48pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
49pub const _BITS_TYPES_H: u32 = 1;
50pub const _BITS_TYPESIZES_H: u32 = 1;
51pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
52pub const __INO_T_MATCHES_INO64_T: u32 = 1;
53pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
54pub const __STATFS_MATCHES_STATFS64: u32 = 1;
55pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1;
56pub const __FD_SETSIZE: u32 = 1024;
57pub const _BITS_TIME64_H: u32 = 1;
58pub const _BITS_WCHAR_H: u32 = 1;
59pub const _BITS_STDINT_INTN_H: u32 = 1;
60pub const _BITS_STDINT_UINTN_H: u32 = 1;
61pub const INT8_MIN: i32 = -128;
62pub const INT16_MIN: i32 = -32768;
63pub const INT32_MIN: i32 = -2147483648;
64pub const INT8_MAX: u32 = 127;
65pub const INT16_MAX: u32 = 32767;
66pub const INT32_MAX: u32 = 2147483647;
67pub const UINT8_MAX: u32 = 255;
68pub const UINT16_MAX: u32 = 65535;
69pub const UINT32_MAX: u32 = 4294967295;
70pub const INT_LEAST8_MIN: i32 = -128;
71pub const INT_LEAST16_MIN: i32 = -32768;
72pub const INT_LEAST32_MIN: i32 = -2147483648;
73pub const INT_LEAST8_MAX: u32 = 127;
74pub const INT_LEAST16_MAX: u32 = 32767;
75pub const INT_LEAST32_MAX: u32 = 2147483647;
76pub const UINT_LEAST8_MAX: u32 = 255;
77pub const UINT_LEAST16_MAX: u32 = 65535;
78pub const UINT_LEAST32_MAX: u32 = 4294967295;
79pub const INT_FAST8_MIN: i32 = -128;
80pub const INT_FAST16_MIN: i64 = -9223372036854775808;
81pub const INT_FAST32_MIN: i64 = -9223372036854775808;
82pub const INT_FAST8_MAX: u32 = 127;
83pub const INT_FAST16_MAX: u64 = 9223372036854775807;
84pub const INT_FAST32_MAX: u64 = 9223372036854775807;
85pub const UINT_FAST8_MAX: u32 = 255;
86pub const UINT_FAST16_MAX: i32 = -1;
87pub const UINT_FAST32_MAX: i32 = -1;
88pub const INTPTR_MIN: i64 = -9223372036854775808;
89pub const INTPTR_MAX: u64 = 9223372036854775807;
90pub const UINTPTR_MAX: i32 = -1;
91pub const PTRDIFF_MIN: i64 = -9223372036854775808;
92pub const PTRDIFF_MAX: u64 = 9223372036854775807;
93pub const SIG_ATOMIC_MIN: i32 = -2147483648;
94pub const SIG_ATOMIC_MAX: u32 = 2147483647;
95pub const SIZE_MAX: i32 = -1;
96pub const WINT_MIN: u32 = 0;
97pub const WINT_MAX: u32 = 4294967295;
98pub const NVFBC_VERSION_MAJOR: u32 = 1;
99pub const NVFBC_VERSION_MINOR: u32 = 8;
100pub const NVFBC_ERR_STR_LEN: u32 = 512;
101pub const NVFBC_OUTPUT_MAX: u32 = 5;
102pub const NVFBC_OUTPUT_NAME_LEN: u32 = 128;
103pub const NVFBC_TOGL_TEXTURES_MAX: u32 = 2;
104pub type __u_char = ::std::os::raw::c_uchar;
105pub type __u_short = ::std::os::raw::c_ushort;
106pub type __u_int = ::std::os::raw::c_uint;
107pub type __u_long = ::std::os::raw::c_ulong;
108pub type __int8_t = ::std::os::raw::c_schar;
109pub type __uint8_t = ::std::os::raw::c_uchar;
110pub type __int16_t = ::std::os::raw::c_short;
111pub type __uint16_t = ::std::os::raw::c_ushort;
112pub type __int32_t = ::std::os::raw::c_int;
113pub type __uint32_t = ::std::os::raw::c_uint;
114pub type __int64_t = ::std::os::raw::c_long;
115pub type __uint64_t = ::std::os::raw::c_ulong;
116pub type __int_least8_t = __int8_t;
117pub type __uint_least8_t = __uint8_t;
118pub type __int_least16_t = __int16_t;
119pub type __uint_least16_t = __uint16_t;
120pub type __int_least32_t = __int32_t;
121pub type __uint_least32_t = __uint32_t;
122pub type __int_least64_t = __int64_t;
123pub type __uint_least64_t = __uint64_t;
124pub type __quad_t = ::std::os::raw::c_long;
125pub type __u_quad_t = ::std::os::raw::c_ulong;
126pub type __intmax_t = ::std::os::raw::c_long;
127pub type __uintmax_t = ::std::os::raw::c_ulong;
128pub type __dev_t = ::std::os::raw::c_ulong;
129pub type __uid_t = ::std::os::raw::c_uint;
130pub type __gid_t = ::std::os::raw::c_uint;
131pub type __ino_t = ::std::os::raw::c_ulong;
132pub type __ino64_t = ::std::os::raw::c_ulong;
133pub type __mode_t = ::std::os::raw::c_uint;
134pub type __nlink_t = ::std::os::raw::c_ulong;
135pub type __off_t = ::std::os::raw::c_long;
136pub type __off64_t = ::std::os::raw::c_long;
137pub type __pid_t = ::std::os::raw::c_int;
138#[repr(C)]
139#[derive(Debug, Copy, Clone)]
140pub struct __fsid_t {
141 pub __val: [::std::os::raw::c_int; 2usize],
142}
143#[test]
144fn bindgen_test_layout___fsid_t() {
145 assert_eq!(
146 ::std::mem::size_of::<__fsid_t>(),
147 8usize,
148 concat!("Size of: ", stringify!(__fsid_t))
149 );
150 assert_eq!(
151 ::std::mem::align_of::<__fsid_t>(),
152 4usize,
153 concat!("Alignment of ", stringify!(__fsid_t))
154 );
155 fn test_field___val() {
156 assert_eq!(
157 unsafe {
158 let uninit = ::std::mem::MaybeUninit::<__fsid_t>::uninit();
159 let ptr = uninit.as_ptr();
160 ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize
161 },
162 0usize,
163 concat!("Offset of field: ", stringify!(__fsid_t), "::", stringify!(__val))
164 );
165 }
166 test_field___val();
167}
168pub type __clock_t = ::std::os::raw::c_long;
169pub type __rlim_t = ::std::os::raw::c_ulong;
170pub type __rlim64_t = ::std::os::raw::c_ulong;
171pub type __id_t = ::std::os::raw::c_uint;
172pub type __time_t = ::std::os::raw::c_long;
173pub type __useconds_t = ::std::os::raw::c_uint;
174pub type __suseconds_t = ::std::os::raw::c_long;
175pub type __suseconds64_t = ::std::os::raw::c_long;
176pub type __daddr_t = ::std::os::raw::c_int;
177pub type __key_t = ::std::os::raw::c_int;
178pub type __clockid_t = ::std::os::raw::c_int;
179pub type __timer_t = *mut ::std::os::raw::c_void;
180pub type __blksize_t = ::std::os::raw::c_long;
181pub type __blkcnt_t = ::std::os::raw::c_long;
182pub type __blkcnt64_t = ::std::os::raw::c_long;
183pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
184pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
185pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
186pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
187pub type __fsword_t = ::std::os::raw::c_long;
188pub type __ssize_t = ::std::os::raw::c_long;
189pub type __syscall_slong_t = ::std::os::raw::c_long;
190pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
191pub type __loff_t = __off64_t;
192pub type __caddr_t = *mut ::std::os::raw::c_char;
193pub type __intptr_t = ::std::os::raw::c_long;
194pub type __socklen_t = ::std::os::raw::c_uint;
195pub type __sig_atomic_t = ::std::os::raw::c_int;
196pub type int_least8_t = __int_least8_t;
197pub type int_least16_t = __int_least16_t;
198pub type int_least32_t = __int_least32_t;
199pub type int_least64_t = __int_least64_t;
200pub type uint_least8_t = __uint_least8_t;
201pub type uint_least16_t = __uint_least16_t;
202pub type uint_least32_t = __uint_least32_t;
203pub type uint_least64_t = __uint_least64_t;
204pub type int_fast8_t = ::std::os::raw::c_schar;
205pub type int_fast16_t = ::std::os::raw::c_long;
206pub type int_fast32_t = ::std::os::raw::c_long;
207pub type int_fast64_t = ::std::os::raw::c_long;
208pub type uint_fast8_t = ::std::os::raw::c_uchar;
209pub type uint_fast16_t = ::std::os::raw::c_ulong;
210pub type uint_fast32_t = ::std::os::raw::c_ulong;
211pub type uint_fast64_t = ::std::os::raw::c_ulong;
212pub type intmax_t = __intmax_t;
213pub type uintmax_t = __uintmax_t;
214#[doc = " This indicates that the API call returned with no errors."]
215pub const _NVFBCSTATUS_NVFBC_SUCCESS: _NVFBCSTATUS = 0;
216#[doc = " This indicates that the API version between the client and the library"]
217#[doc = " is not compatible."]
218pub const _NVFBCSTATUS_NVFBC_ERR_API_VERSION: _NVFBCSTATUS = 1;
219#[doc = " An internal error occurred."]
220pub const _NVFBCSTATUS_NVFBC_ERR_INTERNAL: _NVFBCSTATUS = 2;
221#[doc = " This indicates that one or more of the parameter passed to the API call"]
222#[doc = " is invalid."]
223pub const _NVFBCSTATUS_NVFBC_ERR_INVALID_PARAM: _NVFBCSTATUS = 3;
224#[doc = " This indicates that one or more of the pointers passed to the API call"]
225#[doc = " is invalid."]
226pub const _NVFBCSTATUS_NVFBC_ERR_INVALID_PTR: _NVFBCSTATUS = 4;
227#[doc = " This indicates that the handle passed to the API call to identify the"]
228#[doc = " client is invalid."]
229pub const _NVFBCSTATUS_NVFBC_ERR_INVALID_HANDLE: _NVFBCSTATUS = 5;
230#[doc = " This indicates that the maximum number of threaded clients of the same"]
231#[doc = " process has been reached. The limit is 10 threads per process."]
232#[doc = " There is no limit on the number of process."]
233pub const _NVFBCSTATUS_NVFBC_ERR_MAX_CLIENTS: _NVFBCSTATUS = 6;
234#[doc = " This indicates that the requested feature is not currently supported"]
235#[doc = " by the library."]
236pub const _NVFBCSTATUS_NVFBC_ERR_UNSUPPORTED: _NVFBCSTATUS = 7;
237#[doc = " This indicates that the API call failed because it was unable to allocate"]
238#[doc = " enough memory to perform the requested operation."]
239pub const _NVFBCSTATUS_NVFBC_ERR_OUT_OF_MEMORY: _NVFBCSTATUS = 8;
240#[doc = " This indicates that the API call was not expected. This happens when"]
241#[doc = " API calls are performed in a wrong order, such as trying to capture"]
242#[doc = " a frame prior to creating a new capture session; or trying to set up"]
243#[doc = " a capture to video memory although a capture session to system memory"]
244#[doc = " was created."]
245pub const _NVFBCSTATUS_NVFBC_ERR_BAD_REQUEST: _NVFBCSTATUS = 9;
246#[doc = " This indicates an X error, most likely meaning that the X server has"]
247#[doc = " been terminated. When this error is returned, the only resort is to"]
248#[doc = " create another FBC handle using NvFBCCreateHandle()."]
249#[doc = ""]
250#[doc = " The previous handle should still be freed with NvFBCDestroyHandle(), but"]
251#[doc = " it might leak resources, in particular X, GLX, and GL resources since"]
252#[doc = " it is no longer possible to communicate with an X server to free them"]
253#[doc = " through the driver."]
254#[doc = ""]
255#[doc = " The best course of action to eliminate this potential leak is to close"]
256#[doc = " the OpenGL driver, close the forked process running the capture, or"]
257#[doc = " restart the application."]
258pub const _NVFBCSTATUS_NVFBC_ERR_X: _NVFBCSTATUS = 10;
259#[doc = " This indicates a GLX error."]
260pub const _NVFBCSTATUS_NVFBC_ERR_GLX: _NVFBCSTATUS = 11;
261#[doc = " This indicates an OpenGL error."]
262pub const _NVFBCSTATUS_NVFBC_ERR_GL: _NVFBCSTATUS = 12;
263#[doc = " This indicates a CUDA error."]
264pub const _NVFBCSTATUS_NVFBC_ERR_CUDA: _NVFBCSTATUS = 13;
265#[doc = " This indicates a HW encoder error."]
266pub const _NVFBCSTATUS_NVFBC_ERR_ENCODER: _NVFBCSTATUS = 14;
267#[doc = " This indicates an NvFBC context error."]
268pub const _NVFBCSTATUS_NVFBC_ERR_CONTEXT: _NVFBCSTATUS = 15;
269#[doc = " This indicates that the application must recreate the capture session."]
270#[doc = ""]
271#[doc = " This error can be returned if a modeset event occurred while capturing"]
272#[doc = " frames, and NVFBC_CREATE_HANDLE_PARAMS::bDisableAutoModesetRecovery"]
273#[doc = " was set to NVFBC_TRUE."]
274pub const _NVFBCSTATUS_NVFBC_ERR_MUST_RECREATE: _NVFBCSTATUS = 16;
275#[doc = " This indicates a Vulkan error."]
276pub const _NVFBCSTATUS_NVFBC_ERR_VULKAN: _NVFBCSTATUS = 17;
277#[doc = " Defines error codes."]
278#[doc = ""]
279#[doc = " \\see NvFBCGetLastErrorStr"]
280pub type _NVFBCSTATUS = ::std::os::raw::c_uint;
281#[doc = " Defines error codes."]
282#[doc = ""]
283#[doc = " \\see NvFBCGetLastErrorStr"]
284pub use self::_NVFBCSTATUS as NVFBCSTATUS;
285#[doc = " False value."]
286pub const _NVFBC_BOOL_NVFBC_FALSE: _NVFBC_BOOL = 0;
287#[doc = " True value."]
288pub const _NVFBC_BOOL_NVFBC_TRUE: _NVFBC_BOOL = 1;
289#[doc = " Defines boolean values."]
290pub type _NVFBC_BOOL = ::std::os::raw::c_uint;
291#[doc = " Defines boolean values."]
292pub use self::_NVFBC_BOOL as NVFBC_BOOL;
293#[doc = " Capture frames to a buffer in system memory."]
294pub const _NVFBC_CAPTURE_TYPE_NVFBC_CAPTURE_TO_SYS: _NVFBC_CAPTURE_TYPE = 0;
295#[doc = " Capture frames to a CUDA device in video memory."]
296#[doc = ""]
297#[doc = " Specifying this will dlopen() libcuda.so.1 and fail if not available."]
298pub const _NVFBC_CAPTURE_TYPE_NVFBC_CAPTURE_SHARED_CUDA: _NVFBC_CAPTURE_TYPE = 1;
299#[doc = " Capture frames to an OpenGL buffer in video memory."]
300pub const _NVFBC_CAPTURE_TYPE_NVFBC_CAPTURE_TO_GL: _NVFBC_CAPTURE_TYPE = 3;
301#[doc = " Capture type."]
302pub type _NVFBC_CAPTURE_TYPE = ::std::os::raw::c_uint;
303#[doc = " Capture type."]
304pub use self::_NVFBC_CAPTURE_TYPE as NVFBC_CAPTURE_TYPE;
305#[doc = " By default, NvFBC tries to track a connected primary output. If none is"]
306#[doc = " found, then it tries to track the first connected output. If none is"]
307#[doc = " found then it tracks the entire X screen."]
308#[doc = ""]
309#[doc = " If the XRandR extension is not available, this option has the same effect"]
310#[doc = " as ::NVFBC_TRACKING_SCREEN."]
311#[doc = ""]
312#[doc = " This default behavior might be subject to changes in the future."]
313pub const NVFBC_TRACKING_TYPE_NVFBC_TRACKING_DEFAULT: NVFBC_TRACKING_TYPE = 0;
314#[doc = " Track an RandR output specified by its ID in the appropriate field."]
315#[doc = ""]
316#[doc = " The list of connected outputs can be queried via NvFBCGetStatus()."]
317#[doc = " This list can also be obtained using e.g., xrandr(1)."]
318#[doc = ""]
319#[doc = " If the XRandR extension is not available, setting this option returns an"]
320#[doc = " error."]
321pub const NVFBC_TRACKING_TYPE_NVFBC_TRACKING_OUTPUT: NVFBC_TRACKING_TYPE = 1;
322#[doc = " Track the entire X screen."]
323pub const NVFBC_TRACKING_TYPE_NVFBC_TRACKING_SCREEN: NVFBC_TRACKING_TYPE = 2;
324#[doc = " Tracking type."]
325#[doc = ""]
326#[doc = " NvFBC can track a specific region of the framebuffer to capture."]
327#[doc = ""]
328#[doc = " An X screen corresponds to the entire framebuffer."]
329#[doc = ""]
330#[doc = " An RandR CRTC is a component of the GPU that reads pixels from a region of"]
331#[doc = " the X screen and sends them through a pipeline to an RandR output."]
332#[doc = " A physical monitor can be connected to an RandR output. Tracking an RandR"]
333#[doc = " output captures the region of the X screen that the RandR CRTC is sending to"]
334#[doc = " the RandR output."]
335pub type NVFBC_TRACKING_TYPE = ::std::os::raw::c_uint;
336#[doc = " Data will be converted to ARGB8888 byte-order format. 32 bpp."]
337pub const _NVFBC_BUFFER_FORMAT_NVFBC_BUFFER_FORMAT_ARGB: _NVFBC_BUFFER_FORMAT = 0;
338#[doc = " Data will be converted to RGB888 byte-order format. 24 bpp."]
339pub const _NVFBC_BUFFER_FORMAT_NVFBC_BUFFER_FORMAT_RGB: _NVFBC_BUFFER_FORMAT = 1;
340#[doc = " Data will be converted to NV12 format using HDTV weights"]
341#[doc = " according to ITU-R BT.709. 12 bpp."]
342pub const _NVFBC_BUFFER_FORMAT_NVFBC_BUFFER_FORMAT_NV12: _NVFBC_BUFFER_FORMAT = 2;
343#[doc = " Data will be converted to YUV 444 planar format using HDTV weights"]
344#[doc = " according to ITU-R BT.709. 24 bpp"]
345pub const _NVFBC_BUFFER_FORMAT_NVFBC_BUFFER_FORMAT_YUV444P: _NVFBC_BUFFER_FORMAT = 3;
346#[doc = " Data will be converted to RGBA8888 byte-order format. 32 bpp."]
347pub const _NVFBC_BUFFER_FORMAT_NVFBC_BUFFER_FORMAT_RGBA: _NVFBC_BUFFER_FORMAT = 4;
348#[doc = " Native format. No pixel conversion needed."]
349#[doc = " BGRA8888 byte-order format. 32 bpp."]
350pub const _NVFBC_BUFFER_FORMAT_NVFBC_BUFFER_FORMAT_BGRA: _NVFBC_BUFFER_FORMAT = 5;
351#[doc = " Buffer format."]
352pub type _NVFBC_BUFFER_FORMAT = ::std::os::raw::c_uint;
353#[doc = " Buffer format."]
354pub use self::_NVFBC_BUFFER_FORMAT as NVFBC_BUFFER_FORMAT;
355#[doc = " Handle used to identify an NvFBC session."]
356pub type NVFBC_SESSION_HANDLE = u64;
357#[doc = " Box used to describe an area of the tracked region to capture."]
358#[doc = ""]
359#[doc = " The coordinates are relative to the tracked region."]
360#[doc = ""]
361#[doc = " E.g., if the size of the X screen is 3520x1200 and the tracked RandR output"]
362#[doc = " scans a region of 1600x1200+1920+0, then setting a capture box of"]
363#[doc = " 800x600+100+50 effectively captures a region of 800x600+2020+50 relative to"]
364#[doc = " the X screen."]
365#[repr(C)]
366#[derive(Debug, Copy, Clone)]
367pub struct _NVFBC_BOX {
368 #[doc = " [in] X offset of the box."]
369 pub x: u32,
370 #[doc = " [in] Y offset of the box."]
371 pub y: u32,
372 #[doc = " [in] Width of the box."]
373 pub w: u32,
374 #[doc = " [in] Height of the box."]
375 pub h: u32,
376}
377#[test]
378fn bindgen_test_layout__NVFBC_BOX() {
379 assert_eq!(
380 ::std::mem::size_of::<_NVFBC_BOX>(),
381 16usize,
382 concat!("Size of: ", stringify!(_NVFBC_BOX))
383 );
384 assert_eq!(
385 ::std::mem::align_of::<_NVFBC_BOX>(),
386 4usize,
387 concat!("Alignment of ", stringify!(_NVFBC_BOX))
388 );
389 fn test_field_x() {
390 assert_eq!(
391 unsafe {
392 let uninit = ::std::mem::MaybeUninit::<_NVFBC_BOX>::uninit();
393 let ptr = uninit.as_ptr();
394 ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize
395 },
396 0usize,
397 concat!("Offset of field: ", stringify!(_NVFBC_BOX), "::", stringify!(x))
398 );
399 }
400 test_field_x();
401 fn test_field_y() {
402 assert_eq!(
403 unsafe {
404 let uninit = ::std::mem::MaybeUninit::<_NVFBC_BOX>::uninit();
405 let ptr = uninit.as_ptr();
406 ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize
407 },
408 4usize,
409 concat!("Offset of field: ", stringify!(_NVFBC_BOX), "::", stringify!(y))
410 );
411 }
412 test_field_y();
413 fn test_field_w() {
414 assert_eq!(
415 unsafe {
416 let uninit = ::std::mem::MaybeUninit::<_NVFBC_BOX>::uninit();
417 let ptr = uninit.as_ptr();
418 ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize
419 },
420 8usize,
421 concat!("Offset of field: ", stringify!(_NVFBC_BOX), "::", stringify!(w))
422 );
423 }
424 test_field_w();
425 fn test_field_h() {
426 assert_eq!(
427 unsafe {
428 let uninit = ::std::mem::MaybeUninit::<_NVFBC_BOX>::uninit();
429 let ptr = uninit.as_ptr();
430 ::std::ptr::addr_of!((*ptr).h) as usize - ptr as usize
431 },
432 12usize,
433 concat!("Offset of field: ", stringify!(_NVFBC_BOX), "::", stringify!(h))
434 );
435 }
436 test_field_h();
437}
438#[doc = " Box used to describe an area of the tracked region to capture."]
439#[doc = ""]
440#[doc = " The coordinates are relative to the tracked region."]
441#[doc = ""]
442#[doc = " E.g., if the size of the X screen is 3520x1200 and the tracked RandR output"]
443#[doc = " scans a region of 1600x1200+1920+0, then setting a capture box of"]
444#[doc = " 800x600+100+50 effectively captures a region of 800x600+2020+50 relative to"]
445#[doc = " the X screen."]
446pub type NVFBC_BOX = _NVFBC_BOX;
447#[doc = " Size used to describe the size of a frame."]
448#[repr(C)]
449#[derive(Debug, Copy, Clone)]
450pub struct _NVFBC_SIZE {
451 #[doc = " [in] Width."]
452 pub w: u32,
453 #[doc = " [in] Height."]
454 pub h: u32,
455}
456#[test]
457fn bindgen_test_layout__NVFBC_SIZE() {
458 assert_eq!(
459 ::std::mem::size_of::<_NVFBC_SIZE>(),
460 8usize,
461 concat!("Size of: ", stringify!(_NVFBC_SIZE))
462 );
463 assert_eq!(
464 ::std::mem::align_of::<_NVFBC_SIZE>(),
465 4usize,
466 concat!("Alignment of ", stringify!(_NVFBC_SIZE))
467 );
468 fn test_field_w() {
469 assert_eq!(
470 unsafe {
471 let uninit = ::std::mem::MaybeUninit::<_NVFBC_SIZE>::uninit();
472 let ptr = uninit.as_ptr();
473 ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize
474 },
475 0usize,
476 concat!("Offset of field: ", stringify!(_NVFBC_SIZE), "::", stringify!(w))
477 );
478 }
479 test_field_w();
480 fn test_field_h() {
481 assert_eq!(
482 unsafe {
483 let uninit = ::std::mem::MaybeUninit::<_NVFBC_SIZE>::uninit();
484 let ptr = uninit.as_ptr();
485 ::std::ptr::addr_of!((*ptr).h) as usize - ptr as usize
486 },
487 4usize,
488 concat!("Offset of field: ", stringify!(_NVFBC_SIZE), "::", stringify!(h))
489 );
490 }
491 test_field_h();
492}
493#[doc = " Size used to describe the size of a frame."]
494pub type NVFBC_SIZE = _NVFBC_SIZE;
495#[doc = " Describes information about a captured frame."]
496#[repr(C)]
497#[derive(Debug, Copy, Clone)]
498pub struct _NVFBC_FRAME_GRAB_INFO {
499 #[doc = " [out] Width of the captured frame."]
500 pub dwWidth: u32,
501 #[doc = " [out] Height of the captured frame."]
502 pub dwHeight: u32,
503 #[doc = " [out] Size of the frame in bytes."]
504 pub dwByteSize: u32,
505 #[doc = " [out] Incremental ID of the current frame."]
506 #[doc = ""]
507 #[doc = " This can be used to identify a frame."]
508 pub dwCurrentFrame: u32,
509 #[doc = " [out] Whether the captured frame is a new frame."]
510 #[doc = ""]
511 #[doc = " When using non blocking calls it is possible to capture a frame"]
512 #[doc = " that was already captured before if the display server did not"]
513 #[doc = " render a new frame in the meantime. In that case, this flag"]
514 #[doc = " will be set to NVFBC_FALSE."]
515 #[doc = ""]
516 #[doc = " When using blocking calls each captured frame will have"]
517 #[doc = " this flag set to NVFBC_TRUE since the blocking mechanism waits for"]
518 #[doc = " the display server to render a new frame."]
519 #[doc = ""]
520 #[doc = " Note that this flag does not guarantee that the content of"]
521 #[doc = " the frame will be different compared to the previous captured frame."]
522 #[doc = ""]
523 #[doc = " In particular, some compositing managers report the entire"]
524 #[doc = " framebuffer as damaged when an application refreshes its content."]
525 #[doc = ""]
526 #[doc = " Consider a single X screen spanned across physical displays A and B"]
527 #[doc = " and an NvFBC application tracking display A. Depending on the"]
528 #[doc = " compositing manager, it is possible that an application refreshing"]
529 #[doc = " itself on display B will trigger a frame capture on display A."]
530 #[doc = ""]
531 #[doc = " Workarounds include:"]
532 #[doc = " - Using separate X screens"]
533 #[doc = " - Disabling the composite extension"]
534 #[doc = " - Using a compositing manager that properly reports what regions"]
535 #[doc = " are damaged"]
536 #[doc = " - Using NvFBC's diffmaps to find out if the frame changed"]
537 pub bIsNewFrame: NVFBC_BOOL,
538 #[doc = " [out] Frame timestamp"]
539 #[doc = ""]
540 #[doc = " Time in micro seconds when the display server started rendering the"]
541 #[doc = " frame."]
542 #[doc = ""]
543 #[doc = " This does not account for when the frame was captured. If capturing an"]
544 #[doc = " old frame (e.g., bIsNewFrame is NVFBC_FALSE) the reported timestamp"]
545 #[doc = " will reflect the time when the old frame was rendered by the display"]
546 #[doc = " server."]
547 pub ulTimestampUs: u64,
548 pub dwMissedFrames: u32,
549 pub bRequiredPostProcessing: NVFBC_BOOL,
550 pub bDirectCapture: NVFBC_BOOL,
551}
552#[test]
553fn bindgen_test_layout__NVFBC_FRAME_GRAB_INFO() {
554 assert_eq!(
555 ::std::mem::size_of::<_NVFBC_FRAME_GRAB_INFO>(),
556 48usize,
557 concat!("Size of: ", stringify!(_NVFBC_FRAME_GRAB_INFO))
558 );
559 assert_eq!(
560 ::std::mem::align_of::<_NVFBC_FRAME_GRAB_INFO>(),
561 8usize,
562 concat!("Alignment of ", stringify!(_NVFBC_FRAME_GRAB_INFO))
563 );
564 fn test_field_dwWidth() {
565 assert_eq!(
566 unsafe {
567 let uninit = ::std::mem::MaybeUninit::<_NVFBC_FRAME_GRAB_INFO>::uninit();
568 let ptr = uninit.as_ptr();
569 ::std::ptr::addr_of!((*ptr).dwWidth) as usize - ptr as usize
570 },
571 0usize,
572 concat!(
573 "Offset of field: ",
574 stringify!(_NVFBC_FRAME_GRAB_INFO),
575 "::",
576 stringify!(dwWidth)
577 )
578 );
579 }
580 test_field_dwWidth();
581 fn test_field_dwHeight() {
582 assert_eq!(
583 unsafe {
584 let uninit = ::std::mem::MaybeUninit::<_NVFBC_FRAME_GRAB_INFO>::uninit();
585 let ptr = uninit.as_ptr();
586 ::std::ptr::addr_of!((*ptr).dwHeight) as usize - ptr as usize
587 },
588 4usize,
589 concat!(
590 "Offset of field: ",
591 stringify!(_NVFBC_FRAME_GRAB_INFO),
592 "::",
593 stringify!(dwHeight)
594 )
595 );
596 }
597 test_field_dwHeight();
598 fn test_field_dwByteSize() {
599 assert_eq!(
600 unsafe {
601 let uninit = ::std::mem::MaybeUninit::<_NVFBC_FRAME_GRAB_INFO>::uninit();
602 let ptr = uninit.as_ptr();
603 ::std::ptr::addr_of!((*ptr).dwByteSize) as usize - ptr as usize
604 },
605 8usize,
606 concat!(
607 "Offset of field: ",
608 stringify!(_NVFBC_FRAME_GRAB_INFO),
609 "::",
610 stringify!(dwByteSize)
611 )
612 );
613 }
614 test_field_dwByteSize();
615 fn test_field_dwCurrentFrame() {
616 assert_eq!(
617 unsafe {
618 let uninit = ::std::mem::MaybeUninit::<_NVFBC_FRAME_GRAB_INFO>::uninit();
619 let ptr = uninit.as_ptr();
620 ::std::ptr::addr_of!((*ptr).dwCurrentFrame) as usize - ptr as usize
621 },
622 12usize,
623 concat!(
624 "Offset of field: ",
625 stringify!(_NVFBC_FRAME_GRAB_INFO),
626 "::",
627 stringify!(dwCurrentFrame)
628 )
629 );
630 }
631 test_field_dwCurrentFrame();
632 fn test_field_bIsNewFrame() {
633 assert_eq!(
634 unsafe {
635 let uninit = ::std::mem::MaybeUninit::<_NVFBC_FRAME_GRAB_INFO>::uninit();
636 let ptr = uninit.as_ptr();
637 ::std::ptr::addr_of!((*ptr).bIsNewFrame) as usize - ptr as usize
638 },
639 16usize,
640 concat!(
641 "Offset of field: ",
642 stringify!(_NVFBC_FRAME_GRAB_INFO),
643 "::",
644 stringify!(bIsNewFrame)
645 )
646 );
647 }
648 test_field_bIsNewFrame();
649 fn test_field_ulTimestampUs() {
650 assert_eq!(
651 unsafe {
652 let uninit = ::std::mem::MaybeUninit::<_NVFBC_FRAME_GRAB_INFO>::uninit();
653 let ptr = uninit.as_ptr();
654 ::std::ptr::addr_of!((*ptr).ulTimestampUs) as usize - ptr as usize
655 },
656 24usize,
657 concat!(
658 "Offset of field: ",
659 stringify!(_NVFBC_FRAME_GRAB_INFO),
660 "::",
661 stringify!(ulTimestampUs)
662 )
663 );
664 }
665 test_field_ulTimestampUs();
666 fn test_field_dwMissedFrames() {
667 assert_eq!(
668 unsafe {
669 let uninit = ::std::mem::MaybeUninit::<_NVFBC_FRAME_GRAB_INFO>::uninit();
670 let ptr = uninit.as_ptr();
671 ::std::ptr::addr_of!((*ptr).dwMissedFrames) as usize - ptr as usize
672 },
673 32usize,
674 concat!(
675 "Offset of field: ",
676 stringify!(_NVFBC_FRAME_GRAB_INFO),
677 "::",
678 stringify!(dwMissedFrames)
679 )
680 );
681 }
682 test_field_dwMissedFrames();
683 fn test_field_bRequiredPostProcessing() {
684 assert_eq!(
685 unsafe {
686 let uninit = ::std::mem::MaybeUninit::<_NVFBC_FRAME_GRAB_INFO>::uninit();
687 let ptr = uninit.as_ptr();
688 ::std::ptr::addr_of!((*ptr).bRequiredPostProcessing) as usize - ptr as usize
689 },
690 36usize,
691 concat!(
692 "Offset of field: ",
693 stringify!(_NVFBC_FRAME_GRAB_INFO),
694 "::",
695 stringify!(bRequiredPostProcessing)
696 )
697 );
698 }
699 test_field_bRequiredPostProcessing();
700 fn test_field_bDirectCapture() {
701 assert_eq!(
702 unsafe {
703 let uninit = ::std::mem::MaybeUninit::<_NVFBC_FRAME_GRAB_INFO>::uninit();
704 let ptr = uninit.as_ptr();
705 ::std::ptr::addr_of!((*ptr).bDirectCapture) as usize - ptr as usize
706 },
707 40usize,
708 concat!(
709 "Offset of field: ",
710 stringify!(_NVFBC_FRAME_GRAB_INFO),
711 "::",
712 stringify!(bDirectCapture)
713 )
714 );
715 }
716 test_field_bDirectCapture();
717}
718#[doc = " Describes information about a captured frame."]
719pub type NVFBC_FRAME_GRAB_INFO = _NVFBC_FRAME_GRAB_INFO;
720#[doc = " Defines parameters for the CreateHandle() API call."]
721#[repr(C)]
722#[derive(Debug, Copy, Clone)]
723pub struct _NVFBC_CREATE_HANDLE_PARAMS {
724 #[doc = " [in] Must be set to NVFBC_CREATE_HANDLE_PARAMS_VER"]
725 pub dwVersion: u32,
726 #[doc = " [in] Application specific private information passed to the NvFBC"]
727 #[doc = " session."]
728 pub privateData: *const ::std::os::raw::c_void,
729 #[doc = " [in] Size of the application specific private information passed to the"]
730 #[doc = " NvFBC session."]
731 pub privateDataSize: u32,
732 #[doc = " [in] Whether NvFBC should not create and manage its own graphics context"]
733 #[doc = ""]
734 #[doc = " NvFBC internally uses OpenGL to perfom graphics operations on the"]
735 #[doc = " captured frames. By default, NvFBC will create and manage (e.g., make"]
736 #[doc = " current, detect new threads, etc.) its own OpenGL context."]
737 #[doc = ""]
738 #[doc = " If set to NVFBC_TRUE, NvFBC will use the application's context. It will"]
739 #[doc = " be the application's responsibility to make sure that a context is"]
740 #[doc = " current on the thread calling into the NvFBC API."]
741 pub bExternallyManagedContext: NVFBC_BOOL,
742 #[doc = " [in] GLX context"]
743 #[doc = ""]
744 #[doc = " GLX context that NvFBC should use internally to create pixmaps and"]
745 #[doc = " make them current when creating a new capture session."]
746 #[doc = ""]
747 #[doc = " Note: NvFBC expects a context created against a GLX_RGBA_TYPE render"]
748 #[doc = " type."]
749 pub glxCtx: *mut ::std::os::raw::c_void,
750 #[doc = " [in] GLX framebuffer configuration"]
751 #[doc = ""]
752 #[doc = " Framebuffer configuration that was used to create the GLX context, and"]
753 #[doc = " that will be used to create pixmaps internally."]
754 #[doc = ""]
755 #[doc = " Note: NvFBC expects a configuration having at least the following"]
756 #[doc = " attributes:"]
757 #[doc = " GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT"]
758 #[doc = " GLX_BIND_TO_TEXTURE_RGBA_EXT, 1"]
759 #[doc = " GLX_BIND_TO_TEXTURE_TARGETS_EXT, GLX_TEXTURE_2D_BIT_EXT"]
760 pub glxFBConfig: *mut ::std::os::raw::c_void,
761}
762#[test]
763fn bindgen_test_layout__NVFBC_CREATE_HANDLE_PARAMS() {
764 assert_eq!(
765 ::std::mem::size_of::<_NVFBC_CREATE_HANDLE_PARAMS>(),
766 40usize,
767 concat!("Size of: ", stringify!(_NVFBC_CREATE_HANDLE_PARAMS))
768 );
769 assert_eq!(
770 ::std::mem::align_of::<_NVFBC_CREATE_HANDLE_PARAMS>(),
771 8usize,
772 concat!("Alignment of ", stringify!(_NVFBC_CREATE_HANDLE_PARAMS))
773 );
774 fn test_field_dwVersion() {
775 assert_eq!(
776 unsafe {
777 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_HANDLE_PARAMS>::uninit();
778 let ptr = uninit.as_ptr();
779 ::std::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize
780 },
781 0usize,
782 concat!(
783 "Offset of field: ",
784 stringify!(_NVFBC_CREATE_HANDLE_PARAMS),
785 "::",
786 stringify!(dwVersion)
787 )
788 );
789 }
790 test_field_dwVersion();
791 fn test_field_privateData() {
792 assert_eq!(
793 unsafe {
794 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_HANDLE_PARAMS>::uninit();
795 let ptr = uninit.as_ptr();
796 ::std::ptr::addr_of!((*ptr).privateData) as usize - ptr as usize
797 },
798 8usize,
799 concat!(
800 "Offset of field: ",
801 stringify!(_NVFBC_CREATE_HANDLE_PARAMS),
802 "::",
803 stringify!(privateData)
804 )
805 );
806 }
807 test_field_privateData();
808 fn test_field_privateDataSize() {
809 assert_eq!(
810 unsafe {
811 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_HANDLE_PARAMS>::uninit();
812 let ptr = uninit.as_ptr();
813 ::std::ptr::addr_of!((*ptr).privateDataSize) as usize - ptr as usize
814 },
815 16usize,
816 concat!(
817 "Offset of field: ",
818 stringify!(_NVFBC_CREATE_HANDLE_PARAMS),
819 "::",
820 stringify!(privateDataSize)
821 )
822 );
823 }
824 test_field_privateDataSize();
825 fn test_field_bExternallyManagedContext() {
826 assert_eq!(
827 unsafe {
828 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_HANDLE_PARAMS>::uninit();
829 let ptr = uninit.as_ptr();
830 ::std::ptr::addr_of!((*ptr).bExternallyManagedContext) as usize - ptr as usize
831 },
832 20usize,
833 concat!(
834 "Offset of field: ",
835 stringify!(_NVFBC_CREATE_HANDLE_PARAMS),
836 "::",
837 stringify!(bExternallyManagedContext)
838 )
839 );
840 }
841 test_field_bExternallyManagedContext();
842 fn test_field_glxCtx() {
843 assert_eq!(
844 unsafe {
845 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_HANDLE_PARAMS>::uninit();
846 let ptr = uninit.as_ptr();
847 ::std::ptr::addr_of!((*ptr).glxCtx) as usize - ptr as usize
848 },
849 24usize,
850 concat!(
851 "Offset of field: ",
852 stringify!(_NVFBC_CREATE_HANDLE_PARAMS),
853 "::",
854 stringify!(glxCtx)
855 )
856 );
857 }
858 test_field_glxCtx();
859 fn test_field_glxFBConfig() {
860 assert_eq!(
861 unsafe {
862 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_HANDLE_PARAMS>::uninit();
863 let ptr = uninit.as_ptr();
864 ::std::ptr::addr_of!((*ptr).glxFBConfig) as usize - ptr as usize
865 },
866 32usize,
867 concat!(
868 "Offset of field: ",
869 stringify!(_NVFBC_CREATE_HANDLE_PARAMS),
870 "::",
871 stringify!(glxFBConfig)
872 )
873 );
874 }
875 test_field_glxFBConfig();
876}
877#[doc = " Defines parameters for the CreateHandle() API call."]
878pub type NVFBC_CREATE_HANDLE_PARAMS = _NVFBC_CREATE_HANDLE_PARAMS;
879#[doc = " Defines parameters for the ::NvFBCDestroyHandle() API call."]
880#[repr(C)]
881#[derive(Debug, Copy, Clone)]
882pub struct _NVFBC_DESTROY_HANDLE_PARAMS {
883 #[doc = " [in] Must be set to NVFBC_DESTROY_HANDLE_PARAMS_VER"]
884 pub dwVersion: u32,
885}
886#[test]
887fn bindgen_test_layout__NVFBC_DESTROY_HANDLE_PARAMS() {
888 assert_eq!(
889 ::std::mem::size_of::<_NVFBC_DESTROY_HANDLE_PARAMS>(),
890 4usize,
891 concat!("Size of: ", stringify!(_NVFBC_DESTROY_HANDLE_PARAMS))
892 );
893 assert_eq!(
894 ::std::mem::align_of::<_NVFBC_DESTROY_HANDLE_PARAMS>(),
895 4usize,
896 concat!("Alignment of ", stringify!(_NVFBC_DESTROY_HANDLE_PARAMS))
897 );
898 fn test_field_dwVersion() {
899 assert_eq!(
900 unsafe {
901 let uninit = ::std::mem::MaybeUninit::<_NVFBC_DESTROY_HANDLE_PARAMS>::uninit();
902 let ptr = uninit.as_ptr();
903 ::std::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize
904 },
905 0usize,
906 concat!(
907 "Offset of field: ",
908 stringify!(_NVFBC_DESTROY_HANDLE_PARAMS),
909 "::",
910 stringify!(dwVersion)
911 )
912 );
913 }
914 test_field_dwVersion();
915}
916#[doc = " Defines parameters for the ::NvFBCDestroyHandle() API call."]
917pub type NVFBC_DESTROY_HANDLE_PARAMS = _NVFBC_DESTROY_HANDLE_PARAMS;
918#[doc = " Describes an RandR output."]
919#[doc = ""]
920#[doc = " Filling this structure relies on the XRandR extension. This feature cannot"]
921#[doc = " be used if the extension is missing or its version is below the requirements."]
922#[doc = ""]
923#[doc = " \\see Requirements"]
924#[repr(C)]
925#[derive(Debug, Copy, Clone)]
926pub struct _NVFBC_OUTPUT {
927 #[doc = " Identifier of the RandR output."]
928 pub dwId: u32,
929 #[doc = " Name of the RandR output, as reported by tools such as xrandr(1)."]
930 #[doc = ""]
931 #[doc = " Example: \"DVI-I-0\""]
932 pub name: [::std::os::raw::c_char; 128usize],
933 #[doc = " Region of the X screen tracked by the RandR CRTC driving this RandR"]
934 #[doc = " output."]
935 pub trackedBox: NVFBC_BOX,
936}
937#[test]
938fn bindgen_test_layout__NVFBC_OUTPUT() {
939 assert_eq!(
940 ::std::mem::size_of::<_NVFBC_OUTPUT>(),
941 148usize,
942 concat!("Size of: ", stringify!(_NVFBC_OUTPUT))
943 );
944 assert_eq!(
945 ::std::mem::align_of::<_NVFBC_OUTPUT>(),
946 4usize,
947 concat!("Alignment of ", stringify!(_NVFBC_OUTPUT))
948 );
949 fn test_field_dwId() {
950 assert_eq!(
951 unsafe {
952 let uninit = ::std::mem::MaybeUninit::<_NVFBC_OUTPUT>::uninit();
953 let ptr = uninit.as_ptr();
954 ::std::ptr::addr_of!((*ptr).dwId) as usize - ptr as usize
955 },
956 0usize,
957 concat!("Offset of field: ", stringify!(_NVFBC_OUTPUT), "::", stringify!(dwId))
958 );
959 }
960 test_field_dwId();
961 fn test_field_name() {
962 assert_eq!(
963 unsafe {
964 let uninit = ::std::mem::MaybeUninit::<_NVFBC_OUTPUT>::uninit();
965 let ptr = uninit.as_ptr();
966 ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize
967 },
968 4usize,
969 concat!("Offset of field: ", stringify!(_NVFBC_OUTPUT), "::", stringify!(name))
970 );
971 }
972 test_field_name();
973 fn test_field_trackedBox() {
974 assert_eq!(
975 unsafe {
976 let uninit = ::std::mem::MaybeUninit::<_NVFBC_OUTPUT>::uninit();
977 let ptr = uninit.as_ptr();
978 ::std::ptr::addr_of!((*ptr).trackedBox) as usize - ptr as usize
979 },
980 132usize,
981 concat!(
982 "Offset of field: ",
983 stringify!(_NVFBC_OUTPUT),
984 "::",
985 stringify!(trackedBox)
986 )
987 );
988 }
989 test_field_trackedBox();
990}
991#[doc = " Describes an RandR output."]
992#[doc = ""]
993#[doc = " Filling this structure relies on the XRandR extension. This feature cannot"]
994#[doc = " be used if the extension is missing or its version is below the requirements."]
995#[doc = ""]
996#[doc = " \\see Requirements"]
997pub type NVFBC_RANDR_OUTPUT_INFO = _NVFBC_OUTPUT;
998#[doc = " Defines parameters for the ::NvFBCGetStatus() API call."]
999#[repr(C)]
1000#[derive(Debug, Copy, Clone)]
1001pub struct _NVFBC_GET_STATUS_PARAMS {
1002 #[doc = " [in] Must be set to NVFBC_GET_STATUS_PARAMS_VER"]
1003 pub dwVersion: u32,
1004 #[doc = " [out] Whether or not framebuffer capture is supported by the graphics"]
1005 #[doc = " driver."]
1006 pub bIsCapturePossible: NVFBC_BOOL,
1007 #[doc = " [out] Whether or not there is already a capture session on this system."]
1008 pub bCurrentlyCapturing: NVFBC_BOOL,
1009 #[doc = " [out] Whether or not it is possible to create a capture session on this"]
1010 #[doc = " system."]
1011 pub bCanCreateNow: NVFBC_BOOL,
1012 #[doc = " [out] Size of the X screen (framebuffer)."]
1013 pub screenSize: NVFBC_SIZE,
1014 #[doc = " [out] Whether the XRandR extension is available."]
1015 #[doc = ""]
1016 #[doc = " If this extension is not available then it is not possible to have"]
1017 #[doc = " information about RandR outputs."]
1018 pub bXRandRAvailable: NVFBC_BOOL,
1019 #[doc = " [out] Array of outputs connected to the X screen."]
1020 #[doc = ""]
1021 #[doc = " An application can track a specific output by specifying its ID when"]
1022 #[doc = " creating a capture session."]
1023 #[doc = ""]
1024 #[doc = " Only if XRandR is available."]
1025 pub outputs: [NVFBC_RANDR_OUTPUT_INFO; 5usize],
1026 #[doc = " [out] Number of outputs connected to the X screen."]
1027 #[doc = ""]
1028 #[doc = " This must be used to parse the array of connected outputs."]
1029 #[doc = ""]
1030 #[doc = " Only if XRandR is available."]
1031 pub dwOutputNum: u32,
1032 #[doc = " [out] Version of the NvFBC library running on this system."]
1033 pub dwNvFBCVersion: u32,
1034 #[doc = " [out] Whether the X server is currently in modeset."]
1035 #[doc = ""]
1036 #[doc = " When the X server is in modeset, it must give up all its video"]
1037 #[doc = " memory allocations. It is not possible to create a capture"]
1038 #[doc = " session until the modeset is over."]
1039 #[doc = ""]
1040 #[doc = " Note that VT-switches are considered modesets."]
1041 pub bInModeset: NVFBC_BOOL,
1042}
1043#[test]
1044fn bindgen_test_layout__NVFBC_GET_STATUS_PARAMS() {
1045 assert_eq!(
1046 ::std::mem::size_of::<_NVFBC_GET_STATUS_PARAMS>(),
1047 780usize,
1048 concat!("Size of: ", stringify!(_NVFBC_GET_STATUS_PARAMS))
1049 );
1050 assert_eq!(
1051 ::std::mem::align_of::<_NVFBC_GET_STATUS_PARAMS>(),
1052 4usize,
1053 concat!("Alignment of ", stringify!(_NVFBC_GET_STATUS_PARAMS))
1054 );
1055 fn test_field_dwVersion() {
1056 assert_eq!(
1057 unsafe {
1058 let uninit = ::std::mem::MaybeUninit::<_NVFBC_GET_STATUS_PARAMS>::uninit();
1059 let ptr = uninit.as_ptr();
1060 ::std::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize
1061 },
1062 0usize,
1063 concat!(
1064 "Offset of field: ",
1065 stringify!(_NVFBC_GET_STATUS_PARAMS),
1066 "::",
1067 stringify!(dwVersion)
1068 )
1069 );
1070 }
1071 test_field_dwVersion();
1072 fn test_field_bIsCapturePossible() {
1073 assert_eq!(
1074 unsafe {
1075 let uninit = ::std::mem::MaybeUninit::<_NVFBC_GET_STATUS_PARAMS>::uninit();
1076 let ptr = uninit.as_ptr();
1077 ::std::ptr::addr_of!((*ptr).bIsCapturePossible) as usize - ptr as usize
1078 },
1079 4usize,
1080 concat!(
1081 "Offset of field: ",
1082 stringify!(_NVFBC_GET_STATUS_PARAMS),
1083 "::",
1084 stringify!(bIsCapturePossible)
1085 )
1086 );
1087 }
1088 test_field_bIsCapturePossible();
1089 fn test_field_bCurrentlyCapturing() {
1090 assert_eq!(
1091 unsafe {
1092 let uninit = ::std::mem::MaybeUninit::<_NVFBC_GET_STATUS_PARAMS>::uninit();
1093 let ptr = uninit.as_ptr();
1094 ::std::ptr::addr_of!((*ptr).bCurrentlyCapturing) as usize - ptr as usize
1095 },
1096 8usize,
1097 concat!(
1098 "Offset of field: ",
1099 stringify!(_NVFBC_GET_STATUS_PARAMS),
1100 "::",
1101 stringify!(bCurrentlyCapturing)
1102 )
1103 );
1104 }
1105 test_field_bCurrentlyCapturing();
1106 fn test_field_bCanCreateNow() {
1107 assert_eq!(
1108 unsafe {
1109 let uninit = ::std::mem::MaybeUninit::<_NVFBC_GET_STATUS_PARAMS>::uninit();
1110 let ptr = uninit.as_ptr();
1111 ::std::ptr::addr_of!((*ptr).bCanCreateNow) as usize - ptr as usize
1112 },
1113 12usize,
1114 concat!(
1115 "Offset of field: ",
1116 stringify!(_NVFBC_GET_STATUS_PARAMS),
1117 "::",
1118 stringify!(bCanCreateNow)
1119 )
1120 );
1121 }
1122 test_field_bCanCreateNow();
1123 fn test_field_screenSize() {
1124 assert_eq!(
1125 unsafe {
1126 let uninit = ::std::mem::MaybeUninit::<_NVFBC_GET_STATUS_PARAMS>::uninit();
1127 let ptr = uninit.as_ptr();
1128 ::std::ptr::addr_of!((*ptr).screenSize) as usize - ptr as usize
1129 },
1130 16usize,
1131 concat!(
1132 "Offset of field: ",
1133 stringify!(_NVFBC_GET_STATUS_PARAMS),
1134 "::",
1135 stringify!(screenSize)
1136 )
1137 );
1138 }
1139 test_field_screenSize();
1140 fn test_field_bXRandRAvailable() {
1141 assert_eq!(
1142 unsafe {
1143 let uninit = ::std::mem::MaybeUninit::<_NVFBC_GET_STATUS_PARAMS>::uninit();
1144 let ptr = uninit.as_ptr();
1145 ::std::ptr::addr_of!((*ptr).bXRandRAvailable) as usize - ptr as usize
1146 },
1147 24usize,
1148 concat!(
1149 "Offset of field: ",
1150 stringify!(_NVFBC_GET_STATUS_PARAMS),
1151 "::",
1152 stringify!(bXRandRAvailable)
1153 )
1154 );
1155 }
1156 test_field_bXRandRAvailable();
1157 fn test_field_outputs() {
1158 assert_eq!(
1159 unsafe {
1160 let uninit = ::std::mem::MaybeUninit::<_NVFBC_GET_STATUS_PARAMS>::uninit();
1161 let ptr = uninit.as_ptr();
1162 ::std::ptr::addr_of!((*ptr).outputs) as usize - ptr as usize
1163 },
1164 28usize,
1165 concat!(
1166 "Offset of field: ",
1167 stringify!(_NVFBC_GET_STATUS_PARAMS),
1168 "::",
1169 stringify!(outputs)
1170 )
1171 );
1172 }
1173 test_field_outputs();
1174 fn test_field_dwOutputNum() {
1175 assert_eq!(
1176 unsafe {
1177 let uninit = ::std::mem::MaybeUninit::<_NVFBC_GET_STATUS_PARAMS>::uninit();
1178 let ptr = uninit.as_ptr();
1179 ::std::ptr::addr_of!((*ptr).dwOutputNum) as usize - ptr as usize
1180 },
1181 768usize,
1182 concat!(
1183 "Offset of field: ",
1184 stringify!(_NVFBC_GET_STATUS_PARAMS),
1185 "::",
1186 stringify!(dwOutputNum)
1187 )
1188 );
1189 }
1190 test_field_dwOutputNum();
1191 fn test_field_dwNvFBCVersion() {
1192 assert_eq!(
1193 unsafe {
1194 let uninit = ::std::mem::MaybeUninit::<_NVFBC_GET_STATUS_PARAMS>::uninit();
1195 let ptr = uninit.as_ptr();
1196 ::std::ptr::addr_of!((*ptr).dwNvFBCVersion) as usize - ptr as usize
1197 },
1198 772usize,
1199 concat!(
1200 "Offset of field: ",
1201 stringify!(_NVFBC_GET_STATUS_PARAMS),
1202 "::",
1203 stringify!(dwNvFBCVersion)
1204 )
1205 );
1206 }
1207 test_field_dwNvFBCVersion();
1208 fn test_field_bInModeset() {
1209 assert_eq!(
1210 unsafe {
1211 let uninit = ::std::mem::MaybeUninit::<_NVFBC_GET_STATUS_PARAMS>::uninit();
1212 let ptr = uninit.as_ptr();
1213 ::std::ptr::addr_of!((*ptr).bInModeset) as usize - ptr as usize
1214 },
1215 776usize,
1216 concat!(
1217 "Offset of field: ",
1218 stringify!(_NVFBC_GET_STATUS_PARAMS),
1219 "::",
1220 stringify!(bInModeset)
1221 )
1222 );
1223 }
1224 test_field_bInModeset();
1225}
1226#[doc = " Defines parameters for the ::NvFBCGetStatus() API call."]
1227pub type NVFBC_GET_STATUS_PARAMS = _NVFBC_GET_STATUS_PARAMS;
1228#[doc = " Defines parameters for the ::NvFBCCreateCaptureSession() API call."]
1229#[repr(C)]
1230#[derive(Debug, Copy, Clone)]
1231pub struct _NVFBC_CREATE_CAPTURE_SESSION_PARAMS {
1232 #[doc = " [in] Must be set to NVFBC_CREATE_CAPTURE_SESSION_PARAMS_VER"]
1233 pub dwVersion: u32,
1234 #[doc = " [in] Desired capture type."]
1235 #[doc = ""]
1236 #[doc = " Note that when specyfing ::NVFBC_CAPTURE_SHARED_CUDA NvFBC will try to"]
1237 #[doc = " dlopen() the corresponding libraries. This means that NvFBC can run on"]
1238 #[doc = " a system without the CUDA library since it does not link against them."]
1239 pub eCaptureType: NVFBC_CAPTURE_TYPE,
1240 #[doc = " [in] What region of the framebuffer should be tracked."]
1241 pub eTrackingType: NVFBC_TRACKING_TYPE,
1242 #[doc = " [in] ID of the output to track if eTrackingType is set to"]
1243 #[doc = " ::NVFBC_TRACKING_OUTPUT."]
1244 pub dwOutputId: u32,
1245 #[doc = " [in] Crop the tracked region."]
1246 #[doc = ""]
1247 #[doc = " The coordinates are relative to the tracked region."]
1248 #[doc = ""]
1249 #[doc = " It can be set to 0 to capture the entire tracked region."]
1250 pub captureBox: NVFBC_BOX,
1251 #[doc = " [in] Desired size of the captured frame."]
1252 #[doc = ""]
1253 #[doc = " This parameter allow to scale the captured frame."]
1254 #[doc = ""]
1255 #[doc = " It can be set to 0 to disable frame resizing."]
1256 pub frameSize: NVFBC_SIZE,
1257 #[doc = " [in] Whether the mouse cursor should be composited to the frame."]
1258 #[doc = ""]
1259 #[doc = " Disabling the cursor will not generate new frames when only the cursor"]
1260 #[doc = " is moved."]
1261 pub bWithCursor: NVFBC_BOOL,
1262 #[doc = " [in] Whether NvFBC should not attempt to recover from modesets."]
1263 #[doc = ""]
1264 #[doc = " NvFBC is able to detect when a modeset event occured and can automatically"]
1265 #[doc = " re-create a capture session with the same settings as before, then resume"]
1266 #[doc = " its frame capture session transparently."]
1267 #[doc = ""]
1268 #[doc = " This option allows to disable this behavior. NVFBC_ERR_MUST_RECREATE"]
1269 #[doc = " will be returned in that case."]
1270 #[doc = ""]
1271 #[doc = " It can be useful in the cases when an application needs to do some work"]
1272 #[doc = " between setting up a capture and grabbing the first frame."]
1273 #[doc = ""]
1274 #[doc = " For example: an application using the ToGL interface needs to register"]
1275 #[doc = " resources with EncodeAPI prior to encoding frames."]
1276 #[doc = ""]
1277 #[doc = " Note that during modeset recovery, NvFBC will try to re-create the"]
1278 #[doc = " capture session every second until it succeeds."]
1279 pub bDisableAutoModesetRecovery: NVFBC_BOOL,
1280 #[doc = " [in] Whether NvFBC should round the requested frameSize."]
1281 #[doc = ""]
1282 #[doc = " When disabled, NvFBC will not attempt to round the requested resolution."]
1283 #[doc = ""]
1284 #[doc = " However, some pixel formats have resolution requirements. E.g., YUV/NV"]
1285 #[doc = " formats must have a width being a multiple of 4, and a height being a"]
1286 #[doc = " multiple of 2. RGB formats don't have such requirements."]
1287 #[doc = ""]
1288 #[doc = " If the resolution doesn't meet the requirements of the format, then NvFBC"]
1289 #[doc = " will fail at setup time."]
1290 #[doc = ""]
1291 #[doc = " When enabled, NvFBC will round the requested width to the next multiple"]
1292 #[doc = " of 4 and the requested height to the next multiple of 2."]
1293 #[doc = ""]
1294 #[doc = " In this case, requesting any resolution will always work with every"]
1295 #[doc = " format. However, an NvFBC client must be prepared to handle the case"]
1296 #[doc = " where the requested resolution is different than the captured resolution."]
1297 #[doc = ""]
1298 #[doc = " NVFBC_FRAME_GRAB_INFO::dwWidth and NVFBC_FRAME_GRAB_INFO::dwHeight should"]
1299 #[doc = " always be used for getting information about captured frames."]
1300 pub bRoundFrameSize: NVFBC_BOOL,
1301 #[doc = " [in] Rate in ms at which the display server generates new frames"]
1302 #[doc = ""]
1303 #[doc = " This controls the frequency at which the display server will generate"]
1304 #[doc = " new frames if new content is available. This effectively controls the"]
1305 #[doc = " capture rate when using blocking calls."]
1306 #[doc = ""]
1307 #[doc = " Note that lower values will increase the CPU and GPU loads."]
1308 #[doc = ""]
1309 #[doc = " The default value is 16ms (~ 60 Hz)."]
1310 pub dwSamplingRateMs: u32,
1311 #[doc = " [in] Enable push model for frame capture"]
1312 #[doc = ""]
1313 #[doc = " When set to NVFBC_TRUE, the display server will generate frames whenever"]
1314 #[doc = " it receives a damage event from applications."]
1315 #[doc = ""]
1316 #[doc = " Setting this to NVFBC_TRUE will ignore ::dwSamplingRateMs."]
1317 #[doc = ""]
1318 #[doc = " Using push model with the NVFBC_*_GRAB_FLAGS_NOWAIT_IF_NEW_FRAME_READY"]
1319 #[doc = " capture flag should guarantee the shortest amount of time between an"]
1320 #[doc = " application rendering a frame and an NvFBC client capturing it, provided"]
1321 #[doc = " that the NvFBC client is able to process the frames quickly enough."]
1322 #[doc = ""]
1323 #[doc = " Note that applications running at high frame rates will increase CPU and"]
1324 #[doc = " GPU loads."]
1325 pub bPushModel: NVFBC_BOOL,
1326 #[doc = " [in] Allow direct capture"]
1327 #[doc = ""]
1328 #[doc = " Direct capture allows NvFBC to attach itself to a fullscreen graphics"]
1329 #[doc = " application. Whenever that application presents a frame, it makes a copy"]
1330 #[doc = " of it directly into a buffer owned by NvFBC thus bypassing the X server."]
1331 #[doc = ""]
1332 #[doc = " When direct capture is *not* enabled, the NVIDIA X driver generates a"]
1333 #[doc = " frame for NvFBC when it receives a damage event from an application if push"]
1334 #[doc = " model is enabled, or periodically checks if there are any pending damage"]
1335 #[doc = " events otherwise (see NVFBC_CREATE_CAPTURE_SESSION_PARAMS::dwSamplingRateMs)."]
1336 #[doc = ""]
1337 #[doc = " Direct capture is possible under the following conditions:"]
1338 #[doc = " - Direct capture is allowed"]
1339 #[doc = " - Push model is enabled (see NVFBC_CREATE_CAPTURE_SESSION_PARAMS::bPushModel)"]
1340 #[doc = " - The mouse cursor is not composited (see NVFBC_CREATE_CAPTURE_SESSION_PARAMS::bWithCursor)"]
1341 #[doc = " - No viewport transformation is required. This happens when the remote"]
1342 #[doc = " desktop is e.g. rotated."]
1343 #[doc = ""]
1344 #[doc = " When direct capture is possible, NvFBC will automatically attach itself"]
1345 #[doc = " to a fullscreen unoccluded application, if such exists."]
1346 #[doc = ""]
1347 #[doc = " Notes:"]
1348 #[doc = " - This includes compositing desktops such as GNOME (e.g., gnome-shell"]
1349 #[doc = " is the fullscreen unoccluded application)."]
1350 #[doc = " - There can be only one fullscreen unoccluded application at a time."]
1351 #[doc = " - The NVIDIA X driver monitors which application qualifies or no"]
1352 #[doc = " longer qualifies."]
1353 #[doc = ""]
1354 #[doc = " For example, if a fullscreen application is launched in GNOME, NvFBC will"]
1355 #[doc = " detach from gnome-shell and attach to that application."]
1356 #[doc = ""]
1357 #[doc = " Attaching and detaching happens automatically from the perspective of an"]
1358 #[doc = " NvFBC client. When detaching from an application, the X driver will"]
1359 #[doc = " transparently resume generating frames for NvFBC."]
1360 #[doc = ""]
1361 #[doc = " An application can know whether a given frame was obtained through"]
1362 #[doc = " direct capture by checking NVFBC_FRAME_GRAB_INFO::bDirectCapture."]
1363 pub bAllowDirectCapture: NVFBC_BOOL,
1364}
1365#[test]
1366fn bindgen_test_layout__NVFBC_CREATE_CAPTURE_SESSION_PARAMS() {
1367 assert_eq!(
1368 ::std::mem::size_of::<_NVFBC_CREATE_CAPTURE_SESSION_PARAMS>(),
1369 64usize,
1370 concat!("Size of: ", stringify!(_NVFBC_CREATE_CAPTURE_SESSION_PARAMS))
1371 );
1372 assert_eq!(
1373 ::std::mem::align_of::<_NVFBC_CREATE_CAPTURE_SESSION_PARAMS>(),
1374 4usize,
1375 concat!("Alignment of ", stringify!(_NVFBC_CREATE_CAPTURE_SESSION_PARAMS))
1376 );
1377 fn test_field_dwVersion() {
1378 assert_eq!(
1379 unsafe {
1380 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_CAPTURE_SESSION_PARAMS>::uninit();
1381 let ptr = uninit.as_ptr();
1382 ::std::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize
1383 },
1384 0usize,
1385 concat!(
1386 "Offset of field: ",
1387 stringify!(_NVFBC_CREATE_CAPTURE_SESSION_PARAMS),
1388 "::",
1389 stringify!(dwVersion)
1390 )
1391 );
1392 }
1393 test_field_dwVersion();
1394 fn test_field_eCaptureType() {
1395 assert_eq!(
1396 unsafe {
1397 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_CAPTURE_SESSION_PARAMS>::uninit();
1398 let ptr = uninit.as_ptr();
1399 ::std::ptr::addr_of!((*ptr).eCaptureType) as usize - ptr as usize
1400 },
1401 4usize,
1402 concat!(
1403 "Offset of field: ",
1404 stringify!(_NVFBC_CREATE_CAPTURE_SESSION_PARAMS),
1405 "::",
1406 stringify!(eCaptureType)
1407 )
1408 );
1409 }
1410 test_field_eCaptureType();
1411 fn test_field_eTrackingType() {
1412 assert_eq!(
1413 unsafe {
1414 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_CAPTURE_SESSION_PARAMS>::uninit();
1415 let ptr = uninit.as_ptr();
1416 ::std::ptr::addr_of!((*ptr).eTrackingType) as usize - ptr as usize
1417 },
1418 8usize,
1419 concat!(
1420 "Offset of field: ",
1421 stringify!(_NVFBC_CREATE_CAPTURE_SESSION_PARAMS),
1422 "::",
1423 stringify!(eTrackingType)
1424 )
1425 );
1426 }
1427 test_field_eTrackingType();
1428 fn test_field_dwOutputId() {
1429 assert_eq!(
1430 unsafe {
1431 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_CAPTURE_SESSION_PARAMS>::uninit();
1432 let ptr = uninit.as_ptr();
1433 ::std::ptr::addr_of!((*ptr).dwOutputId) as usize - ptr as usize
1434 },
1435 12usize,
1436 concat!(
1437 "Offset of field: ",
1438 stringify!(_NVFBC_CREATE_CAPTURE_SESSION_PARAMS),
1439 "::",
1440 stringify!(dwOutputId)
1441 )
1442 );
1443 }
1444 test_field_dwOutputId();
1445 fn test_field_captureBox() {
1446 assert_eq!(
1447 unsafe {
1448 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_CAPTURE_SESSION_PARAMS>::uninit();
1449 let ptr = uninit.as_ptr();
1450 ::std::ptr::addr_of!((*ptr).captureBox) as usize - ptr as usize
1451 },
1452 16usize,
1453 concat!(
1454 "Offset of field: ",
1455 stringify!(_NVFBC_CREATE_CAPTURE_SESSION_PARAMS),
1456 "::",
1457 stringify!(captureBox)
1458 )
1459 );
1460 }
1461 test_field_captureBox();
1462 fn test_field_frameSize() {
1463 assert_eq!(
1464 unsafe {
1465 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_CAPTURE_SESSION_PARAMS>::uninit();
1466 let ptr = uninit.as_ptr();
1467 ::std::ptr::addr_of!((*ptr).frameSize) as usize - ptr as usize
1468 },
1469 32usize,
1470 concat!(
1471 "Offset of field: ",
1472 stringify!(_NVFBC_CREATE_CAPTURE_SESSION_PARAMS),
1473 "::",
1474 stringify!(frameSize)
1475 )
1476 );
1477 }
1478 test_field_frameSize();
1479 fn test_field_bWithCursor() {
1480 assert_eq!(
1481 unsafe {
1482 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_CAPTURE_SESSION_PARAMS>::uninit();
1483 let ptr = uninit.as_ptr();
1484 ::std::ptr::addr_of!((*ptr).bWithCursor) as usize - ptr as usize
1485 },
1486 40usize,
1487 concat!(
1488 "Offset of field: ",
1489 stringify!(_NVFBC_CREATE_CAPTURE_SESSION_PARAMS),
1490 "::",
1491 stringify!(bWithCursor)
1492 )
1493 );
1494 }
1495 test_field_bWithCursor();
1496 fn test_field_bDisableAutoModesetRecovery() {
1497 assert_eq!(
1498 unsafe {
1499 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_CAPTURE_SESSION_PARAMS>::uninit();
1500 let ptr = uninit.as_ptr();
1501 ::std::ptr::addr_of!((*ptr).bDisableAutoModesetRecovery) as usize - ptr as usize
1502 },
1503 44usize,
1504 concat!(
1505 "Offset of field: ",
1506 stringify!(_NVFBC_CREATE_CAPTURE_SESSION_PARAMS),
1507 "::",
1508 stringify!(bDisableAutoModesetRecovery)
1509 )
1510 );
1511 }
1512 test_field_bDisableAutoModesetRecovery();
1513 fn test_field_bRoundFrameSize() {
1514 assert_eq!(
1515 unsafe {
1516 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_CAPTURE_SESSION_PARAMS>::uninit();
1517 let ptr = uninit.as_ptr();
1518 ::std::ptr::addr_of!((*ptr).bRoundFrameSize) as usize - ptr as usize
1519 },
1520 48usize,
1521 concat!(
1522 "Offset of field: ",
1523 stringify!(_NVFBC_CREATE_CAPTURE_SESSION_PARAMS),
1524 "::",
1525 stringify!(bRoundFrameSize)
1526 )
1527 );
1528 }
1529 test_field_bRoundFrameSize();
1530 fn test_field_dwSamplingRateMs() {
1531 assert_eq!(
1532 unsafe {
1533 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_CAPTURE_SESSION_PARAMS>::uninit();
1534 let ptr = uninit.as_ptr();
1535 ::std::ptr::addr_of!((*ptr).dwSamplingRateMs) as usize - ptr as usize
1536 },
1537 52usize,
1538 concat!(
1539 "Offset of field: ",
1540 stringify!(_NVFBC_CREATE_CAPTURE_SESSION_PARAMS),
1541 "::",
1542 stringify!(dwSamplingRateMs)
1543 )
1544 );
1545 }
1546 test_field_dwSamplingRateMs();
1547 fn test_field_bPushModel() {
1548 assert_eq!(
1549 unsafe {
1550 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_CAPTURE_SESSION_PARAMS>::uninit();
1551 let ptr = uninit.as_ptr();
1552 ::std::ptr::addr_of!((*ptr).bPushModel) as usize - ptr as usize
1553 },
1554 56usize,
1555 concat!(
1556 "Offset of field: ",
1557 stringify!(_NVFBC_CREATE_CAPTURE_SESSION_PARAMS),
1558 "::",
1559 stringify!(bPushModel)
1560 )
1561 );
1562 }
1563 test_field_bPushModel();
1564 fn test_field_bAllowDirectCapture() {
1565 assert_eq!(
1566 unsafe {
1567 let uninit = ::std::mem::MaybeUninit::<_NVFBC_CREATE_CAPTURE_SESSION_PARAMS>::uninit();
1568 let ptr = uninit.as_ptr();
1569 ::std::ptr::addr_of!((*ptr).bAllowDirectCapture) as usize - ptr as usize
1570 },
1571 60usize,
1572 concat!(
1573 "Offset of field: ",
1574 stringify!(_NVFBC_CREATE_CAPTURE_SESSION_PARAMS),
1575 "::",
1576 stringify!(bAllowDirectCapture)
1577 )
1578 );
1579 }
1580 test_field_bAllowDirectCapture();
1581}
1582#[doc = " Defines parameters for the ::NvFBCCreateCaptureSession() API call."]
1583pub type NVFBC_CREATE_CAPTURE_SESSION_PARAMS = _NVFBC_CREATE_CAPTURE_SESSION_PARAMS;
1584#[doc = " Defines parameters for the ::NvFBCDestroyCaptureSession() API call."]
1585#[repr(C)]
1586#[derive(Debug, Copy, Clone)]
1587pub struct _NVFBC_DESTROY_CAPTURE_SESSION_PARAMS {
1588 #[doc = " [in] Must be set to NVFBC_DESTROY_CAPTURE_SESSION_PARAMS_VER"]
1589 pub dwVersion: u32,
1590}
1591#[test]
1592fn bindgen_test_layout__NVFBC_DESTROY_CAPTURE_SESSION_PARAMS() {
1593 assert_eq!(
1594 ::std::mem::size_of::<_NVFBC_DESTROY_CAPTURE_SESSION_PARAMS>(),
1595 4usize,
1596 concat!("Size of: ", stringify!(_NVFBC_DESTROY_CAPTURE_SESSION_PARAMS))
1597 );
1598 assert_eq!(
1599 ::std::mem::align_of::<_NVFBC_DESTROY_CAPTURE_SESSION_PARAMS>(),
1600 4usize,
1601 concat!("Alignment of ", stringify!(_NVFBC_DESTROY_CAPTURE_SESSION_PARAMS))
1602 );
1603 fn test_field_dwVersion() {
1604 assert_eq!(
1605 unsafe {
1606 let uninit = ::std::mem::MaybeUninit::<_NVFBC_DESTROY_CAPTURE_SESSION_PARAMS>::uninit();
1607 let ptr = uninit.as_ptr();
1608 ::std::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize
1609 },
1610 0usize,
1611 concat!(
1612 "Offset of field: ",
1613 stringify!(_NVFBC_DESTROY_CAPTURE_SESSION_PARAMS),
1614 "::",
1615 stringify!(dwVersion)
1616 )
1617 );
1618 }
1619 test_field_dwVersion();
1620}
1621#[doc = " Defines parameters for the ::NvFBCDestroyCaptureSession() API call."]
1622pub type NVFBC_DESTROY_CAPTURE_SESSION_PARAMS = _NVFBC_DESTROY_CAPTURE_SESSION_PARAMS;
1623#[doc = " Defines parameters for the ::NvFBCBindContext() API call."]
1624#[repr(C)]
1625#[derive(Debug, Copy, Clone)]
1626pub struct _NVFBC_BIND_CONTEXT_PARAMS {
1627 #[doc = " [in] Must be set to NVFBC_BIND_CONTEXT_PARAMS_VER"]
1628 pub dwVersion: u32,
1629}
1630#[test]
1631fn bindgen_test_layout__NVFBC_BIND_CONTEXT_PARAMS() {
1632 assert_eq!(
1633 ::std::mem::size_of::<_NVFBC_BIND_CONTEXT_PARAMS>(),
1634 4usize,
1635 concat!("Size of: ", stringify!(_NVFBC_BIND_CONTEXT_PARAMS))
1636 );
1637 assert_eq!(
1638 ::std::mem::align_of::<_NVFBC_BIND_CONTEXT_PARAMS>(),
1639 4usize,
1640 concat!("Alignment of ", stringify!(_NVFBC_BIND_CONTEXT_PARAMS))
1641 );
1642 fn test_field_dwVersion() {
1643 assert_eq!(
1644 unsafe {
1645 let uninit = ::std::mem::MaybeUninit::<_NVFBC_BIND_CONTEXT_PARAMS>::uninit();
1646 let ptr = uninit.as_ptr();
1647 ::std::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize
1648 },
1649 0usize,
1650 concat!(
1651 "Offset of field: ",
1652 stringify!(_NVFBC_BIND_CONTEXT_PARAMS),
1653 "::",
1654 stringify!(dwVersion)
1655 )
1656 );
1657 }
1658 test_field_dwVersion();
1659}
1660#[doc = " Defines parameters for the ::NvFBCBindContext() API call."]
1661pub type NVFBC_BIND_CONTEXT_PARAMS = _NVFBC_BIND_CONTEXT_PARAMS;
1662#[doc = " Defines parameters for the ::NvFBCReleaseContext() API call."]
1663#[repr(C)]
1664#[derive(Debug, Copy, Clone)]
1665pub struct _NVFBC_RELEASE_CONTEXT_PARAMS {
1666 #[doc = " [in] Must be set to NVFBC_RELEASE_CONTEXT_PARAMS_VER"]
1667 pub dwVersion: u32,
1668}
1669#[test]
1670fn bindgen_test_layout__NVFBC_RELEASE_CONTEXT_PARAMS() {
1671 assert_eq!(
1672 ::std::mem::size_of::<_NVFBC_RELEASE_CONTEXT_PARAMS>(),
1673 4usize,
1674 concat!("Size of: ", stringify!(_NVFBC_RELEASE_CONTEXT_PARAMS))
1675 );
1676 assert_eq!(
1677 ::std::mem::align_of::<_NVFBC_RELEASE_CONTEXT_PARAMS>(),
1678 4usize,
1679 concat!("Alignment of ", stringify!(_NVFBC_RELEASE_CONTEXT_PARAMS))
1680 );
1681 fn test_field_dwVersion() {
1682 assert_eq!(
1683 unsafe {
1684 let uninit = ::std::mem::MaybeUninit::<_NVFBC_RELEASE_CONTEXT_PARAMS>::uninit();
1685 let ptr = uninit.as_ptr();
1686 ::std::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize
1687 },
1688 0usize,
1689 concat!(
1690 "Offset of field: ",
1691 stringify!(_NVFBC_RELEASE_CONTEXT_PARAMS),
1692 "::",
1693 stringify!(dwVersion)
1694 )
1695 );
1696 }
1697 test_field_dwVersion();
1698}
1699#[doc = " Defines parameters for the ::NvFBCReleaseContext() API call."]
1700pub type NVFBC_RELEASE_CONTEXT_PARAMS = _NVFBC_RELEASE_CONTEXT_PARAMS;
1701#[doc = " Default, capturing waits for a new frame or mouse move."]
1702#[doc = ""]
1703#[doc = " The default behavior of blocking grabs is to wait for a new frame until"]
1704#[doc = " after the call was made. But it's possible that there is a frame already"]
1705#[doc = " ready that the client hasn't seen."]
1706#[doc = " \\see NVFBC_TOSYS_GRAB_FLAGS_NOWAIT_IF_NEW_FRAME_READY"]
1707pub const NVFBC_TOSYS_GRAB_FLAGS_NVFBC_TOSYS_GRAB_FLAGS_NOFLAGS: NVFBC_TOSYS_GRAB_FLAGS = 0;
1708#[doc = " Capturing does not wait for a new frame nor a mouse move."]
1709#[doc = ""]
1710#[doc = " It is therefore possible to capture the same frame multiple times."]
1711#[doc = " When this occurs, the dwCurrentFrame parameter of the"]
1712#[doc = " NVFBC_FRAME_GRAB_INFO structure is not incremented."]
1713pub const NVFBC_TOSYS_GRAB_FLAGS_NVFBC_TOSYS_GRAB_FLAGS_NOWAIT: NVFBC_TOSYS_GRAB_FLAGS = 1;
1714#[doc = " Forces the destination buffer to be refreshed even if the frame has not"]
1715#[doc = " changed since previous capture."]
1716#[doc = ""]
1717#[doc = " By default, if the captured frame is identical to the previous one, NvFBC"]
1718#[doc = " will omit one copy and not update the destination buffer."]
1719#[doc = ""]
1720#[doc = " Setting that flag will prevent this behavior. This can be useful e.g.,"]
1721#[doc = " if the application has modified the buffer in the meantime."]
1722pub const NVFBC_TOSYS_GRAB_FLAGS_NVFBC_TOSYS_GRAB_FLAGS_FORCE_REFRESH: NVFBC_TOSYS_GRAB_FLAGS = 2;
1723#[doc = " Similar to NVFBC_TOSYS_GRAB_FLAGS_NOFLAGS, except that the capture will"]
1724#[doc = " not wait if there is already a frame available that the client has"]
1725#[doc = " never seen yet."]
1726pub const NVFBC_TOSYS_GRAB_FLAGS_NVFBC_TOSYS_GRAB_FLAGS_NOWAIT_IF_NEW_FRAME_READY: NVFBC_TOSYS_GRAB_FLAGS = 4;
1727#[doc = " Defines flags that can be used when capturing to system memory."]
1728pub type NVFBC_TOSYS_GRAB_FLAGS = ::std::os::raw::c_uint;
1729#[doc = " Defines parameters for the ::NvFBCToSysSetUp() API call."]
1730#[repr(C)]
1731#[derive(Debug, Copy, Clone)]
1732pub struct _NVFBC_TOSYS_SETUP_PARAMS {
1733 #[doc = " [in] Must be set to NVFBC_TOSYS_SETUP_PARAMS_VER"]
1734 pub dwVersion: u32,
1735 #[doc = " [in] Desired buffer format."]
1736 pub eBufferFormat: NVFBC_BUFFER_FORMAT,
1737 #[doc = " [out] Pointer to a pointer to a buffer in system memory."]
1738 #[doc = ""]
1739 #[doc = " This buffer contains the pixel value of the requested format. Refer to"]
1740 #[doc = " the description of the buffer formats to understand the memory layout."]
1741 #[doc = ""]
1742 #[doc = " The application does not need to allocate memory for this buffer. It"]
1743 #[doc = " should not free this buffer either. This buffer is automatically"]
1744 #[doc = " re-allocated when needed (e.g., when the resolution changes)."]
1745 #[doc = ""]
1746 #[doc = " This buffer is allocated by the NvFBC library to the proper size. This"]
1747 #[doc = " size is returned in the dwByteSize field of the"]
1748 #[doc = " ::NVFBC_FRAME_GRAB_INFO structure."]
1749 pub ppBuffer: *mut *mut ::std::os::raw::c_void,
1750 #[doc = " [in] Whether differential maps should be generated."]
1751 pub bWithDiffMap: NVFBC_BOOL,
1752 #[doc = " [out] Pointer to a pointer to a buffer in system memory."]
1753 #[doc = ""]
1754 #[doc = " This buffer contains the differential map of two frames. It must be read"]
1755 #[doc = " as an array of unsigned char. Each unsigned char is either 0 or"]
1756 #[doc = " non-zero. 0 means that the pixel value at the given location has not"]
1757 #[doc = " changed since the previous captured frame. Non-zero means that the pixel"]
1758 #[doc = " value has changed."]
1759 #[doc = ""]
1760 #[doc = " The application does not need to allocate memory for this buffer. It"]
1761 #[doc = " should not free this buffer either. This buffer is automatically"]
1762 #[doc = " re-allocated when needed (e.g., when the resolution changes)."]
1763 #[doc = ""]
1764 #[doc = " This buffer is allocated by the NvFBC library to the proper size. The"]
1765 #[doc = " size of the differential map is returned in ::diffMapSize."]
1766 #[doc = ""]
1767 #[doc = " This option is not compatible with the ::NVFBC_BUFFER_FORMAT_YUV420P and"]
1768 #[doc = " ::NVFBC_BUFFER_FORMAT_YUV444P buffer formats."]
1769 pub ppDiffMap: *mut *mut ::std::os::raw::c_void,
1770 #[doc = " [in] Scaling factor of the differential maps."]
1771 #[doc = ""]
1772 #[doc = " For example, a scaling factor of 16 means that one pixel of the diffmap"]
1773 #[doc = " will represent 16x16 pixels of the original frames."]
1774 #[doc = ""]
1775 #[doc = " If any of these 16x16 pixels is different between the current and the"]
1776 #[doc = " previous frame, then the corresponding pixel in the diffmap will be set"]
1777 #[doc = " to non-zero."]
1778 #[doc = ""]
1779 #[doc = " The default scaling factor is 1. A dwDiffMapScalingFactor of 0 will be"]
1780 #[doc = " set to 1."]
1781 pub dwDiffMapScalingFactor: u32,
1782 #[doc = " [out] Size of the differential map."]
1783 #[doc = ""]
1784 #[doc = " Only set if bWithDiffMap is set to NVFBC_TRUE."]
1785 pub diffMapSize: NVFBC_SIZE,
1786}
1787#[test]
1788fn bindgen_test_layout__NVFBC_TOSYS_SETUP_PARAMS() {
1789 assert_eq!(
1790 ::std::mem::size_of::<_NVFBC_TOSYS_SETUP_PARAMS>(),
1791 48usize,
1792 concat!("Size of: ", stringify!(_NVFBC_TOSYS_SETUP_PARAMS))
1793 );
1794 assert_eq!(
1795 ::std::mem::align_of::<_NVFBC_TOSYS_SETUP_PARAMS>(),
1796 8usize,
1797 concat!("Alignment of ", stringify!(_NVFBC_TOSYS_SETUP_PARAMS))
1798 );
1799 fn test_field_dwVersion() {
1800 assert_eq!(
1801 unsafe {
1802 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOSYS_SETUP_PARAMS>::uninit();
1803 let ptr = uninit.as_ptr();
1804 ::std::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize
1805 },
1806 0usize,
1807 concat!(
1808 "Offset of field: ",
1809 stringify!(_NVFBC_TOSYS_SETUP_PARAMS),
1810 "::",
1811 stringify!(dwVersion)
1812 )
1813 );
1814 }
1815 test_field_dwVersion();
1816 fn test_field_eBufferFormat() {
1817 assert_eq!(
1818 unsafe {
1819 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOSYS_SETUP_PARAMS>::uninit();
1820 let ptr = uninit.as_ptr();
1821 ::std::ptr::addr_of!((*ptr).eBufferFormat) as usize - ptr as usize
1822 },
1823 4usize,
1824 concat!(
1825 "Offset of field: ",
1826 stringify!(_NVFBC_TOSYS_SETUP_PARAMS),
1827 "::",
1828 stringify!(eBufferFormat)
1829 )
1830 );
1831 }
1832 test_field_eBufferFormat();
1833 fn test_field_ppBuffer() {
1834 assert_eq!(
1835 unsafe {
1836 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOSYS_SETUP_PARAMS>::uninit();
1837 let ptr = uninit.as_ptr();
1838 ::std::ptr::addr_of!((*ptr).ppBuffer) as usize - ptr as usize
1839 },
1840 8usize,
1841 concat!(
1842 "Offset of field: ",
1843 stringify!(_NVFBC_TOSYS_SETUP_PARAMS),
1844 "::",
1845 stringify!(ppBuffer)
1846 )
1847 );
1848 }
1849 test_field_ppBuffer();
1850 fn test_field_bWithDiffMap() {
1851 assert_eq!(
1852 unsafe {
1853 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOSYS_SETUP_PARAMS>::uninit();
1854 let ptr = uninit.as_ptr();
1855 ::std::ptr::addr_of!((*ptr).bWithDiffMap) as usize - ptr as usize
1856 },
1857 16usize,
1858 concat!(
1859 "Offset of field: ",
1860 stringify!(_NVFBC_TOSYS_SETUP_PARAMS),
1861 "::",
1862 stringify!(bWithDiffMap)
1863 )
1864 );
1865 }
1866 test_field_bWithDiffMap();
1867 fn test_field_ppDiffMap() {
1868 assert_eq!(
1869 unsafe {
1870 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOSYS_SETUP_PARAMS>::uninit();
1871 let ptr = uninit.as_ptr();
1872 ::std::ptr::addr_of!((*ptr).ppDiffMap) as usize - ptr as usize
1873 },
1874 24usize,
1875 concat!(
1876 "Offset of field: ",
1877 stringify!(_NVFBC_TOSYS_SETUP_PARAMS),
1878 "::",
1879 stringify!(ppDiffMap)
1880 )
1881 );
1882 }
1883 test_field_ppDiffMap();
1884 fn test_field_dwDiffMapScalingFactor() {
1885 assert_eq!(
1886 unsafe {
1887 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOSYS_SETUP_PARAMS>::uninit();
1888 let ptr = uninit.as_ptr();
1889 ::std::ptr::addr_of!((*ptr).dwDiffMapScalingFactor) as usize - ptr as usize
1890 },
1891 32usize,
1892 concat!(
1893 "Offset of field: ",
1894 stringify!(_NVFBC_TOSYS_SETUP_PARAMS),
1895 "::",
1896 stringify!(dwDiffMapScalingFactor)
1897 )
1898 );
1899 }
1900 test_field_dwDiffMapScalingFactor();
1901 fn test_field_diffMapSize() {
1902 assert_eq!(
1903 unsafe {
1904 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOSYS_SETUP_PARAMS>::uninit();
1905 let ptr = uninit.as_ptr();
1906 ::std::ptr::addr_of!((*ptr).diffMapSize) as usize - ptr as usize
1907 },
1908 36usize,
1909 concat!(
1910 "Offset of field: ",
1911 stringify!(_NVFBC_TOSYS_SETUP_PARAMS),
1912 "::",
1913 stringify!(diffMapSize)
1914 )
1915 );
1916 }
1917 test_field_diffMapSize();
1918}
1919#[doc = " Defines parameters for the ::NvFBCToSysSetUp() API call."]
1920pub type NVFBC_TOSYS_SETUP_PARAMS = _NVFBC_TOSYS_SETUP_PARAMS;
1921#[doc = " Defines parameters for the ::NvFBCToSysGrabFrame() API call."]
1922#[repr(C)]
1923#[derive(Debug, Copy, Clone)]
1924pub struct _NVFBC_TOSYS_GRAB_FRAME_PARAMS {
1925 #[doc = " [in] Must be set to NVFBC_TOSYS_GRAB_FRAME_PARAMS_VER"]
1926 pub dwVersion: u32,
1927 #[doc = " [in] Flags defining the behavior of this frame capture."]
1928 pub dwFlags: u32,
1929 #[doc = " [out] Information about the captured frame."]
1930 #[doc = ""]
1931 #[doc = " Can be NULL."]
1932 pub pFrameGrabInfo: *mut NVFBC_FRAME_GRAB_INFO,
1933 #[doc = " [in] Wait timeout in milliseconds."]
1934 #[doc = ""]
1935 #[doc = " When capturing frames with the NVFBC_TOSYS_GRAB_FLAGS_NOFLAGS or"]
1936 #[doc = " NVFBC_TOSYS_GRAB_FLAGS_NOWAIT_IF_NEW_FRAME_READY flags,"]
1937 #[doc = " NvFBC will wait for a new frame or mouse move until the below timer"]
1938 #[doc = " expires."]
1939 #[doc = ""]
1940 #[doc = " When timing out, the last captured frame will be returned. Note that as"]
1941 #[doc = " long as the NVFBC_TOSYS_GRAB_FLAGS_FORCE_REFRESH flag is not set,"]
1942 #[doc = " returning an old frame will incur no performance penalty."]
1943 #[doc = ""]
1944 #[doc = " NvFBC clients can use the return value of the grab frame operation to"]
1945 #[doc = " find out whether a new frame was captured, or the timer expired."]
1946 #[doc = ""]
1947 #[doc = " Note that the behavior of blocking calls is to wait for a new frame"]
1948 #[doc = " *after* the call has been made. When using timeouts, it is possible"]
1949 #[doc = " that NvFBC will return a new frame (e.g., it has never been captured"]
1950 #[doc = " before) even though no new frame was generated after the grab call."]
1951 #[doc = ""]
1952 #[doc = " For the precise definition of what constitutes a new frame, see"]
1953 #[doc = " ::bIsNewFrame."]
1954 #[doc = ""]
1955 #[doc = " Set to 0 to disable timeouts."]
1956 pub dwTimeoutMs: u32,
1957}
1958#[test]
1959fn bindgen_test_layout__NVFBC_TOSYS_GRAB_FRAME_PARAMS() {
1960 assert_eq!(
1961 ::std::mem::size_of::<_NVFBC_TOSYS_GRAB_FRAME_PARAMS>(),
1962 24usize,
1963 concat!("Size of: ", stringify!(_NVFBC_TOSYS_GRAB_FRAME_PARAMS))
1964 );
1965 assert_eq!(
1966 ::std::mem::align_of::<_NVFBC_TOSYS_GRAB_FRAME_PARAMS>(),
1967 8usize,
1968 concat!("Alignment of ", stringify!(_NVFBC_TOSYS_GRAB_FRAME_PARAMS))
1969 );
1970 fn test_field_dwVersion() {
1971 assert_eq!(
1972 unsafe {
1973 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOSYS_GRAB_FRAME_PARAMS>::uninit();
1974 let ptr = uninit.as_ptr();
1975 ::std::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize
1976 },
1977 0usize,
1978 concat!(
1979 "Offset of field: ",
1980 stringify!(_NVFBC_TOSYS_GRAB_FRAME_PARAMS),
1981 "::",
1982 stringify!(dwVersion)
1983 )
1984 );
1985 }
1986 test_field_dwVersion();
1987 fn test_field_dwFlags() {
1988 assert_eq!(
1989 unsafe {
1990 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOSYS_GRAB_FRAME_PARAMS>::uninit();
1991 let ptr = uninit.as_ptr();
1992 ::std::ptr::addr_of!((*ptr).dwFlags) as usize - ptr as usize
1993 },
1994 4usize,
1995 concat!(
1996 "Offset of field: ",
1997 stringify!(_NVFBC_TOSYS_GRAB_FRAME_PARAMS),
1998 "::",
1999 stringify!(dwFlags)
2000 )
2001 );
2002 }
2003 test_field_dwFlags();
2004 fn test_field_pFrameGrabInfo() {
2005 assert_eq!(
2006 unsafe {
2007 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOSYS_GRAB_FRAME_PARAMS>::uninit();
2008 let ptr = uninit.as_ptr();
2009 ::std::ptr::addr_of!((*ptr).pFrameGrabInfo) as usize - ptr as usize
2010 },
2011 8usize,
2012 concat!(
2013 "Offset of field: ",
2014 stringify!(_NVFBC_TOSYS_GRAB_FRAME_PARAMS),
2015 "::",
2016 stringify!(pFrameGrabInfo)
2017 )
2018 );
2019 }
2020 test_field_pFrameGrabInfo();
2021 fn test_field_dwTimeoutMs() {
2022 assert_eq!(
2023 unsafe {
2024 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOSYS_GRAB_FRAME_PARAMS>::uninit();
2025 let ptr = uninit.as_ptr();
2026 ::std::ptr::addr_of!((*ptr).dwTimeoutMs) as usize - ptr as usize
2027 },
2028 16usize,
2029 concat!(
2030 "Offset of field: ",
2031 stringify!(_NVFBC_TOSYS_GRAB_FRAME_PARAMS),
2032 "::",
2033 stringify!(dwTimeoutMs)
2034 )
2035 );
2036 }
2037 test_field_dwTimeoutMs();
2038}
2039#[doc = " Defines parameters for the ::NvFBCToSysGrabFrame() API call."]
2040pub type NVFBC_TOSYS_GRAB_FRAME_PARAMS = _NVFBC_TOSYS_GRAB_FRAME_PARAMS;
2041#[doc = " Default, capturing waits for a new frame or mouse move."]
2042#[doc = ""]
2043#[doc = " The default behavior of blocking grabs is to wait for a new frame until"]
2044#[doc = " after the call was made. But it's possible that there is a frame already"]
2045#[doc = " ready that the client hasn't seen."]
2046#[doc = " \\see NVFBC_TOCUDA_GRAB_FLAGS_NOWAIT_IF_NEW_FRAME_READY"]
2047pub const NVFBC_TOCUDA_FLAGS_NVFBC_TOCUDA_GRAB_FLAGS_NOFLAGS: NVFBC_TOCUDA_FLAGS = 0;
2048#[doc = " Capturing does not wait for a new frame nor a mouse move."]
2049#[doc = ""]
2050#[doc = " It is therefore possible to capture the same frame multiple times."]
2051#[doc = " When this occurs, the dwCurrentFrame parameter of the"]
2052#[doc = " NVFBC_FRAME_GRAB_INFO structure is not incremented."]
2053pub const NVFBC_TOCUDA_FLAGS_NVFBC_TOCUDA_GRAB_FLAGS_NOWAIT: NVFBC_TOCUDA_FLAGS = 1;
2054#[doc = " [in] Forces the destination buffer to be refreshed even if the frame"]
2055#[doc = " has not changed since previous capture."]
2056#[doc = ""]
2057#[doc = " By default, if the captured frame is identical to the previous one, NvFBC"]
2058#[doc = " will omit one copy and not update the destination buffer."]
2059#[doc = ""]
2060#[doc = " Setting that flag will prevent this behavior. This can be useful e.g.,"]
2061#[doc = " if the application has modified the buffer in the meantime."]
2062pub const NVFBC_TOCUDA_FLAGS_NVFBC_TOCUDA_GRAB_FLAGS_FORCE_REFRESH: NVFBC_TOCUDA_FLAGS = 2;
2063#[doc = " Similar to NVFBC_TOCUDA_GRAB_FLAGS_NOFLAGS, except that the capture will"]
2064#[doc = " not wait if there is already a frame available that the client has"]
2065#[doc = " never seen yet."]
2066pub const NVFBC_TOCUDA_FLAGS_NVFBC_TOCUDA_GRAB_FLAGS_NOWAIT_IF_NEW_FRAME_READY: NVFBC_TOCUDA_FLAGS = 4;
2067#[doc = " Defines flags that can be used when capturing to a CUDA buffer in video memory."]
2068pub type NVFBC_TOCUDA_FLAGS = ::std::os::raw::c_uint;
2069#[doc = " Defines parameters for the ::NvFBCToCudaSetUp() API call."]
2070#[repr(C)]
2071#[derive(Debug, Copy, Clone)]
2072pub struct _NVFBC_TOCUDA_SETUP_PARAMS {
2073 #[doc = " [in] Must be set to NVFBC_TOCUDA_SETUP_PARAMS_VER"]
2074 pub dwVersion: u32,
2075 #[doc = " [in] Desired buffer format."]
2076 pub eBufferFormat: NVFBC_BUFFER_FORMAT,
2077}
2078#[test]
2079fn bindgen_test_layout__NVFBC_TOCUDA_SETUP_PARAMS() {
2080 assert_eq!(
2081 ::std::mem::size_of::<_NVFBC_TOCUDA_SETUP_PARAMS>(),
2082 8usize,
2083 concat!("Size of: ", stringify!(_NVFBC_TOCUDA_SETUP_PARAMS))
2084 );
2085 assert_eq!(
2086 ::std::mem::align_of::<_NVFBC_TOCUDA_SETUP_PARAMS>(),
2087 4usize,
2088 concat!("Alignment of ", stringify!(_NVFBC_TOCUDA_SETUP_PARAMS))
2089 );
2090 fn test_field_dwVersion() {
2091 assert_eq!(
2092 unsafe {
2093 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOCUDA_SETUP_PARAMS>::uninit();
2094 let ptr = uninit.as_ptr();
2095 ::std::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize
2096 },
2097 0usize,
2098 concat!(
2099 "Offset of field: ",
2100 stringify!(_NVFBC_TOCUDA_SETUP_PARAMS),
2101 "::",
2102 stringify!(dwVersion)
2103 )
2104 );
2105 }
2106 test_field_dwVersion();
2107 fn test_field_eBufferFormat() {
2108 assert_eq!(
2109 unsafe {
2110 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOCUDA_SETUP_PARAMS>::uninit();
2111 let ptr = uninit.as_ptr();
2112 ::std::ptr::addr_of!((*ptr).eBufferFormat) as usize - ptr as usize
2113 },
2114 4usize,
2115 concat!(
2116 "Offset of field: ",
2117 stringify!(_NVFBC_TOCUDA_SETUP_PARAMS),
2118 "::",
2119 stringify!(eBufferFormat)
2120 )
2121 );
2122 }
2123 test_field_eBufferFormat();
2124}
2125#[doc = " Defines parameters for the ::NvFBCToCudaSetUp() API call."]
2126pub type NVFBC_TOCUDA_SETUP_PARAMS = _NVFBC_TOCUDA_SETUP_PARAMS;
2127#[doc = " Defines parameters for the ::NvFBCToCudaGrabFrame() API call."]
2128#[repr(C)]
2129#[derive(Debug, Copy, Clone)]
2130pub struct _NVFBC_TOCUDA_GRAB_FRAME_PARAMS {
2131 #[doc = " [in] Must be set to NVFBC_TOCUDA_GRAB_FRAME_PARAMS_VER."]
2132 pub dwVersion: u32,
2133 #[doc = " [in] Flags defining the behavior of this frame capture."]
2134 pub dwFlags: u32,
2135 #[doc = " [out] Pointer to a ::CUdeviceptr"]
2136 #[doc = ""]
2137 #[doc = " The application does not need to allocate memory for this CUDA device."]
2138 #[doc = ""]
2139 #[doc = " The application does need to create its own CUDA context to use this"]
2140 #[doc = " CUDA device."]
2141 #[doc = ""]
2142 #[doc = " This ::CUdeviceptr will be mapped to a segment in video memory containing"]
2143 #[doc = " the frame. It is not possible to process a CUDA device while capturing"]
2144 #[doc = " a new frame. If the application wants to do so, it must copy the CUDA"]
2145 #[doc = " device using ::cuMemcpyDtoD or ::cuMemcpyDtoH beforehand."]
2146 pub pCUDADeviceBuffer: *mut ::std::os::raw::c_void,
2147 #[doc = " [out] Information about the captured frame."]
2148 #[doc = ""]
2149 #[doc = " Can be NULL."]
2150 pub pFrameGrabInfo: *mut NVFBC_FRAME_GRAB_INFO,
2151 #[doc = " [in] Wait timeout in milliseconds."]
2152 #[doc = ""]
2153 #[doc = " When capturing frames with the NVFBC_TOCUDA_GRAB_FLAGS_NOFLAGS or"]
2154 #[doc = " NVFBC_TOCUDA_GRAB_FLAGS_NOWAIT_IF_NEW_FRAME_READY flags,"]
2155 #[doc = " NvFBC will wait for a new frame or mouse move until the below timer"]
2156 #[doc = " expires."]
2157 #[doc = ""]
2158 #[doc = " When timing out, the last captured frame will be returned. Note that as"]
2159 #[doc = " long as the NVFBC_TOCUDA_GRAB_FLAGS_FORCE_REFRESH flag is not set,"]
2160 #[doc = " returning an old frame will incur no performance penalty."]
2161 #[doc = ""]
2162 #[doc = " NvFBC clients can use the return value of the grab frame operation to"]
2163 #[doc = " find out whether a new frame was captured, or the timer expired."]
2164 #[doc = ""]
2165 #[doc = " Note that the behavior of blocking calls is to wait for a new frame"]
2166 #[doc = " *after* the call has been made. When using timeouts, it is possible"]
2167 #[doc = " that NvFBC will return a new frame (e.g., it has never been captured"]
2168 #[doc = " before) even though no new frame was generated after the grab call."]
2169 #[doc = ""]
2170 #[doc = " For the precise definition of what constitutes a new frame, see"]
2171 #[doc = " ::bIsNewFrame."]
2172 #[doc = ""]
2173 #[doc = " Set to 0 to disable timeouts."]
2174 pub dwTimeoutMs: u32,
2175}
2176#[test]
2177fn bindgen_test_layout__NVFBC_TOCUDA_GRAB_FRAME_PARAMS() {
2178 assert_eq!(
2179 ::std::mem::size_of::<_NVFBC_TOCUDA_GRAB_FRAME_PARAMS>(),
2180 32usize,
2181 concat!("Size of: ", stringify!(_NVFBC_TOCUDA_GRAB_FRAME_PARAMS))
2182 );
2183 assert_eq!(
2184 ::std::mem::align_of::<_NVFBC_TOCUDA_GRAB_FRAME_PARAMS>(),
2185 8usize,
2186 concat!("Alignment of ", stringify!(_NVFBC_TOCUDA_GRAB_FRAME_PARAMS))
2187 );
2188 fn test_field_dwVersion() {
2189 assert_eq!(
2190 unsafe {
2191 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOCUDA_GRAB_FRAME_PARAMS>::uninit();
2192 let ptr = uninit.as_ptr();
2193 ::std::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize
2194 },
2195 0usize,
2196 concat!(
2197 "Offset of field: ",
2198 stringify!(_NVFBC_TOCUDA_GRAB_FRAME_PARAMS),
2199 "::",
2200 stringify!(dwVersion)
2201 )
2202 );
2203 }
2204 test_field_dwVersion();
2205 fn test_field_dwFlags() {
2206 assert_eq!(
2207 unsafe {
2208 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOCUDA_GRAB_FRAME_PARAMS>::uninit();
2209 let ptr = uninit.as_ptr();
2210 ::std::ptr::addr_of!((*ptr).dwFlags) as usize - ptr as usize
2211 },
2212 4usize,
2213 concat!(
2214 "Offset of field: ",
2215 stringify!(_NVFBC_TOCUDA_GRAB_FRAME_PARAMS),
2216 "::",
2217 stringify!(dwFlags)
2218 )
2219 );
2220 }
2221 test_field_dwFlags();
2222 fn test_field_pCUDADeviceBuffer() {
2223 assert_eq!(
2224 unsafe {
2225 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOCUDA_GRAB_FRAME_PARAMS>::uninit();
2226 let ptr = uninit.as_ptr();
2227 ::std::ptr::addr_of!((*ptr).pCUDADeviceBuffer) as usize - ptr as usize
2228 },
2229 8usize,
2230 concat!(
2231 "Offset of field: ",
2232 stringify!(_NVFBC_TOCUDA_GRAB_FRAME_PARAMS),
2233 "::",
2234 stringify!(pCUDADeviceBuffer)
2235 )
2236 );
2237 }
2238 test_field_pCUDADeviceBuffer();
2239 fn test_field_pFrameGrabInfo() {
2240 assert_eq!(
2241 unsafe {
2242 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOCUDA_GRAB_FRAME_PARAMS>::uninit();
2243 let ptr = uninit.as_ptr();
2244 ::std::ptr::addr_of!((*ptr).pFrameGrabInfo) as usize - ptr as usize
2245 },
2246 16usize,
2247 concat!(
2248 "Offset of field: ",
2249 stringify!(_NVFBC_TOCUDA_GRAB_FRAME_PARAMS),
2250 "::",
2251 stringify!(pFrameGrabInfo)
2252 )
2253 );
2254 }
2255 test_field_pFrameGrabInfo();
2256 fn test_field_dwTimeoutMs() {
2257 assert_eq!(
2258 unsafe {
2259 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOCUDA_GRAB_FRAME_PARAMS>::uninit();
2260 let ptr = uninit.as_ptr();
2261 ::std::ptr::addr_of!((*ptr).dwTimeoutMs) as usize - ptr as usize
2262 },
2263 24usize,
2264 concat!(
2265 "Offset of field: ",
2266 stringify!(_NVFBC_TOCUDA_GRAB_FRAME_PARAMS),
2267 "::",
2268 stringify!(dwTimeoutMs)
2269 )
2270 );
2271 }
2272 test_field_dwTimeoutMs();
2273}
2274#[doc = " Defines parameters for the ::NvFBCToCudaGrabFrame() API call."]
2275pub type NVFBC_TOCUDA_GRAB_FRAME_PARAMS = _NVFBC_TOCUDA_GRAB_FRAME_PARAMS;
2276#[doc = " Default, capturing waits for a new frame or mouse move."]
2277#[doc = ""]
2278#[doc = " The default behavior of blocking grabs is to wait for a new frame until"]
2279#[doc = " after the call was made. But it's possible that there is a frame already"]
2280#[doc = " ready that the client hasn't seen."]
2281#[doc = " \\see NVFBC_TOGL_GRAB_FLAGS_NOWAIT_IF_NEW_FRAME_READY"]
2282pub const NVFBC_TOGL_FLAGS_NVFBC_TOGL_GRAB_FLAGS_NOFLAGS: NVFBC_TOGL_FLAGS = 0;
2283#[doc = " Capturing does not wait for a new frame nor a mouse move."]
2284#[doc = ""]
2285#[doc = " It is therefore possible to capture the same frame multiple times."]
2286#[doc = " When this occurs, the dwCurrentFrame parameter of the"]
2287#[doc = " NVFBC_FRAME_GRAB_INFO structure is not incremented."]
2288pub const NVFBC_TOGL_FLAGS_NVFBC_TOGL_GRAB_FLAGS_NOWAIT: NVFBC_TOGL_FLAGS = 1;
2289#[doc = " [in] Forces the destination buffer to be refreshed even if the frame"]
2290#[doc = " has not changed since previous capture."]
2291#[doc = ""]
2292#[doc = " By default, if the captured frame is identical to the previous one, NvFBC"]
2293#[doc = " will omit one copy and not update the destination buffer."]
2294#[doc = ""]
2295#[doc = " Setting that flag will prevent this behavior. This can be useful e.g.,"]
2296#[doc = " if the application has modified the buffer in the meantime."]
2297pub const NVFBC_TOGL_FLAGS_NVFBC_TOGL_GRAB_FLAGS_FORCE_REFRESH: NVFBC_TOGL_FLAGS = 2;
2298#[doc = " Similar to NVFBC_TOGL_GRAB_FLAGS_NOFLAGS, except that the capture will"]
2299#[doc = " not wait if there is already a frame available that the client has"]
2300#[doc = " never seen yet."]
2301pub const NVFBC_TOGL_FLAGS_NVFBC_TOGL_GRAB_FLAGS_NOWAIT_IF_NEW_FRAME_READY: NVFBC_TOGL_FLAGS = 4;
2302#[doc = " Defines flags that can be used when capturing to an OpenGL buffer in video memory."]
2303pub type NVFBC_TOGL_FLAGS = ::std::os::raw::c_uint;
2304#[doc = " Defines parameters for the ::NvFBCToGLSetUp() API call."]
2305#[repr(C)]
2306#[derive(Debug, Copy, Clone)]
2307pub struct _NVFBC_TOGL_SETUP_PARAMS {
2308 #[doc = " [in] Must be set to NVFBC_TOGL_SETUP_PARAMS_VER"]
2309 pub dwVersion: u32,
2310 #[doc = " [in] Desired buffer format."]
2311 pub eBufferFormat: NVFBC_BUFFER_FORMAT,
2312 #[doc = " [in] Whether differential maps should be generated."]
2313 pub bWithDiffMap: NVFBC_BOOL,
2314 #[doc = " [out] Pointer to a pointer to a buffer in system memory."]
2315 #[doc = ""]
2316 #[doc = " \\see NVFBC_TOSYS_SETUP_PARAMS::ppDiffMap"]
2317 pub ppDiffMap: *mut *mut ::std::os::raw::c_void,
2318 #[doc = " [in] Scaling factor of the differential maps."]
2319 #[doc = ""]
2320 #[doc = " \\see NVFBC_TOSYS_SETUP_PARAMS::dwDiffMapScalingFactor"]
2321 pub dwDiffMapScalingFactor: u32,
2322 #[doc = " [out] List of GL textures that will store the captured frames."]
2323 #[doc = ""]
2324 #[doc = " This array is 0 terminated. The number of textures varies depending on"]
2325 #[doc = " the capture settings (such as whether diffmaps are enabled)."]
2326 #[doc = ""]
2327 #[doc = " An application wishing to interop with, for example, EncodeAPI will need"]
2328 #[doc = " to register these textures prior to start encoding frames."]
2329 #[doc = ""]
2330 #[doc = " After each frame capture, the texture holding the current frame will be"]
2331 #[doc = " returned in NVFBC_TOGL_GRAB_FRAME_PARAMS::dwTexture."]
2332 pub dwTextures: [u32; 2usize],
2333 #[doc = " [out] GL target to which the texture should be bound."]
2334 pub dwTexTarget: u32,
2335 #[doc = " [out] GL format of the textures."]
2336 pub dwTexFormat: u32,
2337 #[doc = " [out] GL type of the textures."]
2338 pub dwTexType: u32,
2339 #[doc = " [out] Size of the differential map."]
2340 #[doc = ""]
2341 #[doc = " Only set if bWithDiffMap is set to NVFBC_TRUE."]
2342 pub diffMapSize: NVFBC_SIZE,
2343}
2344#[test]
2345fn bindgen_test_layout__NVFBC_TOGL_SETUP_PARAMS() {
2346 assert_eq!(
2347 ::std::mem::size_of::<_NVFBC_TOGL_SETUP_PARAMS>(),
2348 56usize,
2349 concat!("Size of: ", stringify!(_NVFBC_TOGL_SETUP_PARAMS))
2350 );
2351 assert_eq!(
2352 ::std::mem::align_of::<_NVFBC_TOGL_SETUP_PARAMS>(),
2353 8usize,
2354 concat!("Alignment of ", stringify!(_NVFBC_TOGL_SETUP_PARAMS))
2355 );
2356 fn test_field_dwVersion() {
2357 assert_eq!(
2358 unsafe {
2359 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOGL_SETUP_PARAMS>::uninit();
2360 let ptr = uninit.as_ptr();
2361 ::std::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize
2362 },
2363 0usize,
2364 concat!(
2365 "Offset of field: ",
2366 stringify!(_NVFBC_TOGL_SETUP_PARAMS),
2367 "::",
2368 stringify!(dwVersion)
2369 )
2370 );
2371 }
2372 test_field_dwVersion();
2373 fn test_field_eBufferFormat() {
2374 assert_eq!(
2375 unsafe {
2376 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOGL_SETUP_PARAMS>::uninit();
2377 let ptr = uninit.as_ptr();
2378 ::std::ptr::addr_of!((*ptr).eBufferFormat) as usize - ptr as usize
2379 },
2380 4usize,
2381 concat!(
2382 "Offset of field: ",
2383 stringify!(_NVFBC_TOGL_SETUP_PARAMS),
2384 "::",
2385 stringify!(eBufferFormat)
2386 )
2387 );
2388 }
2389 test_field_eBufferFormat();
2390 fn test_field_bWithDiffMap() {
2391 assert_eq!(
2392 unsafe {
2393 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOGL_SETUP_PARAMS>::uninit();
2394 let ptr = uninit.as_ptr();
2395 ::std::ptr::addr_of!((*ptr).bWithDiffMap) as usize - ptr as usize
2396 },
2397 8usize,
2398 concat!(
2399 "Offset of field: ",
2400 stringify!(_NVFBC_TOGL_SETUP_PARAMS),
2401 "::",
2402 stringify!(bWithDiffMap)
2403 )
2404 );
2405 }
2406 test_field_bWithDiffMap();
2407 fn test_field_ppDiffMap() {
2408 assert_eq!(
2409 unsafe {
2410 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOGL_SETUP_PARAMS>::uninit();
2411 let ptr = uninit.as_ptr();
2412 ::std::ptr::addr_of!((*ptr).ppDiffMap) as usize - ptr as usize
2413 },
2414 16usize,
2415 concat!(
2416 "Offset of field: ",
2417 stringify!(_NVFBC_TOGL_SETUP_PARAMS),
2418 "::",
2419 stringify!(ppDiffMap)
2420 )
2421 );
2422 }
2423 test_field_ppDiffMap();
2424 fn test_field_dwDiffMapScalingFactor() {
2425 assert_eq!(
2426 unsafe {
2427 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOGL_SETUP_PARAMS>::uninit();
2428 let ptr = uninit.as_ptr();
2429 ::std::ptr::addr_of!((*ptr).dwDiffMapScalingFactor) as usize - ptr as usize
2430 },
2431 24usize,
2432 concat!(
2433 "Offset of field: ",
2434 stringify!(_NVFBC_TOGL_SETUP_PARAMS),
2435 "::",
2436 stringify!(dwDiffMapScalingFactor)
2437 )
2438 );
2439 }
2440 test_field_dwDiffMapScalingFactor();
2441 fn test_field_dwTextures() {
2442 assert_eq!(
2443 unsafe {
2444 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOGL_SETUP_PARAMS>::uninit();
2445 let ptr = uninit.as_ptr();
2446 ::std::ptr::addr_of!((*ptr).dwTextures) as usize - ptr as usize
2447 },
2448 28usize,
2449 concat!(
2450 "Offset of field: ",
2451 stringify!(_NVFBC_TOGL_SETUP_PARAMS),
2452 "::",
2453 stringify!(dwTextures)
2454 )
2455 );
2456 }
2457 test_field_dwTextures();
2458 fn test_field_dwTexTarget() {
2459 assert_eq!(
2460 unsafe {
2461 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOGL_SETUP_PARAMS>::uninit();
2462 let ptr = uninit.as_ptr();
2463 ::std::ptr::addr_of!((*ptr).dwTexTarget) as usize - ptr as usize
2464 },
2465 36usize,
2466 concat!(
2467 "Offset of field: ",
2468 stringify!(_NVFBC_TOGL_SETUP_PARAMS),
2469 "::",
2470 stringify!(dwTexTarget)
2471 )
2472 );
2473 }
2474 test_field_dwTexTarget();
2475 fn test_field_dwTexFormat() {
2476 assert_eq!(
2477 unsafe {
2478 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOGL_SETUP_PARAMS>::uninit();
2479 let ptr = uninit.as_ptr();
2480 ::std::ptr::addr_of!((*ptr).dwTexFormat) as usize - ptr as usize
2481 },
2482 40usize,
2483 concat!(
2484 "Offset of field: ",
2485 stringify!(_NVFBC_TOGL_SETUP_PARAMS),
2486 "::",
2487 stringify!(dwTexFormat)
2488 )
2489 );
2490 }
2491 test_field_dwTexFormat();
2492 fn test_field_dwTexType() {
2493 assert_eq!(
2494 unsafe {
2495 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOGL_SETUP_PARAMS>::uninit();
2496 let ptr = uninit.as_ptr();
2497 ::std::ptr::addr_of!((*ptr).dwTexType) as usize - ptr as usize
2498 },
2499 44usize,
2500 concat!(
2501 "Offset of field: ",
2502 stringify!(_NVFBC_TOGL_SETUP_PARAMS),
2503 "::",
2504 stringify!(dwTexType)
2505 )
2506 );
2507 }
2508 test_field_dwTexType();
2509 fn test_field_diffMapSize() {
2510 assert_eq!(
2511 unsafe {
2512 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOGL_SETUP_PARAMS>::uninit();
2513 let ptr = uninit.as_ptr();
2514 ::std::ptr::addr_of!((*ptr).diffMapSize) as usize - ptr as usize
2515 },
2516 48usize,
2517 concat!(
2518 "Offset of field: ",
2519 stringify!(_NVFBC_TOGL_SETUP_PARAMS),
2520 "::",
2521 stringify!(diffMapSize)
2522 )
2523 );
2524 }
2525 test_field_diffMapSize();
2526}
2527#[doc = " Defines parameters for the ::NvFBCToGLSetUp() API call."]
2528pub type NVFBC_TOGL_SETUP_PARAMS = _NVFBC_TOGL_SETUP_PARAMS;
2529#[doc = " Defines parameters for the ::NvFBCToGLGrabFrame() API call."]
2530#[repr(C)]
2531#[derive(Debug, Copy, Clone)]
2532pub struct _NVFBC_TOGL_GRAB_FRAME_PARAMS {
2533 #[doc = " [in] Must be set to NVFBC_TOGL_GRAB_FRAME_PARAMS_VER."]
2534 pub dwVersion: u32,
2535 #[doc = " [in] Flags defining the behavior of this frame capture."]
2536 pub dwFlags: u32,
2537 #[doc = " [out] Index of the texture storing the current frame."]
2538 #[doc = ""]
2539 #[doc = " This is an index in the NVFBC_TOGL_SETUP_PARAMS::dwTextures array."]
2540 pub dwTextureIndex: u32,
2541 #[doc = " [out] Information about the captured frame."]
2542 #[doc = ""]
2543 #[doc = " Can be NULL."]
2544 pub pFrameGrabInfo: *mut NVFBC_FRAME_GRAB_INFO,
2545 #[doc = " [in] Wait timeout in milliseconds."]
2546 #[doc = ""]
2547 #[doc = " When capturing frames with the NVFBC_TOGL_GRAB_FLAGS_NOFLAGS or"]
2548 #[doc = " NVFBC_TOGL_GRAB_FLAGS_NOWAIT_IF_NEW_FRAME_READY flags,"]
2549 #[doc = " NvFBC will wait for a new frame or mouse move until the below timer"]
2550 #[doc = " expires."]
2551 #[doc = ""]
2552 #[doc = " When timing out, the last captured frame will be returned. Note that as"]
2553 #[doc = " long as the NVFBC_TOGL_GRAB_FLAGS_FORCE_REFRESH flag is not set,"]
2554 #[doc = " returning an old frame will incur no performance penalty."]
2555 #[doc = ""]
2556 #[doc = " NvFBC clients can use the return value of the grab frame operation to"]
2557 #[doc = " find out whether a new frame was captured, or the timer expired."]
2558 #[doc = ""]
2559 #[doc = " Note that the behavior of blocking calls is to wait for a new frame"]
2560 #[doc = " *after* the call has been made. When using timeouts, it is possible"]
2561 #[doc = " that NvFBC will return a new frame (e.g., it has never been captured"]
2562 #[doc = " before) even though no new frame was generated after the grab call."]
2563 #[doc = ""]
2564 #[doc = " For the precise definition of what constitutes a new frame, see"]
2565 #[doc = " ::bIsNewFrame."]
2566 #[doc = ""]
2567 #[doc = " Set to 0 to disable timeouts."]
2568 pub dwTimeoutMs: u32,
2569}
2570#[test]
2571fn bindgen_test_layout__NVFBC_TOGL_GRAB_FRAME_PARAMS() {
2572 assert_eq!(
2573 ::std::mem::size_of::<_NVFBC_TOGL_GRAB_FRAME_PARAMS>(),
2574 32usize,
2575 concat!("Size of: ", stringify!(_NVFBC_TOGL_GRAB_FRAME_PARAMS))
2576 );
2577 assert_eq!(
2578 ::std::mem::align_of::<_NVFBC_TOGL_GRAB_FRAME_PARAMS>(),
2579 8usize,
2580 concat!("Alignment of ", stringify!(_NVFBC_TOGL_GRAB_FRAME_PARAMS))
2581 );
2582 fn test_field_dwVersion() {
2583 assert_eq!(
2584 unsafe {
2585 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOGL_GRAB_FRAME_PARAMS>::uninit();
2586 let ptr = uninit.as_ptr();
2587 ::std::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize
2588 },
2589 0usize,
2590 concat!(
2591 "Offset of field: ",
2592 stringify!(_NVFBC_TOGL_GRAB_FRAME_PARAMS),
2593 "::",
2594 stringify!(dwVersion)
2595 )
2596 );
2597 }
2598 test_field_dwVersion();
2599 fn test_field_dwFlags() {
2600 assert_eq!(
2601 unsafe {
2602 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOGL_GRAB_FRAME_PARAMS>::uninit();
2603 let ptr = uninit.as_ptr();
2604 ::std::ptr::addr_of!((*ptr).dwFlags) as usize - ptr as usize
2605 },
2606 4usize,
2607 concat!(
2608 "Offset of field: ",
2609 stringify!(_NVFBC_TOGL_GRAB_FRAME_PARAMS),
2610 "::",
2611 stringify!(dwFlags)
2612 )
2613 );
2614 }
2615 test_field_dwFlags();
2616 fn test_field_dwTextureIndex() {
2617 assert_eq!(
2618 unsafe {
2619 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOGL_GRAB_FRAME_PARAMS>::uninit();
2620 let ptr = uninit.as_ptr();
2621 ::std::ptr::addr_of!((*ptr).dwTextureIndex) as usize - ptr as usize
2622 },
2623 8usize,
2624 concat!(
2625 "Offset of field: ",
2626 stringify!(_NVFBC_TOGL_GRAB_FRAME_PARAMS),
2627 "::",
2628 stringify!(dwTextureIndex)
2629 )
2630 );
2631 }
2632 test_field_dwTextureIndex();
2633 fn test_field_pFrameGrabInfo() {
2634 assert_eq!(
2635 unsafe {
2636 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOGL_GRAB_FRAME_PARAMS>::uninit();
2637 let ptr = uninit.as_ptr();
2638 ::std::ptr::addr_of!((*ptr).pFrameGrabInfo) as usize - ptr as usize
2639 },
2640 16usize,
2641 concat!(
2642 "Offset of field: ",
2643 stringify!(_NVFBC_TOGL_GRAB_FRAME_PARAMS),
2644 "::",
2645 stringify!(pFrameGrabInfo)
2646 )
2647 );
2648 }
2649 test_field_pFrameGrabInfo();
2650 fn test_field_dwTimeoutMs() {
2651 assert_eq!(
2652 unsafe {
2653 let uninit = ::std::mem::MaybeUninit::<_NVFBC_TOGL_GRAB_FRAME_PARAMS>::uninit();
2654 let ptr = uninit.as_ptr();
2655 ::std::ptr::addr_of!((*ptr).dwTimeoutMs) as usize - ptr as usize
2656 },
2657 24usize,
2658 concat!(
2659 "Offset of field: ",
2660 stringify!(_NVFBC_TOGL_GRAB_FRAME_PARAMS),
2661 "::",
2662 stringify!(dwTimeoutMs)
2663 )
2664 );
2665 }
2666 test_field_dwTimeoutMs();
2667}
2668#[doc = " Defines parameters for the ::NvFBCToGLGrabFrame() API call."]
2669pub type NVFBC_TOGL_GRAB_FRAME_PARAMS = _NVFBC_TOGL_GRAB_FRAME_PARAMS;
2670extern "C" {
2671 #[doc = " Gets the last error message that got recorded for a client."]
2672 #[doc = ""]
2673 #[doc = " When NvFBC returns an error, it will save an error message that can be"]
2674 #[doc = " queried through this API call. Only the last message is saved."]
2675 #[doc = " The message and the return code should give enough information about"]
2676 #[doc = " what went wrong."]
2677 #[doc = ""]
2678 #[doc = " \\param [in] sessionHandle"]
2679 #[doc = " Handle to the NvFBC client."]
2680 #[doc = " \\return"]
2681 #[doc = " A NULL terminated error message, or an empty string. Its maximum length"]
2682 #[doc = " is NVFBC_ERROR_STR_LEN."]
2683 pub fn NvFBCGetLastErrorStr(sessionHandle: NVFBC_SESSION_HANDLE) -> *const ::std::os::raw::c_char;
2684}
2685extern "C" {
2686 #[doc = " \\brief Allocates a new handle for an NvFBC client."]
2687 #[doc = ""]
2688 #[doc = " This function allocates a session handle used to identify an FBC client."]
2689 #[doc = ""]
2690 #[doc = " This function implicitly calls NvFBCBindContext()."]
2691 #[doc = ""]
2692 #[doc = " \\param [out] pSessionHandle"]
2693 #[doc = " Pointer that will hold the allocated session handle."]
2694 #[doc = " \\param [in] pParams"]
2695 #[doc = " ::NVFBC_CREATE_HANDLE_PARAMS"]
2696 #[doc = ""]
2697 #[doc = " \\return"]
2698 #[doc = " ::NVFBC_SUCCESS \\n"]
2699 #[doc = " ::NVFBC_ERR_INVALID_PTR \\n"]
2700 #[doc = " ::NVFBC_ERR_API_VERSION \\n"]
2701 #[doc = " ::NVFBC_ERR_INTERNAL \\n"]
2702 #[doc = " ::NVFBC_ERR_OUT_OF_MEMORY \\n"]
2703 #[doc = " ::NVFBC_ERR_MAX_CLIENTS \\n"]
2704 #[doc = " ::NVFBC_ERR_X \\n"]
2705 #[doc = " ::NVFBC_ERR_GLX \\n"]
2706 #[doc = " ::NVFBC_ERR_GL"]
2707 #[doc = ""]
2708 pub fn NvFBCCreateHandle(
2709 pSessionHandle: *mut NVFBC_SESSION_HANDLE,
2710 pParams: *mut NVFBC_CREATE_HANDLE_PARAMS,
2711 ) -> NVFBCSTATUS;
2712}
2713extern "C" {
2714 #[doc = " \\brief Destroys the handle of an NvFBC client."]
2715 #[doc = ""]
2716 #[doc = " This function uninitializes an FBC client."]
2717 #[doc = ""]
2718 #[doc = " This function implicitly calls NvFBCReleaseContext()."]
2719 #[doc = ""]
2720 #[doc = " After this fucntion returns, it is not possible to use this session handle"]
2721 #[doc = " for any further API call."]
2722 #[doc = ""]
2723 #[doc = " \\param [in] sessionHandle"]
2724 #[doc = " FBC session handle."]
2725 #[doc = " \\param [in] pParams"]
2726 #[doc = " ::NVFBC_DESTROY_HANDLE_PARAMS"]
2727 #[doc = ""]
2728 #[doc = " \\return"]
2729 #[doc = " ::NVFBC_SUCCESS \\n"]
2730 #[doc = " ::NVFBC_ERR_INVALID_HANDLE \\n"]
2731 #[doc = " ::NVFBC_ERR_API_VERSION \\n"]
2732 #[doc = " ::NVFBC_ERR_BAD_REQUEST \\n"]
2733 #[doc = " ::NVFBC_ERR_INTERNAL \\n"]
2734 #[doc = " ::NVFBC_ERR_CONTEXT \\n"]
2735 #[doc = " ::NVFBC_ERR_X"]
2736 pub fn NvFBCDestroyHandle(
2737 sessionHandle: NVFBC_SESSION_HANDLE,
2738 pParams: *mut NVFBC_DESTROY_HANDLE_PARAMS,
2739 ) -> NVFBCSTATUS;
2740}
2741extern "C" {
2742 #[doc = " \\brief Gets the current status of the display driver."]
2743 #[doc = ""]
2744 #[doc = " This function queries the display driver for various information."]
2745 #[doc = ""]
2746 #[doc = " \\param [in] sessionHandle"]
2747 #[doc = " FBC session handle."]
2748 #[doc = " \\param [in] pParams"]
2749 #[doc = " ::NVFBC_GET_STATUS_PARAMS"]
2750 #[doc = ""]
2751 #[doc = " \\return"]
2752 #[doc = " ::NVFBC_SUCCESS \\n"]
2753 #[doc = " ::NVFBC_ERR_INVALID_HANDLE \\n"]
2754 #[doc = " ::NVFBC_ERR_API_VERSION \\n"]
2755 #[doc = " ::NVFBC_ERR_INTERNAL \\n"]
2756 #[doc = " ::NVFBC_ERR_X"]
2757 pub fn NvFBCGetStatus(sessionHandle: NVFBC_SESSION_HANDLE, pParams: *mut NVFBC_GET_STATUS_PARAMS) -> NVFBCSTATUS;
2758}
2759extern "C" {
2760 #[doc = " \\brief Binds the FBC context to the calling thread."]
2761 #[doc = ""]
2762 #[doc = " The NvFBC library internally relies on objects that must be bound to a"]
2763 #[doc = " thread. Such objects are OpenGL contexts and CUDA contexts."]
2764 #[doc = ""]
2765 #[doc = " This function binds these objects to the calling thread."]
2766 #[doc = ""]
2767 #[doc = " The FBC context must be bound to the calling thread for most NvFBC entry"]
2768 #[doc = " points, otherwise ::NVFBC_ERR_CONTEXT is returned."]
2769 #[doc = ""]
2770 #[doc = " If the FBC context is already bound to a different thread,"]
2771 #[doc = " ::NVFBC_ERR_CONTEXT is returned. The other thread must release the context"]
2772 #[doc = " first by calling the ReleaseContext() entry point."]
2773 #[doc = ""]
2774 #[doc = " If the FBC context is already bound to the current thread, this function has"]
2775 #[doc = " no effects."]
2776 #[doc = ""]
2777 #[doc = " \\param [in] sessionHandle"]
2778 #[doc = " FBC session handle."]
2779 #[doc = " \\param [in] pParams"]
2780 #[doc = " ::NVFBC_DESTROY_CAPTURE_SESSION_PARAMS"]
2781 #[doc = ""]
2782 #[doc = " \\return"]
2783 #[doc = " ::NVFBC_SUCCESS \\n"]
2784 #[doc = " ::NVFBC_ERR_INVALID_HANDLE \\n"]
2785 #[doc = " ::NVFBC_ERR_API_VERSION \\n"]
2786 #[doc = " ::NVFBC_ERR_BAD_REQUEST \\n"]
2787 #[doc = " ::NVFBC_ERR_CONTEXT \\n"]
2788 #[doc = " ::NVFBC_ERR_INTERNAL \\n"]
2789 #[doc = " ::NVFBC_ERR_X"]
2790 pub fn NvFBCBindContext(
2791 sessionHandle: NVFBC_SESSION_HANDLE,
2792 pParams: *mut NVFBC_BIND_CONTEXT_PARAMS,
2793 ) -> NVFBCSTATUS;
2794}
2795extern "C" {
2796 #[doc = " \\brief Releases the FBC context from the calling thread."]
2797 #[doc = ""]
2798 #[doc = " If the FBC context is bound to a different thread, ::NVFBC_ERR_CONTEXT is"]
2799 #[doc = " returned."]
2800 #[doc = ""]
2801 #[doc = " If the FBC context is already released, this functino has no effects."]
2802 #[doc = ""]
2803 #[doc = " \\param [in] sessionHandle"]
2804 #[doc = " FBC session handle."]
2805 #[doc = " \\param [in] pParams"]
2806 #[doc = " ::NVFBC_SUCCESS \\n"]
2807 #[doc = " ::NVFBC_ERR_INVALID_HANDLE \\n"]
2808 #[doc = " ::NVFBC_ERR_API_VERSION \\n"]
2809 #[doc = " ::NVFBC_ERR_BAD_REQUEST \\n"]
2810 #[doc = " ::NVFBC_ERR_CONTEXT \\n"]
2811 #[doc = " ::NVFBC_ERR_INTERNAL \\n"]
2812 #[doc = " ::NVFBC_ERR_X"]
2813 pub fn NvFBCReleaseContext(
2814 sessionHandle: NVFBC_SESSION_HANDLE,
2815 pParams: *mut NVFBC_RELEASE_CONTEXT_PARAMS,
2816 ) -> NVFBCSTATUS;
2817}
2818extern "C" {
2819 #[doc = " \\brief Creates a capture session for an FBC client."]
2820 #[doc = ""]
2821 #[doc = " This function starts a capture session of the desired type (system memory,"]
2822 #[doc = " video memory with CUDA interop, or H.264 compressed frames in system memory)."]
2823 #[doc = ""]
2824 #[doc = " Not all types are supported on all systems. Also, it is possible to use"]
2825 #[doc = " NvFBC without having the CUDA library. In this case, requesting a capture"]
2826 #[doc = " session of the concerned type will return an error."]
2827 #[doc = ""]
2828 #[doc = " After this function returns, the display driver will start generating frames"]
2829 #[doc = " that can be captured using the corresponding API call."]
2830 #[doc = ""]
2831 #[doc = " \\param [in] sessionHandle"]
2832 #[doc = " FBC session handle."]
2833 #[doc = " \\param [in] pParams"]
2834 #[doc = " ::NVFBC_CREATE_CAPTURE_SESSION_PARAMS"]
2835 #[doc = ""]
2836 #[doc = " \\return"]
2837 #[doc = " ::NVFBC_SUCCESS \\n"]
2838 #[doc = " ::NVFBC_ERR_INVALID_HANDLE \\n"]
2839 #[doc = " ::NVFBC_ERR_API_VERSION \\n"]
2840 #[doc = " ::NVFBC_ERR_BAD_REQUEST \\n"]
2841 #[doc = " ::NVFBC_ERR_CONTEXT \\n"]
2842 #[doc = " ::NVFBC_ERR_INVALID_PARAM \\n"]
2843 #[doc = " ::NVFBC_ERR_OUT_OF_MEMORY \\n"]
2844 #[doc = " ::NVFBC_ERR_X \\n"]
2845 #[doc = " ::NVFBC_ERR_GLX \\n"]
2846 #[doc = " ::NVFBC_ERR_GL \\n"]
2847 #[doc = " ::NVFBC_ERR_CUDA \\n"]
2848 #[doc = " ::NVFBC_ERR_MUST_RECREATE \\n"]
2849 #[doc = " ::NVFBC_ERR_INTERNAL"]
2850 pub fn NvFBCCreateCaptureSession(
2851 sessionHandle: NVFBC_SESSION_HANDLE,
2852 pParams: *mut NVFBC_CREATE_CAPTURE_SESSION_PARAMS,
2853 ) -> NVFBCSTATUS;
2854}
2855extern "C" {
2856 #[doc = " \\brief Destroys a capture session for an FBC client."]
2857 #[doc = ""]
2858 #[doc = " This function stops a capture session and frees allocated objects."]
2859 #[doc = ""]
2860 #[doc = " After this function returns, it is possible to create another capture"]
2861 #[doc = " session using the corresponding API call."]
2862 #[doc = ""]
2863 #[doc = " \\param [in] sessionHandle"]
2864 #[doc = " FBC session handle."]
2865 #[doc = " \\param [in] pParams"]
2866 #[doc = " ::NVFBC_DESTROY_CAPTURE_SESSION_PARAMS"]
2867 #[doc = ""]
2868 #[doc = " \\return"]
2869 #[doc = " ::NVFBC_SUCCESS \\n"]
2870 #[doc = " ::NVFBC_ERR_INVALID_HANDLE \\n"]
2871 #[doc = " ::NVFBC_ERR_API_VERSION \\n"]
2872 #[doc = " ::NVFBC_ERR_BAD_REQUEST \\n"]
2873 #[doc = " ::NVFBC_ERR_CONTEXT \\n"]
2874 #[doc = " ::NVFBC_ERR_INTERNAL \\n"]
2875 #[doc = " ::NVFBC_ERR_X"]
2876 pub fn NvFBCDestroyCaptureSession(
2877 sessionHandle: NVFBC_SESSION_HANDLE,
2878 pParams: *mut NVFBC_DESTROY_CAPTURE_SESSION_PARAMS,
2879 ) -> NVFBCSTATUS;
2880}
2881extern "C" {
2882 #[doc = " \\brief Sets up a capture to system memory session."]
2883 #[doc = ""]
2884 #[doc = " This function configures how the capture to system memory should behave. It"]
2885 #[doc = " can be called anytime and several times after the capture session has been"]
2886 #[doc = " created. However, it must be called at least once prior to start capturing"]
2887 #[doc = " frames."]
2888 #[doc = ""]
2889 #[doc = " This function allocates the buffer that will contain the captured frame."]
2890 #[doc = " The application does not need to free this buffer. The size of this buffer"]
2891 #[doc = " is returned in the ::NVFBC_FRAME_GRAB_INFO structure."]
2892 #[doc = ""]
2893 #[doc = " \\param [in] sessionHandle"]
2894 #[doc = " FBC session handle."]
2895 #[doc = " \\param [in] pParams"]
2896 #[doc = " ::NVFBC_TOSYS_SETUP_PARAMS"]
2897 #[doc = ""]
2898 #[doc = " \\return"]
2899 #[doc = " ::NVFBC_SUCCESS \\n"]
2900 #[doc = " ::NVFBC_ERR_INVALID_HANDLE \\n"]
2901 #[doc = " ::NVFBC_ERR_API_VERSION \\n"]
2902 #[doc = " ::NVFBC_ERR_BAD_REQUEST \\n"]
2903 #[doc = " ::NVFBC_ERR_INTERNAL \\n"]
2904 #[doc = " ::NVFBC_ERR_CONTEXT \\n"]
2905 #[doc = " ::NVFBC_ERR_UNSUPPORTED \\n"]
2906 #[doc = " ::NVFBC_ERR_INVALID_PTR \\n"]
2907 #[doc = " ::NVFBC_ERR_INVALID_PARAM \\n"]
2908 #[doc = " ::NVFBC_ERR_OUT_OF_MEMORY \\n"]
2909 #[doc = " ::NVFBC_ERR_X"]
2910 pub fn NvFBCToSysSetUp(sessionHandle: NVFBC_SESSION_HANDLE, pParams: *mut NVFBC_TOSYS_SETUP_PARAMS) -> NVFBCSTATUS;
2911}
2912extern "C" {
2913 #[doc = " \\brief Captures a frame to a buffer in system memory."]
2914 #[doc = ""]
2915 #[doc = " This function triggers a frame capture to a buffer in system memory that was"]
2916 #[doc = " registered with the ToSysSetUp() API call."]
2917 #[doc = ""]
2918 #[doc = " Note that it is possible that the resolution of the desktop changes while"]
2919 #[doc = " capturing frames. This should be transparent for the application."]
2920 #[doc = ""]
2921 #[doc = " When the resolution changes, the capture session is recreated using the same"]
2922 #[doc = " parameters, and necessary buffers are re-allocated. The frame counter is not"]
2923 #[doc = " reset."]
2924 #[doc = ""]
2925 #[doc = " An application can detect that the resolution changed by comparing the"]
2926 #[doc = " dwByteSize member of the ::NVFBC_FRAME_GRAB_INFO against a previous"]
2927 #[doc = " frame and/or dwWidth and dwHeight."]
2928 #[doc = ""]
2929 #[doc = " During a change of resolution the capture is paused even in asynchronous"]
2930 #[doc = " mode."]
2931 #[doc = ""]
2932 #[doc = " \\param [in] sessionHandle"]
2933 #[doc = " FBC session handle."]
2934 #[doc = " \\param [in] pParams"]
2935 #[doc = " ::NVFBC_TOSYS_GRAB_FRAME_PARAMS"]
2936 #[doc = ""]
2937 #[doc = " \\return"]
2938 #[doc = " ::NVFBC_SUCCESS \\n"]
2939 #[doc = " ::NVFBC_ERR_INVALID_HANDLE \\n"]
2940 #[doc = " ::NVFBC_ERR_API_VERSION \\n"]
2941 #[doc = " ::NVFBC_ERR_BAD_REQUEST \\n"]
2942 #[doc = " ::NVFBC_ERR_CONTEXT \\n"]
2943 #[doc = " ::NVFBC_ERR_INVALID_PTR \\n"]
2944 #[doc = " ::NVFBC_ERR_INTERNAL \\n"]
2945 #[doc = " ::NVFBC_ERR_X \\n"]
2946 #[doc = " ::NVFBC_ERR_MUST_RECREATE \\n"]
2947 #[doc = " \\see NvFBCCreateCaptureSession \\n"]
2948 #[doc = " \\see NvFBCToSysSetUp"]
2949 pub fn NvFBCToSysGrabFrame(
2950 sessionHandle: NVFBC_SESSION_HANDLE,
2951 pParams: *mut NVFBC_TOSYS_GRAB_FRAME_PARAMS,
2952 ) -> NVFBCSTATUS;
2953}
2954extern "C" {
2955 #[doc = " \\brief Sets up a capture to video memory session."]
2956 #[doc = ""]
2957 #[doc = " This function configures how the capture to video memory with CUDA interop"]
2958 #[doc = " should behave. It can be called anytime and several times after the capture"]
2959 #[doc = " session has been created. However, it must be called at least once prior"]
2960 #[doc = " to start capturing frames."]
2961 #[doc = ""]
2962 #[doc = " \\param [in] sessionHandle"]
2963 #[doc = " FBC session handle."]
2964 #[doc = ""]
2965 #[doc = " \\param [in] pParams"]
2966 #[doc = " ::NVFBC_TOCUDA_SETUP_PARAMS"]
2967 #[doc = ""]
2968 #[doc = " \\return"]
2969 #[doc = " ::NVFBC_SUCCESS \\n"]
2970 #[doc = " ::NVFBC_ERR_INVALID_HANDLE \\n"]
2971 #[doc = " ::NVFBC_ERR_API_VERSION \\n"]
2972 #[doc = " ::NVFBC_ERR_BAD_REQUEST \\n"]
2973 #[doc = " ::NVFBC_ERR_INTERNAL \\n"]
2974 #[doc = " ::NVFBC_ERR_CONTEXT \\n"]
2975 #[doc = " ::NVFBC_ERR_UNSUPPORTED \\n"]
2976 #[doc = " ::NVFBC_ERR_GL \\n"]
2977 #[doc = " ::NVFBC_ERR_X"]
2978 pub fn NvFBCToCudaSetUp(
2979 sessionHandle: NVFBC_SESSION_HANDLE,
2980 pParams: *mut NVFBC_TOCUDA_SETUP_PARAMS,
2981 ) -> NVFBCSTATUS;
2982}
2983extern "C" {
2984 #[doc = " \\brief Captures a frame to a CUDA device in video memory."]
2985 #[doc = ""]
2986 #[doc = " This function triggers a frame capture to a CUDA device in video memory."]
2987 #[doc = ""]
2988 #[doc = " Note about changes of resolution: \\see NvFBCToSysGrabFrame"]
2989 #[doc = ""]
2990 #[doc = " \\param [in] sessionHandle"]
2991 #[doc = " FBC session handle."]
2992 #[doc = ""]
2993 #[doc = " \\param [in] pParams"]
2994 #[doc = " ::NVFBC_TOCUDA_GRAB_FRAME_PARAMS"]
2995 #[doc = ""]
2996 #[doc = " \\return"]
2997 #[doc = " ::NVFBC_SUCCESS \\n"]
2998 #[doc = " ::NVFBC_ERR_INVALID_HANDLE \\n"]
2999 #[doc = " ::NVFBC_ERR_API_VERSION \\n"]
3000 #[doc = " ::NVFBC_ERR_BAD_REQUEST \\n"]
3001 #[doc = " ::NVFBC_ERR_CONTEXT \\n"]
3002 #[doc = " ::NVFBC_ERR_INVALID_PTR \\n"]
3003 #[doc = " ::NVFBC_ERR_CUDA \\n"]
3004 #[doc = " ::NVFBC_ERR_INTERNAL \\n"]
3005 #[doc = " ::NVFBC_ERR_X \\n"]
3006 #[doc = " ::NVFBC_ERR_MUST_RECREATE \\n"]
3007 #[doc = " \\see NvFBCCreateCaptureSession \\n"]
3008 #[doc = " \\see NvFBCToCudaSetUp"]
3009 pub fn NvFBCToCudaGrabFrame(
3010 sessionHandle: NVFBC_SESSION_HANDLE,
3011 pParams: *mut NVFBC_TOCUDA_GRAB_FRAME_PARAMS,
3012 ) -> NVFBCSTATUS;
3013}
3014extern "C" {
3015 #[doc = " \\brief Sets up a capture to OpenGL buffer in video memory session."]
3016 #[doc = ""]
3017 #[doc = " This function configures how the capture to video memory should behave."]
3018 #[doc = " It can be called anytime and several times after the capture session has been"]
3019 #[doc = " created. However, it must be called at least once prior to start capturing"]
3020 #[doc = " frames."]
3021 #[doc = ""]
3022 #[doc = " \\param [in] sessionHandle"]
3023 #[doc = " FBC session handle."]
3024 #[doc = ""]
3025 #[doc = " \\param [in] pParams"]
3026 #[doc = " ::NVFBC_TOGL_SETUP_PARAMS"]
3027 #[doc = ""]
3028 #[doc = " \\return"]
3029 #[doc = " ::NVFBC_SUCCESS \\n"]
3030 #[doc = " ::NVFBC_ERR_INVALID_HANDLE \\n"]
3031 #[doc = " ::NVFBC_ERR_API_VERSION \\n"]
3032 #[doc = " ::NVFBC_ERR_BAD_REQUEST \\n"]
3033 #[doc = " ::NVFBC_ERR_INTERNAL \\n"]
3034 #[doc = " ::NVFBC_ERR_CONTEXT \\n"]
3035 #[doc = " ::NVFBC_ERR_UNSUPPORTED \\n"]
3036 #[doc = " ::NVFBC_ERR_GL \\n"]
3037 #[doc = " ::NVFBC_ERR_X"]
3038 pub fn NvFBCToGLSetUp(sessionHandle: NVFBC_SESSION_HANDLE, pParams: *mut NVFBC_TOGL_SETUP_PARAMS) -> NVFBCSTATUS;
3039}
3040extern "C" {
3041 #[doc = " \\brief Captures a frame to an OpenGL buffer in video memory."]
3042 #[doc = ""]
3043 #[doc = " This function triggers a frame capture to a selected resource in video memory."]
3044 #[doc = ""]
3045 #[doc = " Note about changes of resolution: \\see NvFBCToSysGrabFrame"]
3046 #[doc = ""]
3047 #[doc = " \\param [in] sessionHandle"]
3048 #[doc = " FBC session handle."]
3049 #[doc = ""]
3050 #[doc = " \\param [in] pParams"]
3051 #[doc = " ::NVFBC_TOGL_GRAB_FRAME_PARAMS"]
3052 #[doc = ""]
3053 #[doc = " \\return"]
3054 #[doc = " ::NVFBC_SUCCESS \\n"]
3055 #[doc = " ::NVFBC_ERR_INVALID_HANDLE \\n"]
3056 #[doc = " ::NVFBC_ERR_API_VERSION \\n"]
3057 #[doc = " ::NVFBC_ERR_BAD_REQUEST \\n"]
3058 #[doc = " ::NVFBC_ERR_CONTEXT \\n"]
3059 #[doc = " ::NVFBC_ERR_INVALID_PTR \\n"]
3060 #[doc = " ::NVFBC_ERR_INTERNAL \\n"]
3061 #[doc = " ::NVFBC_ERR_X \\n"]
3062 #[doc = " ::NVFBC_ERR_MUST_RECREATE \\n"]
3063 #[doc = " \\see NvFBCCreateCaptureSession \\n"]
3064 #[doc = " \\see NvFBCToCudaSetUp"]
3065 pub fn NvFBCToGLGrabFrame(
3066 sessionHandle: NVFBC_SESSION_HANDLE,
3067 pParams: *mut NVFBC_TOGL_GRAB_FRAME_PARAMS,
3068 ) -> NVFBCSTATUS;
3069}
3070#[doc = " \\cond FBC_PFN"]
3071#[doc = ""]
3072#[doc = " Defines API function pointers"]
3073pub type PNVFBCGETLASTERRORSTR =
3074 ::std::option::Option<unsafe extern "C" fn(sessionHandle: NVFBC_SESSION_HANDLE) -> *const ::std::os::raw::c_char>;
3075pub type PNVFBCCREATEHANDLE = ::std::option::Option<
3076 unsafe extern "C" fn(
3077 pSessionHandle: *mut NVFBC_SESSION_HANDLE,
3078 pParams: *mut NVFBC_CREATE_HANDLE_PARAMS,
3079 ) -> NVFBCSTATUS,
3080>;
3081pub type PNVFBCDESTROYHANDLE = ::std::option::Option<
3082 unsafe extern "C" fn(sessionHandle: NVFBC_SESSION_HANDLE, pParams: *mut NVFBC_DESTROY_HANDLE_PARAMS) -> NVFBCSTATUS,
3083>;
3084pub type PNVFBCBINDCONTEXT = ::std::option::Option<
3085 unsafe extern "C" fn(sessionHandle: NVFBC_SESSION_HANDLE, pParams: *mut NVFBC_BIND_CONTEXT_PARAMS) -> NVFBCSTATUS,
3086>;
3087pub type PNVFBCRELEASECONTEXT = ::std::option::Option<
3088 unsafe extern "C" fn(
3089 sessionHandle: NVFBC_SESSION_HANDLE,
3090 pParams: *mut NVFBC_RELEASE_CONTEXT_PARAMS,
3091 ) -> NVFBCSTATUS,
3092>;
3093pub type PNVFBCGETSTATUS = ::std::option::Option<
3094 unsafe extern "C" fn(sessionHandle: NVFBC_SESSION_HANDLE, pParams: *mut NVFBC_GET_STATUS_PARAMS) -> NVFBCSTATUS,
3095>;
3096pub type PNVFBCCREATECAPTURESESSION = ::std::option::Option<
3097 unsafe extern "C" fn(
3098 sessionHandle: NVFBC_SESSION_HANDLE,
3099 pParams: *mut NVFBC_CREATE_CAPTURE_SESSION_PARAMS,
3100 ) -> NVFBCSTATUS,
3101>;
3102pub type PNVFBCDESTROYCAPTURESESSION = ::std::option::Option<
3103 unsafe extern "C" fn(
3104 sessionHandle: NVFBC_SESSION_HANDLE,
3105 pParams: *mut NVFBC_DESTROY_CAPTURE_SESSION_PARAMS,
3106 ) -> NVFBCSTATUS,
3107>;
3108pub type PNVFBCTOSYSSETUP = ::std::option::Option<
3109 unsafe extern "C" fn(sessionHandle: NVFBC_SESSION_HANDLE, pParams: *mut NVFBC_TOSYS_SETUP_PARAMS) -> NVFBCSTATUS,
3110>;
3111pub type PNVFBCTOSYSGRABFRAME = ::std::option::Option<
3112 unsafe extern "C" fn(
3113 sessionHandle: NVFBC_SESSION_HANDLE,
3114 pParams: *mut NVFBC_TOSYS_GRAB_FRAME_PARAMS,
3115 ) -> NVFBCSTATUS,
3116>;
3117pub type PNVFBCTOCUDASETUP = ::std::option::Option<
3118 unsafe extern "C" fn(sessionHandle: NVFBC_SESSION_HANDLE, pParams: *mut NVFBC_TOCUDA_SETUP_PARAMS) -> NVFBCSTATUS,
3119>;
3120pub type PNVFBCTOCUDAGRABFRAME = ::std::option::Option<
3121 unsafe extern "C" fn(
3122 sessionHandle: NVFBC_SESSION_HANDLE,
3123 pParams: *mut NVFBC_TOCUDA_GRAB_FRAME_PARAMS,
3124 ) -> NVFBCSTATUS,
3125>;
3126pub type PNVFBCTOGLSETUP = ::std::option::Option<
3127 unsafe extern "C" fn(sessionHandle: NVFBC_SESSION_HANDLE, pParams: *mut NVFBC_TOGL_SETUP_PARAMS) -> NVFBCSTATUS,
3128>;
3129pub type PNVFBCTOGLGRABFRAME = ::std::option::Option<
3130 unsafe extern "C" fn(
3131 sessionHandle: NVFBC_SESSION_HANDLE,
3132 pParams: *mut NVFBC_TOGL_GRAB_FRAME_PARAMS,
3133 ) -> NVFBCSTATUS,
3134>;
3135#[doc = " \\ingroup FBC_STRUCT"]
3136#[doc = ""]
3137#[doc = " Structure populated with API function pointers."]
3138#[repr(C)]
3139#[derive(Debug, Copy, Clone)]
3140pub struct NVFBC_API_FUNCTION_LIST {
3141 #[doc = "!< [in] Must be set to NVFBC_VERSION."]
3142 pub dwVersion: u32,
3143 #[doc = "!< [out] Pointer to ::NvFBCGetLastErrorStr()."]
3144 pub nvFBCGetLastErrorStr: PNVFBCGETLASTERRORSTR,
3145 #[doc = "!< [out] Pointer to ::NvFBCCreateHandle()."]
3146 pub nvFBCCreateHandle: PNVFBCCREATEHANDLE,
3147 #[doc = "!< [out] Pointer to ::NvFBCDestroyHandle()."]
3148 pub nvFBCDestroyHandle: PNVFBCDESTROYHANDLE,
3149 #[doc = "!< [out] Pointer to ::NvFBCGetStatus()."]
3150 pub nvFBCGetStatus: PNVFBCGETSTATUS,
3151 #[doc = "!< [out] Pointer to ::NvFBCCreateCaptureSession()."]
3152 pub nvFBCCreateCaptureSession: PNVFBCCREATECAPTURESESSION,
3153 #[doc = "!< [out] Pointer to ::NvFBCDestroyCaptureSession()."]
3154 pub nvFBCDestroyCaptureSession: PNVFBCDESTROYCAPTURESESSION,
3155 #[doc = "!< [out] Pointer to ::NvFBCToSysSetUp()."]
3156 pub nvFBCToSysSetUp: PNVFBCTOSYSSETUP,
3157 #[doc = "!< [out] Pointer to ::NvFBCToSysGrabFrame()."]
3158 pub nvFBCToSysGrabFrame: PNVFBCTOSYSGRABFRAME,
3159 #[doc = "!< [out] Pointer to ::NvFBCToCudaSetUp()."]
3160 pub nvFBCToCudaSetUp: PNVFBCTOCUDASETUP,
3161 #[doc = "!< [out] Pointer to ::NvFBCToCudaGrabFrame()."]
3162 pub nvFBCToCudaGrabFrame: PNVFBCTOCUDAGRABFRAME,
3163 #[doc = "!< [out] Retired. Do not use."]
3164 pub pad1: *mut ::std::os::raw::c_void,
3165 #[doc = "!< [out] Retired. Do not use."]
3166 pub pad2: *mut ::std::os::raw::c_void,
3167 #[doc = "!< [out] Retired. Do not use."]
3168 pub pad3: *mut ::std::os::raw::c_void,
3169 #[doc = "!< [out] Pointer to ::NvFBCBindContext()."]
3170 pub nvFBCBindContext: PNVFBCBINDCONTEXT,
3171 #[doc = "!< [out] Pointer to ::NvFBCReleaseContext()."]
3172 pub nvFBCReleaseContext: PNVFBCRELEASECONTEXT,
3173 #[doc = "!< [out] Retired. Do not use."]
3174 pub pad4: *mut ::std::os::raw::c_void,
3175 #[doc = "!< [out] Retired. Do not use."]
3176 pub pad5: *mut ::std::os::raw::c_void,
3177 #[doc = "!< [out] Retired. Do not use."]
3178 pub pad6: *mut ::std::os::raw::c_void,
3179 #[doc = "!< [out] Retired. Do not use."]
3180 pub pad7: *mut ::std::os::raw::c_void,
3181 #[doc = "!< [out] Pointer to ::nvFBCToGLSetup()."]
3182 pub nvFBCToGLSetUp: PNVFBCTOGLSETUP,
3183 #[doc = "!< [out] Pointer to ::nvFBCToGLGrabFrame()."]
3184 pub nvFBCToGLGrabFrame: PNVFBCTOGLGRABFRAME,
3185}
3186#[test]
3187fn bindgen_test_layout_NVFBC_API_FUNCTION_LIST() {
3188 assert_eq!(
3189 ::std::mem::size_of::<NVFBC_API_FUNCTION_LIST>(),
3190 176usize,
3191 concat!("Size of: ", stringify!(NVFBC_API_FUNCTION_LIST))
3192 );
3193 assert_eq!(
3194 ::std::mem::align_of::<NVFBC_API_FUNCTION_LIST>(),
3195 8usize,
3196 concat!("Alignment of ", stringify!(NVFBC_API_FUNCTION_LIST))
3197 );
3198 fn test_field_dwVersion() {
3199 assert_eq!(
3200 unsafe {
3201 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3202 let ptr = uninit.as_ptr();
3203 ::std::ptr::addr_of!((*ptr).dwVersion) as usize - ptr as usize
3204 },
3205 0usize,
3206 concat!(
3207 "Offset of field: ",
3208 stringify!(NVFBC_API_FUNCTION_LIST),
3209 "::",
3210 stringify!(dwVersion)
3211 )
3212 );
3213 }
3214 test_field_dwVersion();
3215 fn test_field_nvFBCGetLastErrorStr() {
3216 assert_eq!(
3217 unsafe {
3218 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3219 let ptr = uninit.as_ptr();
3220 ::std::ptr::addr_of!((*ptr).nvFBCGetLastErrorStr) as usize - ptr as usize
3221 },
3222 8usize,
3223 concat!(
3224 "Offset of field: ",
3225 stringify!(NVFBC_API_FUNCTION_LIST),
3226 "::",
3227 stringify!(nvFBCGetLastErrorStr)
3228 )
3229 );
3230 }
3231 test_field_nvFBCGetLastErrorStr();
3232 fn test_field_nvFBCCreateHandle() {
3233 assert_eq!(
3234 unsafe {
3235 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3236 let ptr = uninit.as_ptr();
3237 ::std::ptr::addr_of!((*ptr).nvFBCCreateHandle) as usize - ptr as usize
3238 },
3239 16usize,
3240 concat!(
3241 "Offset of field: ",
3242 stringify!(NVFBC_API_FUNCTION_LIST),
3243 "::",
3244 stringify!(nvFBCCreateHandle)
3245 )
3246 );
3247 }
3248 test_field_nvFBCCreateHandle();
3249 fn test_field_nvFBCDestroyHandle() {
3250 assert_eq!(
3251 unsafe {
3252 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3253 let ptr = uninit.as_ptr();
3254 ::std::ptr::addr_of!((*ptr).nvFBCDestroyHandle) as usize - ptr as usize
3255 },
3256 24usize,
3257 concat!(
3258 "Offset of field: ",
3259 stringify!(NVFBC_API_FUNCTION_LIST),
3260 "::",
3261 stringify!(nvFBCDestroyHandle)
3262 )
3263 );
3264 }
3265 test_field_nvFBCDestroyHandle();
3266 fn test_field_nvFBCGetStatus() {
3267 assert_eq!(
3268 unsafe {
3269 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3270 let ptr = uninit.as_ptr();
3271 ::std::ptr::addr_of!((*ptr).nvFBCGetStatus) as usize - ptr as usize
3272 },
3273 32usize,
3274 concat!(
3275 "Offset of field: ",
3276 stringify!(NVFBC_API_FUNCTION_LIST),
3277 "::",
3278 stringify!(nvFBCGetStatus)
3279 )
3280 );
3281 }
3282 test_field_nvFBCGetStatus();
3283 fn test_field_nvFBCCreateCaptureSession() {
3284 assert_eq!(
3285 unsafe {
3286 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3287 let ptr = uninit.as_ptr();
3288 ::std::ptr::addr_of!((*ptr).nvFBCCreateCaptureSession) as usize - ptr as usize
3289 },
3290 40usize,
3291 concat!(
3292 "Offset of field: ",
3293 stringify!(NVFBC_API_FUNCTION_LIST),
3294 "::",
3295 stringify!(nvFBCCreateCaptureSession)
3296 )
3297 );
3298 }
3299 test_field_nvFBCCreateCaptureSession();
3300 fn test_field_nvFBCDestroyCaptureSession() {
3301 assert_eq!(
3302 unsafe {
3303 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3304 let ptr = uninit.as_ptr();
3305 ::std::ptr::addr_of!((*ptr).nvFBCDestroyCaptureSession) as usize - ptr as usize
3306 },
3307 48usize,
3308 concat!(
3309 "Offset of field: ",
3310 stringify!(NVFBC_API_FUNCTION_LIST),
3311 "::",
3312 stringify!(nvFBCDestroyCaptureSession)
3313 )
3314 );
3315 }
3316 test_field_nvFBCDestroyCaptureSession();
3317 fn test_field_nvFBCToSysSetUp() {
3318 assert_eq!(
3319 unsafe {
3320 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3321 let ptr = uninit.as_ptr();
3322 ::std::ptr::addr_of!((*ptr).nvFBCToSysSetUp) as usize - ptr as usize
3323 },
3324 56usize,
3325 concat!(
3326 "Offset of field: ",
3327 stringify!(NVFBC_API_FUNCTION_LIST),
3328 "::",
3329 stringify!(nvFBCToSysSetUp)
3330 )
3331 );
3332 }
3333 test_field_nvFBCToSysSetUp();
3334 fn test_field_nvFBCToSysGrabFrame() {
3335 assert_eq!(
3336 unsafe {
3337 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3338 let ptr = uninit.as_ptr();
3339 ::std::ptr::addr_of!((*ptr).nvFBCToSysGrabFrame) as usize - ptr as usize
3340 },
3341 64usize,
3342 concat!(
3343 "Offset of field: ",
3344 stringify!(NVFBC_API_FUNCTION_LIST),
3345 "::",
3346 stringify!(nvFBCToSysGrabFrame)
3347 )
3348 );
3349 }
3350 test_field_nvFBCToSysGrabFrame();
3351 fn test_field_nvFBCToCudaSetUp() {
3352 assert_eq!(
3353 unsafe {
3354 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3355 let ptr = uninit.as_ptr();
3356 ::std::ptr::addr_of!((*ptr).nvFBCToCudaSetUp) as usize - ptr as usize
3357 },
3358 72usize,
3359 concat!(
3360 "Offset of field: ",
3361 stringify!(NVFBC_API_FUNCTION_LIST),
3362 "::",
3363 stringify!(nvFBCToCudaSetUp)
3364 )
3365 );
3366 }
3367 test_field_nvFBCToCudaSetUp();
3368 fn test_field_nvFBCToCudaGrabFrame() {
3369 assert_eq!(
3370 unsafe {
3371 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3372 let ptr = uninit.as_ptr();
3373 ::std::ptr::addr_of!((*ptr).nvFBCToCudaGrabFrame) as usize - ptr as usize
3374 },
3375 80usize,
3376 concat!(
3377 "Offset of field: ",
3378 stringify!(NVFBC_API_FUNCTION_LIST),
3379 "::",
3380 stringify!(nvFBCToCudaGrabFrame)
3381 )
3382 );
3383 }
3384 test_field_nvFBCToCudaGrabFrame();
3385 fn test_field_pad1() {
3386 assert_eq!(
3387 unsafe {
3388 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3389 let ptr = uninit.as_ptr();
3390 ::std::ptr::addr_of!((*ptr).pad1) as usize - ptr as usize
3391 },
3392 88usize,
3393 concat!(
3394 "Offset of field: ",
3395 stringify!(NVFBC_API_FUNCTION_LIST),
3396 "::",
3397 stringify!(pad1)
3398 )
3399 );
3400 }
3401 test_field_pad1();
3402 fn test_field_pad2() {
3403 assert_eq!(
3404 unsafe {
3405 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3406 let ptr = uninit.as_ptr();
3407 ::std::ptr::addr_of!((*ptr).pad2) as usize - ptr as usize
3408 },
3409 96usize,
3410 concat!(
3411 "Offset of field: ",
3412 stringify!(NVFBC_API_FUNCTION_LIST),
3413 "::",
3414 stringify!(pad2)
3415 )
3416 );
3417 }
3418 test_field_pad2();
3419 fn test_field_pad3() {
3420 assert_eq!(
3421 unsafe {
3422 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3423 let ptr = uninit.as_ptr();
3424 ::std::ptr::addr_of!((*ptr).pad3) as usize - ptr as usize
3425 },
3426 104usize,
3427 concat!(
3428 "Offset of field: ",
3429 stringify!(NVFBC_API_FUNCTION_LIST),
3430 "::",
3431 stringify!(pad3)
3432 )
3433 );
3434 }
3435 test_field_pad3();
3436 fn test_field_nvFBCBindContext() {
3437 assert_eq!(
3438 unsafe {
3439 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3440 let ptr = uninit.as_ptr();
3441 ::std::ptr::addr_of!((*ptr).nvFBCBindContext) as usize - ptr as usize
3442 },
3443 112usize,
3444 concat!(
3445 "Offset of field: ",
3446 stringify!(NVFBC_API_FUNCTION_LIST),
3447 "::",
3448 stringify!(nvFBCBindContext)
3449 )
3450 );
3451 }
3452 test_field_nvFBCBindContext();
3453 fn test_field_nvFBCReleaseContext() {
3454 assert_eq!(
3455 unsafe {
3456 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3457 let ptr = uninit.as_ptr();
3458 ::std::ptr::addr_of!((*ptr).nvFBCReleaseContext) as usize - ptr as usize
3459 },
3460 120usize,
3461 concat!(
3462 "Offset of field: ",
3463 stringify!(NVFBC_API_FUNCTION_LIST),
3464 "::",
3465 stringify!(nvFBCReleaseContext)
3466 )
3467 );
3468 }
3469 test_field_nvFBCReleaseContext();
3470 fn test_field_pad4() {
3471 assert_eq!(
3472 unsafe {
3473 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3474 let ptr = uninit.as_ptr();
3475 ::std::ptr::addr_of!((*ptr).pad4) as usize - ptr as usize
3476 },
3477 128usize,
3478 concat!(
3479 "Offset of field: ",
3480 stringify!(NVFBC_API_FUNCTION_LIST),
3481 "::",
3482 stringify!(pad4)
3483 )
3484 );
3485 }
3486 test_field_pad4();
3487 fn test_field_pad5() {
3488 assert_eq!(
3489 unsafe {
3490 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3491 let ptr = uninit.as_ptr();
3492 ::std::ptr::addr_of!((*ptr).pad5) as usize - ptr as usize
3493 },
3494 136usize,
3495 concat!(
3496 "Offset of field: ",
3497 stringify!(NVFBC_API_FUNCTION_LIST),
3498 "::",
3499 stringify!(pad5)
3500 )
3501 );
3502 }
3503 test_field_pad5();
3504 fn test_field_pad6() {
3505 assert_eq!(
3506 unsafe {
3507 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3508 let ptr = uninit.as_ptr();
3509 ::std::ptr::addr_of!((*ptr).pad6) as usize - ptr as usize
3510 },
3511 144usize,
3512 concat!(
3513 "Offset of field: ",
3514 stringify!(NVFBC_API_FUNCTION_LIST),
3515 "::",
3516 stringify!(pad6)
3517 )
3518 );
3519 }
3520 test_field_pad6();
3521 fn test_field_pad7() {
3522 assert_eq!(
3523 unsafe {
3524 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3525 let ptr = uninit.as_ptr();
3526 ::std::ptr::addr_of!((*ptr).pad7) as usize - ptr as usize
3527 },
3528 152usize,
3529 concat!(
3530 "Offset of field: ",
3531 stringify!(NVFBC_API_FUNCTION_LIST),
3532 "::",
3533 stringify!(pad7)
3534 )
3535 );
3536 }
3537 test_field_pad7();
3538 fn test_field_nvFBCToGLSetUp() {
3539 assert_eq!(
3540 unsafe {
3541 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3542 let ptr = uninit.as_ptr();
3543 ::std::ptr::addr_of!((*ptr).nvFBCToGLSetUp) as usize - ptr as usize
3544 },
3545 160usize,
3546 concat!(
3547 "Offset of field: ",
3548 stringify!(NVFBC_API_FUNCTION_LIST),
3549 "::",
3550 stringify!(nvFBCToGLSetUp)
3551 )
3552 );
3553 }
3554 test_field_nvFBCToGLSetUp();
3555 fn test_field_nvFBCToGLGrabFrame() {
3556 assert_eq!(
3557 unsafe {
3558 let uninit = ::std::mem::MaybeUninit::<NVFBC_API_FUNCTION_LIST>::uninit();
3559 let ptr = uninit.as_ptr();
3560 ::std::ptr::addr_of!((*ptr).nvFBCToGLGrabFrame) as usize - ptr as usize
3561 },
3562 168usize,
3563 concat!(
3564 "Offset of field: ",
3565 stringify!(NVFBC_API_FUNCTION_LIST),
3566 "::",
3567 stringify!(nvFBCToGLGrabFrame)
3568 )
3569 );
3570 }
3571 test_field_nvFBCToGLGrabFrame();
3572}
3573extern "C" {
3574 #[doc = " \\ingroup FBC_FUNC"]
3575 #[doc = ""]
3576 #[doc = " \\brief Entry Points to the NvFBC interface."]
3577 #[doc = ""]
3578 #[doc = " Creates an instance of the NvFBC interface, and populates the"]
3579 #[doc = " pFunctionList with function pointers to the API routines implemented by"]
3580 #[doc = " the NvFBC interface."]
3581 #[doc = ""]
3582 #[doc = " \\param [out] pFunctionList"]
3583 #[doc = ""]
3584 #[doc = " \\return"]
3585 #[doc = " ::NVFBC_SUCCESS \\n"]
3586 #[doc = " ::NVFBC_ERR_INVALID_PTR \\n"]
3587 #[doc = " ::NVFBC_ERR_API_VERSION"]
3588 pub fn NvFBCCreateInstance(pFunctionList: *mut NVFBC_API_FUNCTION_LIST) -> NVFBCSTATUS;
3589}
3590#[doc = " \\ingroup FBC_FUNC"]
3591#[doc = ""]
3592#[doc = " Defines function pointer for the ::NvFBCCreateInstance() API call."]
3593pub type PNVFBCCREATEINSTANCE =
3594 ::std::option::Option<unsafe extern "C" fn(pFunctionList: *mut NVFBC_API_FUNCTION_LIST) -> NVFBCSTATUS>;