obs-qsv: Allow for multiple QSV encoders

Allow multiple QSV encoders, usefull for live + recorded parallel
sessions.  The first QSV encoder will create a DirectX device and return
a handle / pointer.  Any additional QSV encoder will use that same
pointer to the DirectX device.  We keep track of the number of open
QSV encoders so that we wait to close the DirectX resources after all
encoders are closed.

Closes obsproject/obs-studio#1341
This commit is contained in:
Bird, Christopher
2018-06-25 10:50:49 -07:00
committed by jp9000
parent 8c910a9e3b
commit 3a08e858a6
6 changed files with 38 additions and 20 deletions

View File

@@ -95,7 +95,7 @@ typedef struct {
int GetFreeTaskIndex(Task* pTaskPool, mfxU16 nPoolSize);
// Initialize Intel Media SDK Session, device/display and memory manager
mfxStatus Initialize(mfxIMPL impl, mfxVersion ver, MFXVideoSession* pSession, mfxFrameAllocator* pmfxAllocator, bool bCreateSharedHandles = false, bool dx9hack = false);
mfxStatus Initialize(mfxIMPL impl, mfxVersion ver, MFXVideoSession* pSession, mfxFrameAllocator* pmfxAllocator, mfxHDL *deviceHandle = NULL, bool bCreateSharedHandles = false, bool dx9hack = false);
// Release resources (device/display)
void Release();