pub struct Loader { /* private fields */ }Expand description
A loaded oneVPL implementation library plus its resolved Stage 1 entry points.
Owns the libloading::Library (kept mapped for as long as any Session
built from it is alive — every fn pointer field is only ever called
through &self/&Session methods, never after both are dropped).
Implementations§
Source§impl Loader
impl Loader
Sourcepub fn open() -> Result<Self, VplError>
pub fn open() -> Result<Self, VplError>
Open the first working implementation library: ONEVPL_SEARCH_PATH
(if set, a single directory) is tried first for each candidate name,
then each candidate’s bare name (OS default search order). Returns
VplError::NotFound if nothing loads, or
VplError::MissingSymbol if a candidate loads but is missing one of
this crate’s required entry points (wrong/incompatible DLL).
§Errors
See variants above.
Sourcepub fn create_session(self, impl_hint: mfxIMPL) -> Result<Session, VplError>
pub fn create_session(self, impl_hint: mfxIMPL) -> Result<Session, VplError>
MFXInitEx — create a session against impl_hint (typically
crate::consts::MFX_IMPL_HARDWARE). Consumes self: a Session
owns its Loader for the rest of its lifetime (every later call
resolves through the same loaded library).
§Errors
VplError::Status when MFXInitEx returns a negative mfxStatus.