134ffe924f
Intel committed an NDA disclaimer on each source file. The stated intention was that the NDA "added to OBS doesn't apply to open source code once it's been accepted by the community. You can remove it for your modifications". This quote is from an email chain involving Intel's legal team and developers. The NDA in the source files mistakenly triggers source code scanners that look for license violations. I have removed the comments that contain the NDA.
30 lines
1.2 KiB
C
30 lines
1.2 KiB
C
#pragma once
|
|
|
|
#include "common_utils.h"
|
|
|
|
#include <windows.h>
|
|
#include <d3d11.h>
|
|
#include <dxgi1_2.h>
|
|
#include <atlbase.h>
|
|
|
|
#define DEVICE_MGR_TYPE MFX_HANDLE_D3D11_DEVICE
|
|
|
|
// =================================================================
|
|
// DirectX functionality required to manage D3D surfaces
|
|
//
|
|
|
|
// Create DirectX 11 device context
|
|
// - Required when using D3D surfaces.
|
|
// - D3D Device created and handed to Intel Media SDK
|
|
// - Intel graphics device adapter will be determined automatically (does not have to be primary),
|
|
// but with the following caveats:
|
|
// - Device must be active (but monitor does NOT have to be attached)
|
|
// - Device must be enabled in BIOS. Required for the case when used together with a discrete graphics card
|
|
// - For switchable graphics solutions (mobile) make sure that Intel device is the active device
|
|
mfxStatus CreateHWDevice(mfxSession session, mfxHDL *deviceHandle, HWND hWnd,
|
|
bool bCreateSharedHandles);
|
|
void CleanupHWDevice();
|
|
void SetHWDeviceContext(CComPtr<ID3D11DeviceContext> devCtx);
|
|
CComPtr<ID3D11DeviceContext> GetHWDeviceContext();
|
|
void ClearYUVSurfaceD3D(mfxMemId memId);
|
|
void ClearRGBSurfaceD3D(mfxMemId memId); |