Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qsgvideonode_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
4#ifndef QSGVIDEONODE_P_H
5#define QSGVIDEONODE_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 <QtQuick/qsgnode.h>
19#include <private/qtmultimediaquickglobal_p.h>
20#include "private/qvideotexturehelper_p.h"
21
22#include <QtMultimedia/qvideoframe.h>
23#include <QtMultimedia/qvideoframeformat.h>
24#include <QtGui/qopenglfunctions.h>
25
27
31
33{
34public:
37
38 QVideoFrameFormat::PixelFormat pixelFormat() const { return m_videoFormat.pixelFormat(); }
40 void setSurfaceFormat(const QRhiSwapChain::Format surfaceFormat);
41 void setHdrInfo(const QRhiSwapChainHdrInfo &hdrInfo);
42
43 void setTexturedRectGeometry(const QRectF &boundingRect, const QRectF &textureRect, int orientation);
44
45private:
46 void updateSubtitle(const QVideoFrame &frame);
47 void setSubtitleGeometry();
48
49 QQuickVideoOutput *m_parent = nullptr;
50 QRectF m_rect;
51 QRectF m_textureRect;
52 int m_orientation = -1;
53 int m_frameOrientation = -1;
54 bool m_frameMirrored = false;
55
56 QVideoFrameFormat m_videoFormat;
57 QSGVideoMaterial *m_material = nullptr;
58
60 QSGInternalTextNode *m_subtitleTextNode = nullptr;
61};
62
64
65#endif // QSGVIDEONODE_H
Render video or camera viewfinder.
\inmodule QtCore\reentrant
Definition qrect.h:484
Format
Describes the swapchain format.
Definition qrhi.h:1561
The QSGGeometryNode class is used for all rendered content in the scene graph.
Definition qsgnode.h:188
QSGNode * parent() const
Returns the parent node of this node.
Definition qsgnode.h:93
void setHdrInfo(const QRhiSwapChainHdrInfo &hdrInfo)
void setTexturedRectGeometry(const QRectF &boundingRect, const QRectF &textureRect, int orientation)
void setSurfaceFormat(const QRhiSwapChain::Format surfaceFormat)
QVideoFrameFormat::PixelFormat pixelFormat() const
QSGVideoNode(QQuickVideoOutput *parent, const QVideoFrameFormat &videoFormat)
void setCurrentFrame(const QVideoFrame &frame)
The QVideoFrameFormat class specifies the stream format of a video presentation surface.
PixelFormat
Enumerates video data types.
QVideoFrameFormat::PixelFormat pixelFormat() const
Returns the pixel format of frames in a video stream.
The QVideoFrame class represents a frame of video data.
Definition qvideoframe.h:27
Combined button and popup list for selecting options.
static const QRectF boundingRect(const QPointF *points, int pointCount)
QFrame frame
[0]
\inmodule QtGui
Definition qrhi.h:1511