Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QtMultimediaPrivate::QWindowsD3D11TextureBridge Class Referencefinal

#include <qwindowsd3d11texturebridge_p.h>

Collaboration diagram for QtMultimediaPrivate::QWindowsD3D11TextureBridge:

Public Member Functions

bool copyToSharedTex (ID3D11Device *, ID3D11DeviceContext *, const ComPtr< ID3D11Texture2D > &, const QSize &frameSize, UINT index=0)
bool copyToSharedTex (const ComPtr< ID3D11Device > &, const ComPtr< ID3D11DeviceContext > &, const ComPtr< ID3D11Texture2D > &, const QSize &frameSize, UINT index=0)
ComPtr< ID3D11Texture2D > copyFromSharedTex (const ComPtr< ID3D11Device1 > &, const ComPtr< ID3D11DeviceContext > &)
bool copyFromSharedTex (const ComPtr< ID3D11Device1 > &, const ComPtr< ID3D11DeviceContext > &, const ComPtr< ID3D11Texture2D > &destination)

Detailed Description

Utility class for synchronized transfer of a texture between two D3D devices

This class is used to copy a texture from one device to another device. This is implemented using a shared texture, along with keyed mutexes to synchronize access to the texture.

This is needed because the source and destination may use different D3D devices, for example when copying a decoded frame owned by FFmpeg or the Windows Media Foundation media engine into a texture usable by RHI.

Definition at line 40 of file qwindowsd3d11texturebridge_p.h.

Member Function Documentation

◆ copyFromSharedTex() [1/2]

ComPtr< ID3D11Texture2D > QtMultimediaPrivate::QWindowsD3D11TextureBridge::copyFromSharedTex ( const ComPtr< ID3D11Device1 > & dev,
const ComPtr< ID3D11DeviceContext > & ctx )

Definition at line 64 of file qwindowsd3d11texturebridge.cpp.

◆ copyFromSharedTex() [2/2]

bool QtMultimediaPrivate::QWindowsD3D11TextureBridge::copyFromSharedTex ( const ComPtr< ID3D11Device1 > & dev,
const ComPtr< ID3D11DeviceContext > & ctx,
const ComPtr< ID3D11Texture2D > & destination )

Definition at line 76 of file qwindowsd3d11texturebridge.cpp.

◆ copyToSharedTex() [1/2]

bool QtMultimediaPrivate::QWindowsD3D11TextureBridge::copyToSharedTex ( const ComPtr< ID3D11Device > & device,
const ComPtr< ID3D11DeviceContext > & deviceContext,
const ComPtr< ID3D11Texture2D > & texture,
const QSize & frameSize,
UINT index = 0 )

Definition at line 55 of file qwindowsd3d11texturebridge.cpp.

◆ copyToSharedTex() [2/2]

bool QtMultimediaPrivate::QWindowsD3D11TextureBridge::copyToSharedTex ( ID3D11Device * dev,
ID3D11DeviceContext * ctx,
const ComPtr< ID3D11Texture2D > & tex,
const QSize & frameSize,
UINT index = 0 )

Copy a texture slice at position 'index' belonging to device 'dev' into a shared texture, limiting the texture size to the frame size

Definition at line 23 of file qwindowsd3d11texturebridge.cpp.


The documentation for this class was generated from the following files: