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
qohosvideooutput_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
4
#
ifndef
QOHOSVIDEOOUTPUT_P_H
5
#
define
QOHOSVIDEOOUTPUT_P_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
<
QtCore
/
qobject
.
h
>
19
#
include
<
QtCore
/
qpointer
.
h
>
20
#
include
<
QtCore
/
qsize
.
h
>
21
22
#
include
<
native_image
/
native_image
.
h
>
23
24
#
include
<
memory
>
25
26
QT_BEGIN_NAMESPACE
27
28
class
QVideoFrame;
29
class
QVideoSink;
30
class
QOhosSurfaceImage;
31
class
QOhosTextureThread
;
32
33
class
QOhosVideoOutput
:
public
QObject
34
{
35
Q_OBJECT
36
public
:
37
// Only camera frames follow the device and need the display rotation.
38
enum
class
ContentSource
{
Camera
,
MediaPlayer
};
39
40
explicit
QOhosVideoOutput
(QVideoSink *sink, ContentSource contentSource,
41
QObject *parent =
nullptr
);
42
~
QOhosVideoOutput
()
override
;
43
44
OHNativeWindow
*
nativeWindow
();
45
QByteArray
surfaceId
();
46
47
void
setVideoSize
(
const
QSize &size);
48
49
QVideoSink *
sink
()
const
{
return
m_sink; }
50
51
Q_SIGNALS
:
52
void
surfaceReady
();
53
54
private
Q_SLOTS
:
55
void
onNewFrame
(
const
QVideoFrame
&
frame
);
56
void
onRhiChanged();
57
void
updateDisplayRotation();
58
59
private
:
60
void
tearDownTextureThread();
61
QPointer<QVideoSink> m_sink;
62
ContentSource m_contentSource;
63
QSize m_videoSize;
64
std
::shared_ptr<
QOhosTextureThread
> m_textureThread;
65
bool
m_surfaceCreatedWithoutRhi{
false
};
66
};
67
68
QT_END_NAMESPACE
69
70
#
endif
// QOHOSVIDEOOUTPUT_P_H
QOhosTextureThread
Definition
qohosvideooutput.cpp:298
QOhosVideoOutput
Definition
qohosvideooutput_p.h:34
QOhosVideoOutput::setVideoSize
void setVideoSize(const QSize &size)
Definition
qohosvideooutput.cpp:587
QOhosVideoOutput::QOhosVideoOutput
QOhosVideoOutput(QVideoSink *sink, ContentSource contentSource, QObject *parent=nullptr)
Definition
qohosvideooutput.cpp:490
QOhosVideoOutput::nativeWindow
OHNativeWindow * nativeWindow()
Definition
qohosvideooutput.cpp:557
QOhosVideoOutput::sink
QVideoSink * sink() const
Definition
qohosvideooutput_p.h:49
QOhosVideoOutput::surfaceId
QByteArray surfaceId()
Definition
qohosvideooutput.cpp:570
QOhosVideoOutput::~QOhosVideoOutput
~QOhosVideoOutput() override
Definition
qohosvideooutput.cpp:543
QRhiVertexInputLayout
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
Definition
qrhi.h:326
QT_BEGIN_NAMESPACE::QOhosTextureVideoBuffer::QOhosTextureVideoBuffer
QOhosTextureVideoBuffer(std::unique_ptr< QRhiTexture > tex, const QSize &size, std::weak_ptr< QRhi > producerRhi, QPointer< QObject > producer, QPointer< QOpenGLContext > producerContext)
Definition
qohosvideooutput.cpp:63
QT_BEGIN_NAMESPACE::QOhosTextureVideoBuffer::mapTextures
QVideoFrameTexturesUPtr mapTextures(QRhi &rhi) override
Definition
qohosvideooutput.cpp:99
QT_BEGIN_NAMESPACE::QOhosTextureVideoBuffer::unmap
void unmap() override
Releases the memory mapped by the map() function.
Definition
qohosvideooutput.cpp:93
QT_BEGIN_NAMESPACE::QOhosTextureVideoBuffer::map
MapData map(QVideoFrame::MapMode mode) override
Maps the planes of a video buffer to memory.
Definition
qohosvideooutput.cpp:74
QT_BEGIN_NAMESPACE::QOhosVideoFrameTextures
Definition
qohosvideooutput.cpp:47
QT_BEGIN_NAMESPACE::QOhosVideoFrameTextures::texture
QRhiTexture * texture(uint plane) const override
Definition
qohosvideooutput.cpp:54
QT_BEGIN_NAMESPACE::QOhosVideoFrameTextures::QOhosVideoFrameTextures
QOhosVideoFrameTextures(QRhi *rhi, QSize size, quint64 handle)
Definition
qohosvideooutput.cpp:49
QT_BEGIN_NAMESPACE::TextureCopy
Definition
qohosvideooutput.cpp:168
QT_BEGIN_NAMESPACE::TextureCopy::copyExternalTexture
std::unique_ptr< QRhiTexture > copyExternalTexture(QSize size, const QMatrix4x4 &externalTexMatrix)
Definition
qohosvideooutput.cpp:248
QT_BEGIN_NAMESPACE::TextureCopy::TextureCopy
TextureCopy(QRhi *rhi, QRhiTexture *externalTex)
Definition
qohosvideooutput.cpp:170
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QT_BEGIN_NAMESPACE::g_quad
const float g_quad[]
Definition
qohosvideooutput.cpp:39
QT_BEGIN_NAMESPACE::newGraphicsPipeline
std::unique_ptr< QRhiGraphicsPipeline > newGraphicsPipeline(QRhi *rhi, QRhiShaderResourceBindings *srb, QRhiRenderPassDescriptor *rpd, QShader vs, QShader fs)
Definition
qohosvideooutput.cpp:223
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
qtmultimedia
src
plugins
multimedia
ohos
common
qohosvideooutput_p.h
Generated on
for Qt by
1.18.0