I have one question regarding the SyncOpertion.
From the MediaSDK mannual, the usage is
mfxStatus MFXVideoCORE_SyncOperation(mfxSession session, mfxSyncPoint syncp, mfxU32 wait);
The description is as following:
"This function initiates execution of an asynchronous function not already started and returns the status code after the specified asynchronous operation completes. If waitis zero, the function returns immediately."
My question is: during the waiting period, is the CPU occupied, i.e., is the CPU keep querying the status of the operation in a loop? Or the CUP switch a different process/thread and will switch back the current process/thread once the operation is complete, just like wait for a event object in Windows?
The thread that makes the SyncOperation call will be blocked and context will be switched to other thread that is managing the video task(s). The method used to wait for completion is appropriate for the operating system and you should not see the CPU polling unnecessarily.