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.

Return

MFX_ERR_NONE The function completed successfully.

Since

This function is available since API version 1.0.

Parameters
  • [in] session: Session handle.

  • [in] allocator: Pointer to the mfxFrameAllocator structure

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.

Return

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.

Since

This function is available since API version 1.0.

Parameters
  • [in] session: Session handle.

  • [in] type: Handle type

  • [in] hdl: Handle to be set

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.

Return

MFX_ERR_NONE The function completed successfully.

MFX_ERR_UNDEFINED_BEHAVIOR Specified handle type not found.

Since

This function is available since API version 1.0.

Parameters
  • [in] session: Session handle.

  • [in] type: Handle type

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

MFXVideoCORE_QueryPlatform

mfxStatus MFXVideoCORE_QueryPlatform(mfxSession session, mfxPlatform *platform)

Returns information about current hardware platform in the Legacy mode.

Return

MFX_ERR_NONE The function completed successfully.

Since

This function is available since API version 1.19.

Parameters
  • [in] session: Session handle.

  • [out] platform: Pointer to the mfxPlatform structure

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.

Return

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.

Since

This function is available since API version 1.0.

Parameters
  • [in] session: Session handle.

  • [in] syncp: Sync point

  • [in] wait: wait time in milliseconds

Important

The MFXVideoCORE_SyncOperation() function is mandatory for any implementation.