VideoCORE#

Functions to perform external device and memory management and synchronization.

API#

MFXVideoCORE_SetFrameAllocator#

mfxStatus MFXVideoCORE_SetFrameAllocator(mfxSession session, mfxFrameAllocator *allocator)#

Sets the external allocator callback structure for frame allocation.

If the allocator argument is NULL, the library uses the default allocator, which allocates frames from system memory or hardware devices. The behavior of the API is undefined if it uses this function while the previous allocator is in use. A general guideline is to set the allocator immediately after initializing the session.

Since

This function is available since API version 1.0.

Parameters:
  • session[in] Session handle.

  • allocator[in] Pointer to the mfxFrameAllocator structure

Returns:

MFX_ERR_NONE The function completed successfully.

MFXVideoCORE_SetHandle#

mfxStatus MFXVideoCORE_SetHandle(mfxSession session, mfxHandleType type, mfxHDL hdl)#

Sets any essential system handle that the library might use.

If the specified system handle is a COM interface, the reference counter of the COM interface will increase. The counter will decrease when the session closes.

Since

This function is available since API version 1.0.

Parameters:
  • session[in] Session handle.

  • type[in] Handle type

  • hdl[in] Handle to be set

Returns:

MFX_ERR_NONE The function completed successfully.

MFX_ERR_UNDEFINED_BEHAVIOR The same handle is redefined. For example, the function has been called twice with the same handle type or an internal handle has been created before this function call. MFX_ERR_DEVICE_FAILED The SDK cannot initialize using the handle.

MFXVideoCORE_GetHandle#

mfxStatus MFXVideoCORE_GetHandle(mfxSession session, mfxHandleType type, mfxHDL *hdl)#

Obtains system handles previously set by the MFXVideoCORE_SetHandle function.

If the handler is a COM interface, the reference counter of the interface increases. The calling application must release the COM interface.

Since

This function is available since API version 1.0.

Parameters:
  • session[in] Session handle.

  • type[in] Handle type

  • hdl[in] Pointer to the handle to be set

Returns:

MFX_ERR_NONE The function completed successfully.

MFX_ERR_UNDEFINED_BEHAVIOR Specified handle type not found.

MFXVideoCORE_QueryPlatform#

mfxStatus MFXVideoCORE_QueryPlatform(mfxSession session, mfxPlatform *platform)#

Returns information about current hardware platform in the Legacy mode.

Since

This function is available since API version 1.19.

Parameters:
  • session[in] Session handle.

  • platform[out] Pointer to the mfxPlatform structure

Returns:

MFX_ERR_NONE The function completed successfully.

MFXVideoCORE_SyncOperation#

mfxStatus MFXVideoCORE_SyncOperation(mfxSession session, mfxSyncPoint syncp, mfxU32 wait)#

Initiates execution of an asynchronous function not already started and returns the status code after the specified asynchronous operation completes. If wait is zero, the function returns immediately.

Since

This function is available since API version 1.0.

Parameters:
  • session[in] Session handle.

  • syncp[in] Sync point

  • wait[in] wait time in milliseconds

Returns:

MFX_ERR_NONE The function completed successfully.

MFX_ERR_NONE_PARTIAL_OUTPUT The function completed successfully, bitstream contains a portion of the encoded frame according to required granularity.

MFX_WRN_IN_EXECUTION The specified asynchronous function is in execution.

MFX_ERR_ABORTED The specified asynchronous function aborted due to data dependency on a previous asynchronous function that did not complete.

Important

The MFXVideoCORE_SyncOperation() function is mandatory for any implementation.