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
QFFmpeg::TextureBridge Class Referencefinal

#include <qffmpeghwaccel_d3d11_p.h>

+ Collaboration diagram for QFFmpeg::TextureBridge:

Public Member Functions

bool copyToSharedTex (ID3D11Device *dev, ID3D11DeviceContext *ctx, const ComPtr< ID3D11Texture2D > &tex, UINT index, const QSize &frameSize)
 
ComPtr< ID3D11Texture2D > copyFromSharedTex (const ComPtr< ID3D11Device1 > &dev, const ComPtr< ID3D11DeviceContext > &ctx)
 

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 we need to copy data from FFmpeg to RHI. FFmpeg and RHI uses different D3D devices.

Definition at line 51 of file qffmpeghwaccel_d3d11_p.h.

Member Function Documentation

◆ copyFromSharedTex()

ComPtr< ID3D11Texture2D > QFFmpeg::TextureBridge::copyFromSharedTex ( const ComPtr< ID3D11Device1 > & dev,
const ComPtr< ID3D11DeviceContext > & ctx )

Obtain a copy of the texture on a second device 'dev'

Definition at line 130 of file qffmpeghwaccel_d3d11.cpp.

◆ copyToSharedTex()

bool QFFmpeg::TextureBridge::copyToSharedTex ( ID3D11Device * dev,
ID3D11DeviceContext * ctx,
const ComPtr< ID3D11Texture2D > & tex,
UINT index,
const QSize & frameSize )

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 104 of file qffmpeghwaccel_d3d11.cpp.


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