Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Queries the Microsoft Direct3D device for an interface.
Syntax
HRESULT GetVideoService(
[in] HANDLE hDevice,
[in] REFIID riid,
[out] void **ppService
);
Parameters
[in] hDevice
A handle to the Direct3D device. To get the device handle, call IMFDXGIDeviceManager::OpenDeviceHandle.
[in] riid
The interface identifier (IID) of the requested interface. The Direct3D device supports the following interfaces:
- ID3D11Device. To get a pointer to the Direct3D11 device, use IID_ID3D11Device as the riid.
- ID3D11VideoDevice. To get a pointer to the Direct3D11 video device, use IID_ID3D11VideoDevice as the riid.
[out] ppService
Receives a pointer to the requested interface. The caller must release the interface.
Return value
This method can return one of these values.
Return code | Description |
---|---|
|
Success. |
|
The specified handle is not a Direct3D device handle. |
|
The DXGI Device Manager was not initialized. The owner of the device must call IMFDXGIDeviceManager::ResetDevice. |
|
The device handle is invalid. |
|
If a ID3D11VideoDevice is specified and the D3D device created is using the reference rasterizer or WARP. Or it is a hardware device and you are using the Microsoft Basic Display Adapter. |
Remarks
If the method returns MF_E_DXGI_NEW_VIDEO_DEVICE, call IMFDXGIDeviceManager::CloseDeviceHandle to close the handle and then call OpenDeviceHandle again to get a new handle. The IMFDXGIDeviceManager::ResetDevice method invalidates all open device handles.
For more info see, Supporting Direct3D 11 Video Decoding in Media Foundation.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | mfobjects.h (include Mfidl.h) |