vpl_sys/raw.rs
1//! Generated oneVPL struct/union/typedef bindings (types only — see `build.rs`),
2//! plus the handful of opaque handle types `bindgen` never sees because their
3//! home headers (`mfxsession.h`) are not part of this crate's bindgen input
4//! (see `vendor/README.md`).
5//!
6//! C naming throughout — not `snake_case`/`CamelCase` by Rust convention, matching
7//! every other `-sys` crate.
8#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
9// Covers every clippy tier (default/style/complexity/pedantic/nursery) for this
10// crate's `bindgen`-generated code only — bitfield accessor helpers for union
11// branches this crate's Stage 1 does not use (e.g. `mfxA2RGB10`'s packed
12// B/G/R/A bitfields, pulled in only because they are a union member of
13// `mfxFrameData`) trip `useless_transmute`/`missing_safety_doc`/pedantic
14// lints that make no sense to hand-patch in generated output.
15#![allow(clippy::all, clippy::pedantic, clippy::nursery, missing_docs)]
16// `bindgen`'s generated bitfield accessor helpers (`__BindgenBitfieldUnit::raw_get`/`raw_set`,
17// used by the `#ifdef ONEVPL_EXPERIMENTAL`-only bitfield branch bindgen still parses the layout
18// of even though that macro is undefined for this crate's build) predate Rust 2024's
19// `unsafe_op_in_unsafe_fn` default; this crate never calls those bitfield accessors itself
20// (Stage 1 does not touch that struct branch), so the lint is silenced rather than hand-patched
21// generated code.
22#![allow(unsafe_op_in_unsafe_fn)]
23
24include!(concat!(env!("OUT_DIR"), "/mfx_types.rs"));
25
26/// Opaque oneVPL session handle (`mfxSession`, `typedef struct _mfxSession *mfxSession;` —
27/// `mfxsession.h`). An opaque pointer has no fields to get wrong by hand-declaring it here;
28/// `mfxsession.h` itself is not part of this crate's `bindgen` input (see `vendor/README.md`).
29pub type mfxSession = *mut core::ffi::c_void;
30
31/// Synchronization point object handle (`mfxSyncPoint`,
32/// `typedef struct _mfxSyncPoint *mfxSyncPoint;` — `mfxcommon.h` line 186). Forward-declared
33/// only upstream (never a defined struct body anywhere in oneVPL), and not reachable from any
34/// of this crate's `bindgen`-allowlisted root types (only referenced by function *signatures*,
35/// which `build.rs` ignores — see `vendor/README.md`), so hand-declared here like `mfxSession`
36/// above.
37pub type mfxSyncPoint = *mut core::ffi::c_void;