IDXGIFactoryMedia interface (dxgi1_3.h)

Creates swap chains for desktop media apps that use DirectComposition surfaces to decode and display video.


The IDXGIFactoryMedia interface inherits from the IUnknown interface. IDXGIFactoryMedia also has these types of members:


The IDXGIFactoryMedia interface has these methods.


Creates a YUV swap chain for an existing DirectComposition surface handle. (IDXGIFactoryMedia.CreateDecodeSwapChainForCompositionSurfaceHandle)

Creates a YUV swap chain for an existing DirectComposition surface handle. (IDXGIFactoryMedia.CreateSwapChainForCompositionSurfaceHandle)


To create a Microsoft DirectX Graphics Infrastructure (DXGI) media factory interface, pass IDXGIFactoryMedia into either the CreateDXGIFactory or CreateDXGIFactory1 function or call QueryInterface from a factory object returned by CreateDXGIFactory, CreateDXGIFactory1, or CreateDXGIFactory2.

Because you can create a Direct3D device without creating a swap chain, you might need to retrieve the factory that is used to create the device in order to create a swap chain. You can request the IDXGIDevice, IDXGIDevice1, IDXGIDevice2, or IDXGIDevice3 interface from the Direct3D device and then use the IDXGIObject::GetParent method to locate the factory. The following code shows how.

IDXGIDevice2 * pDXGIDevice;
hr = g_pd3dDevice->QueryInterface(__uuidof(IDXGIDevice2), (void **)&pDXGIDevice);
IDXGIAdapter * pDXGIAdapter;
hr = pDXGIDevice->GetParent(__uuidof(IDXGIAdapter), (void **)&pDXGIAdapter);

IDXGIFactoryMedia * pIDXGIFactory;
pDXGIAdapter->GetParent(__uuidof(IDXGIFactoryMedia), (void **)&pIDXGIFactory);


Requirement Value
Minimum supported client Windows 8.1 [desktop apps only]
Minimum supported server Windows Server 2012 R2 [desktop apps only]
Target Platform Windows
Header dxgi1_3.h

See also

DXGI Interfaces