IMFDXGIDeviceManager::GetVideoService method

Queries the Microsoft Direct3D device for an interface.

Syntax

HRESULT GetVideoService(
  HANDLE hDevice,
  REFIID riid,
  void   **ppService
);

Parameters

hDevice

A handle to the Direct3D device. To get the device handle, call IMFDXGIDeviceManager::OpenDeviceHandle.

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.

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
S_OK
Success.
E_HANDLE
The specified handle is not a Direct3D device handle.
MF_E_DXGI_DEVICE_NOT_INITIALIZED
The DXGI Device Manager was not initialized. The owner of the device must call IMFDXGIDeviceManager::ResetDevice.
MF_E_DXGI_NEW_VIDEO_DEVICE
The device handle is invalid.
E_NOINTERFACE
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

   
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)

See Also

IMFDXGIDeviceManager