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
qgstreamervideooutput_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 QGSTREAMERVIDEOOUTPUT_P_H
5#define QGSTREAMERVIDEOOUTPUT_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 <private/qtmultimediaglobal_p.h>
20#include <private/qmultimediautils_p.h>
21#include <common/qgst_p.h>
24#include <qwaitcondition.h>
25#include <qmutex.h>
26#include <qpointer.h>
27
29
30class QVideoSink;
31
33{
35
36public:
37 static QMaybe<QGstreamerVideoOutput *> create(QObject *parent = nullptr);
39
41 QGstreamerVideoSink *gstreamerVideoSink() const { return m_videoSink; }
42
43 void setPipeline(const QGstPipeline &pipeline);
44
45 QGstElement gstElement() const { return gstVideoOutput; }
46 void linkSubtitleStream(QGstElement subtitleSrc);
48
49 void setIsPreview();
50 void flushSubtitles();
51
52 void setNativeSize(QSize);
54
55private:
56 QGstreamerVideoOutput(QGstElement videoConvert, QGstElement videoScale, QGstElement videoSink,
58
59 void doLinkSubtitleStream();
60 void updateNativeSize();
61
62 QPointer<QGstreamerVideoSink> m_videoSink;
63
64 // Gst elements
65 QGstPipeline gstPipeline;
66
67 QGstBin gstVideoOutput;
68 QGstElement videoQueue;
69 QGstElement videoConvert;
70 QGstElement videoScale;
71 QGstElement videoSink;
72
73 QGstElement subtitleSrc;
74 QGstElement subtitleSink;
75
76 QSize nativeSize;
77 QtVideo::Rotation rotation{};
78};
79
81
82#endif
void setPipeline(const QGstPipeline &pipeline)
QGstreamerVideoSink * gstreamerVideoSink() const
QGstElement gstElement() const
void linkSubtitleStream(QGstElement subtitleSrc)
void setVideoSink(QVideoSink *sink)
void setRotation(QtVideo::Rotation)
static QMaybe< QGstreamerVideoOutput * > create(QObject *parent=nullptr)
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\inmodule QtCore
Definition qsize.h:25
The QVideoSink class represents a generic sink for video data.
Definition qvideosink.h:22
Combined button and popup list for selecting options.
GLsizei GLenum GLboolean sink
#define Q_OBJECT