Transition Guide
Visible to Intel only — GUID: GUID-C3192233-7FAB-44C2-90EF-49BC734E57CA
New Dispatcher Initialization and Device Enumeration
In oneVPL, MFXInit/MFXInitEx is replaced by MFXLoad(). Refer to legacy-createsession and hello-createsession in the examples directory to compare them. The use of a side-by-side diff tool is recommended to see what changes in the 2.x enhanced API compared to the previous version of API.
Legacy approach to initialization of a oneVPL session:
// Initialize oneVPL session sts = MFXInit(cliParams.impl, &version, &session);
With the enhanced programming model in oneVPL 2.x API, the dispatcher is initialized like this:
// Initialize oneVPL session loader = MFXLoad(); cfg = MFXCreateConfig(loader); = MFXSetConfigFilterProperty( cfg, reinterpret_cast<mfxU8 *>(const_cast<char *>("mfxImplDescription.Impl")), cliParams.implValue);= MFXCreateSession(loader, 0, &session);
In the code above, MFXLoad() finds available implementations and then MFXSetConfigFilterProperty filters them to find the implementation that supplies the needed functionality.
Applications can walk through implementation capabilities if a more complex selection algorithm is needed. An example is provided with the vpl-inspect tool that shows implementations found by MFXLoad() and their capabilities:
$ ./vpl-inspect Implementation: oneAPI VPL CPU Reference Impl Version: 1.1 Impl: MFX_IMPL_SOFTWARE AccelerationMode: 0 ApiVersion: 2.1 License: Keywords: VendorID: 0x8086 VendorImplID: 0x0000 …