Adapters

Functions that identify graphics adapters for Microsoft* DirectX* video processing, encoding, and decoding.

API

MFXQueryAdapters

mfxStatus MFXQueryAdapters(mfxComponentInfo *input_info, mfxAdaptersInfo *adapters)

Returns a list of adapters that are suitable to handle workload input_info. The list is sorted in priority order, with iGPU given the highest precedence. This rule may change in the future. If the input_info pointer is NULL, the list of all available adapters will be returned.

Return

MFX_ERR_NONE The function completed successfully.

MFX_ERR_NULL_PTR

input_info or adapters pointer is NULL.

MFX_ERR_NOT_FOUND No suitable adapters found.

MFX_WRN_OUT_OF_RANGE Not enough memory to report back entire list of adapters. In this case as many adapters as possible will be returned.

Since

This function is available since API version 1.31.

Parameters
  • [in] input_info: Pointer to workload description. See mfxComponentInfo description for details.

  • [out] adapters: Pointer to output description of all suitable adapters for input workload. See mfxAdaptersInfo description for details.

MFXQueryAdaptersDecode

mfxStatus MFXQueryAdaptersDecode(mfxBitstream *bitstream, mfxU32 codec_id, mfxAdaptersInfo *adapters)

Returns list of adapters that are suitable to decode the input bitstream. The list is sorted in priority order, with iGPU given the highest precedence. This rule may change in the future. This function is a simplification of MFXQueryAdapters, because bitstream is a description of the workload itself.

Return

MFX_ERR_NONE The function completed successfully.

MFX_ERR_NULL_PTR bitstream or

adapters pointer is NULL.

MFX_ERR_NOT_FOUND No suitable adapters found.

MFX_WRN_OUT_OF_RANGE Not enough memory to report back entire list of adapters. In this case as many adapters as possible will be returned.

Since

This function is available since API version 1.31.

Parameters
  • [in] bitstream: Pointer to bitstream with input data.

  • [in] codec_id: Codec ID to determine the type of codec for the input bitstream.

  • [out] adapters: Pointer to the output list of adapters. Memory should be allocated by user. See mfxAdaptersInfo description for details.

MFXQueryAdaptersNumber

mfxStatus MFXQueryAdaptersNumber(mfxU32 *num_adapters)

Returns the number of detected graphics adapters. It can be used before calling MFXQueryAdapters to determine the size of input data that the user will need to allocate.

Return

MFX_ERR_NONE The function completed successfully.

MFX_ERR_NULL_PTR num_adapters pointer is NULL.

Since

This function is available since API version 1.31.

Parameters
  • [out] num_adapters: Pointer for the output number of detected graphics adapters.