| 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 <QtMultimedia/private/qtmultimediaglobal_p.h> |
| 19 | #include <QtMultimedia/private/qsharedhandle_p.h> |
| 20 | #include "qgst_handle_types_p.h" |
| 21 | #include "qgst_p.h" |
| 22 | |
| 23 | QT_BEGIN_NAMESPACE |
| 24 | |
| 25 | class QGstreamerMessage : public QGstMessageHandle |
| 26 | { |
| 27 | using BaseClass = QGstMessageHandle; |
| 28 | |
| 29 | public: |
| 30 | using BaseClass::BaseClass; |
| 31 | QGstreamerMessage(const QGstreamerMessage &) = default; |
| 32 | QGstreamerMessage(QGstreamerMessage &&) noexcept = default; |
| 33 | QGstreamerMessage &operator=(const QGstreamerMessage &) = default; |
| 34 | QGstreamerMessage &operator=(QGstreamerMessage &&) noexcept = default; |
| 35 | |
| 36 | GstMessageType type() const { return GST_MESSAGE_TYPE(get()); } |
| 37 | QGstObject source() const { return QGstObject(GST_MESSAGE_SRC(get()), QGstObject::NeedsRef); } |
| 38 | QGstStructureView structure() const { return QGstStructureView(gst_message_get_structure(message: get())); } |
| 39 | |
| 40 | GstMessage *message() const { return get(); } |
| 41 | }; |
| 42 | |
| 43 | QT_END_NAMESPACE |
| 44 | |
| 45 | #endif |
| 46 |
