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 QGSTREAMERMESSAGE_P_H
5#define QGSTREAMERMESSAGE_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 <private/qtmultimediaglobal_p.h>
19#include <qgst_p.h>
20
21QT_BEGIN_NAMESPACE
22
23// Required for QDoc workaround
24class QString;
25
26class Q_MULTIMEDIA_EXPORT QGstreamerMessage
27{
28public:
29 QGstreamerMessage() = default;
30 QGstreamerMessage(QGstreamerMessage const& m);
31 explicit QGstreamerMessage(GstMessage* message);
32 explicit QGstreamerMessage(const QGstStructure &structure);
33
34 ~QGstreamerMessage();
35
36 bool isNull() const { return !m_message; }
37 GstMessageType type() const { return GST_MESSAGE_TYPE(m_message); }
38 QGstObject source() const { return QGstObject(GST_MESSAGE_SRC(m_message), QGstObject::NeedsRef); }
39 QGstStructure structure() const { return QGstStructure(gst_message_get_structure(message: m_message)); }
40
41 GstMessage* rawMessage() const;
42
43 QGstreamerMessage& operator=(QGstreamerMessage const& rhs);
44
45private:
46 GstMessage* m_message = nullptr;
47};
48
49QT_END_NAMESPACE
50
51Q_DECLARE_METATYPE(QGstreamerMessage);
52
53#endif
54

source code of qtmultimedia/src/plugins/multimedia/gstreamer/common/qgstreamermessage_p.h