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
avfvideobuffer_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 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
4
#
ifndef
AVFVIDEOBUFFER_H
5
#
define
AVFVIDEOBUFFER_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is not part of the Qt API. It exists purely as an
12
// implementation detail. This header file may change from version to
13
// version without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#
include
<
QtMultimedia
/
private
/
qhwvideobuffer_p
.
h
>
19
#
include
<
QtCore
/
qmutex
.
h
>
20
#
include
<
QtCore
/
qobject
.
h
>
21
#
include
<
QtCore
/
private
/
qcore_mac_p
.
h
>
22
23
#
include
<
avfvideosink_p
.
h
>
24
25
#
include
<
CoreVideo
/
CVImageBuffer
.
h
>
26
27
#
import
<
Metal
/
Metal
.
h
>
28
29
QT_BEGIN_NAMESPACE
30
31
struct
AVFMetalTexture;
32
class
AVFVideoBuffer
:
public
QHwVideoBuffer
33
{
34
public
:
35
AVFVideoBuffer
(
AVFVideoSinkInterface
*sink, QCFType<CVImageBufferRef> buffer);
36
~
AVFVideoBuffer
()
override
;
37
38
MapData
map
(QVideoFrame::MapMode mode)
override
;
39
void
unmap
()
override
;
40
41
quint64
textureHandle
(QRhi &,
int
plane)
override
;
42
43
QVideoFrameFormat
videoFormat
()
const
{
return
m_format; }
44
45
private
:
46
47
#
if
QT_CONFIG
(
opengl
)
48
AVFVideoSinkInterface
*
sink
=
nullptr
;
49
#
if
defined
(
Q_OS_MACOS
)
50
QCFType
<
CVOpenGLTextureRef
>
cvOpenGLTexture
;
51
#
elif
defined
(
Q_OS_IOS
)
52
QCFType
<
CVOpenGLESTextureRef
>
cvOpenGLESTexture
;
53
#
endif
54
#
endif
55
56
QCFType<CVImageBufferRef> m_buffer;
57
QCFType<CVMetalTextureCacheRef> metalCache;
58
QCFType<CVMetalTextureRef> cvMetalTexture[3];
59
60
QVideoFrame::MapMode m_mode =
QVideoFrame
::
NotMapped
;
61
QVideoFrameFormat m_format;
62
};
63
64
QT_END_NAMESPACE
65
66
#
endif
rhiTextureFormatToMetalFormat
static MTLPixelFormat rhiTextureFormatToMetalFormat(QRhiTexture::Format f)
Definition
avfvideobuffer.mm:84
AVFVideoBuffer
Definition
avfvideobuffer_p.h:33
AVFVideoBuffer::map
MapData map(QVideoFrame::MapMode mode) override
Maps the planes of a video buffer to memory.
Definition
avfvideobuffer.mm:41
AVFVideoBuffer::videoFormat
QVideoFrameFormat videoFormat() const
Definition
avfvideobuffer_p.h:43
AVFVideoBuffer::~AVFVideoBuffer
~AVFVideoBuffer() override
Definition
avfvideobuffer.mm:36
AVFVideoBuffer::textureHandle
quint64 textureHandle(QRhi &, int plane) override
Definition
avfvideobuffer.mm:115
AVFVideoBuffer::unmap
void unmap() override
Releases the memory mapped by the map() function.
Definition
avfvideobuffer.mm:74
AVFVideoBuffer::AVFVideoBuffer
AVFVideoBuffer(AVFVideoSinkInterface *sink, QCFType< CVImageBufferRef > buffer)
Definition
avfvideobuffer.mm:22
AVFVideoSinkInterface
Definition
avfvideosink_p.h:52
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtmultimedia
src
plugins
multimedia
darwin
avfvideobuffer_p.h
Generated on
for Qt by
1.18.0