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
qwindowsd3d11texturereadback_p.h
Go to the documentation of this file.
1
// Copyright (C) 2026 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
#
ifndef
QWINDOWSD3D11TEXTUREREADBACK_P_H
4
#
define
QWINDOWSD3D11TEXTUREREADBACK_P_H
5
6
//
7
// W A R N I N G
8
// -------------
9
//
10
// This file is not part of the Qt API. It exists purely as an
11
// implementation detail. This header file may change from version to
12
// version without notice, or even be removed.
13
//
14
// We mean it.
15
//
16
17
#
include
<
QtMultimedia
/
qtmultimediaexports
.
h
>
18
#
include
<
QtMultimedia
/
qabstractvideobuffer
.
h
>
19
20
#
include
<
QtCore
/
qsize
.
h
>
21
#
include
<
QtCore
/
private
/
qcomptr_p
.
h
>
22
23
#
include
<
d3d11
.
h
>
24
#
include
<
d3d11_1
.
h
>
25
26
QT_BEGIN_NAMESPACE
27
28
namespace
QtMultimediaPrivate
{
29
30
/*! \internal
31
Copies a D3D11 texture into a CPU-accessible staging texture so that its pixels can be
32
read back, e.g. to implement QAbstractVideoBuffer::map() as a fallback when GPU import
33
into the sink's QRhi is unavailable.
34
*/
35
class
Q_MULTIMEDIA_EXPORT
QWindowsD3D11TextureReadback
36
{
37
public
:
38
/** Maps 'texture', owned by 'device', for CPU read access. 'frameSize' is the region of
39
* the texture that holds valid frame data. Returns an empty MapData on failure. Must be
40
* paired with a call to unmap(). Only one mapping may be active at a time. */
41
QAbstractVideoBuffer
::
MapData
map
(
const
ComPtr
<
ID3D11Device
> &,
const
ComPtr
<
ID3D11Texture2D
> &,
42
const
QSize
&
frameSize
);
43
void
unmap
();
44
45
private
:
46
ComPtr
<
ID3D11Texture2D
>
m_stagingTex
;
47
ComPtr
<
ID3D11DeviceContext
>
m_stagingCtx
;
48
bool
m_mapped
=
false
;
49
};
50
51
}
// namespace QtMultimediaPrivate
52
53
QT_END_NAMESPACE
54
55
#
endif
// QWINDOWSD3D11TEXTUREREADBACK_P_H
QtMultimediaPrivate::QWindowsD3D11TextureReadback
Definition
qwindowsd3d11texturereadback_p.h:36
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QtMultimediaPrivate::impl
Definition
qaudiosystem_p.h:257
qtmultimedia
src
multimedia
windows
qwindowsd3d11texturereadback_p.h
Generated on
for Qt by
1.16.1