Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qffmpeghwaccel_videotoolbox_p.h
Go to the documentation of this file.
1
// Copyright (C) 2021 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
QFFMPEGHWACCEL_VIDEOTOOLBOX_P_H
4
#
define
QFFMPEGHWACCEL_VIDEOTOOLBOX_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
<
QtFFmpegMediaPluginImpl
/
private
/
qffmpeghwaccel_p
.
h
>
18
19
#
ifdef
Q_OS_DARWIN
20
21
#
include
<
QtCore
/
private
/
qcore_mac_p
.
h
>
22
23
#
include
<
CoreVideo
/
CVBase
.
h
>
24
25
#
include
<
CoreVideo
/
CVPixelBuffer
.
h
>
26
#
include
<
CoreVideo
/
CVImageBuffer
.
h
>
27
#
include
<
CoreVideo
/
CVMetalTexture
.
h
>
28
#
include
<
CoreVideo
/
CVMetalTextureCache
.
h
>
29
#
if
defined
(
Q_OS_MACOS
)
30
#
include
<
CoreVideo
/
CVOpenGLTextureCache
.
h
>
31
#
elif
defined
(
Q_OS_IOS
)
32
#
include
<
CoreVideo
/
CVOpenGLESTextureCache
.
h
>
33
#
endif
34
35
// forward-declare CVMetalTextureCacheRef for non-Objective C code
36
#
if
!
defined
(
__OBJC__
)
37
typedef
struct
CV_BRIDGED_TYPE(id)
38
__CVMetalTextureCache *CVMetalTextureCacheRef CV_SWIFT_NONSENDABLE;
39
#
endif
40
41
QT_BEGIN_NAMESPACE
42
43
class
QRhi;
44
45
namespace
QFFmpeg {
46
47
class
VideoToolBoxTextureConverter :
public
TextureConverterBackend
48
{
49
public
:
50
static
std::shared_ptr<VideoToolBoxTextureConverter> create(QRhi *rhi);
51
52
~VideoToolBoxTextureConverter();
53
54
using
TextureConverterBackend::createTextureHandles;
55
QVideoFrameTexturesHandlesUPtr
56
createTextureHandles(AVFrame *frame) override;
57
58
protected
:
59
explicit
VideoToolBoxTextureConverter(QRhi *rhi);
60
61
private
:
62
void
freeTextureCaches();
63
64
QCFType<CVMetalTextureCacheRef> m_cvMetalTextureCache;
65
#
if
defined
(
Q_OS_MACOS
)
66
QCFType<CVOpenGLTextureCacheRef> m_cvOpenGLTextureCache;
67
#
elif
defined
(
Q_OS_IOS
)
68
QCFType<CVOpenGLESTextureCacheRef> m_cvOpenGLESTextureCache;
69
#
endif
70
};
71
72
}
73
74
QT_END_NAMESPACE
75
76
#
endif
77
78
#
endif
qtmultimedia
src
plugins
multimedia
ffmpeg
darwin
qffmpeghwaccel_videotoolbox_p.h
Generated on
for Qt by
1.18.0