Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qgstreamervideooverlay_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 QGSTREAMERVIDEOOVERLAY_P_H
5#define QGSTREAMERVIDEOOVERLAY_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 <qgstpipeline_p.h>
20#include <qgst_p.h>
21#include <QtGui/qwindowdefs.h>
22
25
26class Q_MULTIMEDIA_EXPORT QGstreamerVideoOverlay
27 : public QObject
29 , private QGstreamerBufferProbe
30{
32public:
33 explicit QGstreamerVideoOverlay(QGstreamerVideoSink *parent = 0, const QByteArray &elementName = QByteArray());
35
36 QGstElement videoSink() const;
37 void setVideoSink(QGstElement);
38 QSize nativeVideoSize() const;
39
40 void setWindowHandle(WId id);
41 void setRenderRectangle(const QRect &rect);
42
43 void setAspectRatioMode(Qt::AspectRatioMode mode);
44 void setFullScreen(bool fullscreen);
45
46 bool processSyncMessage(const QGstreamerMessage &message) override;
47
48 bool isNull() const { return m_videoSink.isNull(); }
49
53
54private:
55 void probeCaps(GstCaps *caps) override;
56 void applyRenderRect();
57
58 QGstreamerVideoSink *m_gstreamerVideoSink = nullptr;
59 QGstElement m_videoSink;
60 QSize m_nativeVideoSize;
61
62 bool m_hasForceAspectRatio = false;
63 bool m_hasFullscreen = false;
64 Qt::AspectRatioMode m_aspectRatioMode = Qt::KeepAspectRatio;
65 bool m_fullScreen = false;
66
67 WId m_windowId = 0;
68 QRect renderRect;
69};
70
72
73#endif // QGSTREAMERVIDEOOVERLAY_P_H
74
\inmodule QtCore
Definition qbytearray.h:57
virtual void probeCaps(GstCaps *caps)
virtual bool processSyncMessage(const QGstreamerMessage &message)=0
\inmodule QtCore
Definition qobject.h:90
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
Definition qsize.h:25
rect
[4]
Combined button and popup list for selecting options.
AspectRatioMode
@ KeepAspectRatio
GLenum mode
GLuint GLsizei const GLchar * message
#define Q_OBJECT
#define Q_SIGNALS
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent