Dispatcher API Function Reference#

API#

MFXCreateConfig#

mfxConfig MFXCreateConfig(mfxLoader loader)#

Creates dispatcher configuration.

Creates the dispatcher internal configuration, which is used to filter out available implementations. This configuration is used to walk through selected implementations to gather more details and select the appropriate implementation to load. The loader object remembers all created mfxConfig objects and destroys them during the mfxUnload function call.

Multiple configurations per single mfxLoader object are possible.

Usage example:

mfxLoader loader = MFXLoad();
mfxConfig cfg = MFXCreateConfig(loader);
MFXCreateSession(loader,0,&session);
Since

This function is available since API version 2.0.

Parameters

loader[in] Loader handle.

Returns

Config handle or NULL pointer is failed.

MFXCreateSession#

mfxStatus MFXCreateSession(mfxLoader loader, mfxU32 i, mfxSession *session)#

Loads and initializes the implementation.

mfxLoader loader = MFXLoad();
int i=0;
while(1) {
   mfxImplDescription *idesc;
   MFXEnumImplementations(loader, i, MFX_IMPLCAPS_IMPLDESCSTRUCTURE, (mfxHDL*)&idesc);
   if(is_good(idesc)) {
       MFXCreateSession(loader, i,&session);
       // ...
       MFXDispReleaseImplDescription(loader, idesc);
   }
   else
   {
       MFXDispReleaseImplDescription(loader, idesc);
       break;
   }
}
Since

This function is available since API version 2.0.

Parameters
  • loader[in] Loader handle.

  • i[in] Index of the implementation.

  • session[out] Pointer to the session handle.

Returns

MFX_ERR_NONE The function completed successfully. The session contains a pointer to the session handle.

MFX_ERR_NULL_PTR If loader is NULL.

MFX_ERR_NULL_PTR If session is NULL.

MFX_ERR_NOT_FOUND Provided index is out of possible range.

MFXDispReleaseImplDescription#

mfxStatus MFXDispReleaseImplDescription(mfxLoader loader, mfxHDL hdl)#

Destroys handle allocated by the MFXEnumImplementations function.

Since

This function is available since API version 2.0.

Parameters
  • loader[in] Loader handle.

  • hdl[in] Handle to destroy. Can be equal to NULL.

Returns

MFX_ERR_NONE The function completed successfully.

MFX_ERR_NULL_PTR If loader is NULL.

MFX_ERR_INVALID_HANDLE Provided hdl handle is not associated with this loader.

MFXEnumImplementations#

mfxStatus MFXEnumImplementations(mfxLoader loader, mfxU32 i, mfxImplCapsDeliveryFormat format, mfxHDL *idesc)#

Iterates over filtered out implementations to gather their details. This function allocates memory to store mfxImplDescription structure instance. Use the MFXDispReleaseImplDescription function to free memory allocated to the mfxImplDescription structure.

Since

This function is available since API version 2.0.

Parameters
  • loader[in] Loader handle.

  • i[in] Index of the implementation.

  • format[in] Format in which capabilities need to be delivered. See the mfxImplCapsDeliveryFormat enumerator for more details.

  • idesc[out] Pointer to the mfxImplDescription structure.

Returns

MFX_ERR_NONE The function completed successfully. The idesc contains valid information.

MFX_ERR_NULL_PTR If loader is NULL.

MFX_ERR_NULL_PTR If idesc is NULL.

MFX_ERR_NOT_FOUND Provided index is out of possible range.

MFX_ERR_UNSUPPORTED If requested format is not supported.

MFXLoad#

mfxLoader MFXLoad(void)#

Creates the loader.

Since

This function is available since API version 2.0.

Returns

Loader Loader handle or NULL if failed.

MFXSetConfigFilterProperty#

mfxStatus MFXSetConfigFilterProperty(mfxConfig config, const mfxU8 *name, mfxVariant value)#

Adds additional filter properties (any fields of the mfxImplDescription structure) to the configuration of the loader object. One mfxConfig properties can hold only single filter property.

Since

This function is available since API version 2.0.

Note

Each new call with the same parameter name will overwrite the previously set value. This may invalidate other properties.

Note

Each new call with another parameter name will delete the previous property and create a new property based on new name’s value.

Parameters
  • config[in] Config handle.

  • name[in] Name of the parameter (see mfxImplDescription structure and example).

  • value[in] Value of the parameter.

Returns

MFX_ERR_NONE The function completed successfully. MFX_ERR_NULL_PTR If config is NULL.

MFX_ERR_NULL_PTR If name is NULL.

MFX_ERR_NOT_FOUND If name contains unknown parameter name. MFX_ERR_UNSUPPORTED If value data type does not equal the parameter with provided name.

MFXUnload#

void MFXUnload(mfxLoader loader)#

Destroys the dispatcher.

Since

This function is available since API version 2.0.

Parameters

loader[in] Loader handle.