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
qgst_bus_p.h
Go to the documentation of this file.
1// Copyright (C) 2024 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 QGST_BUS_P_H
5#define QGST_BUS_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/qsocketnotifier.h>
19#include <QtCore/qwineventnotifier.h>
20#include <QtCore/qmutex.h>
21
22#include "qgst_p.h"
23#include "qgstreamermessage_p.h"
24
26
28{
29public:
30 // returns true if message was processed and should be dropped, false otherwise
32};
33
35{
36public:
37 // returns true if message was processed and should be dropped, false otherwise
39};
40
41class QGstBus : public QGstBusHandle
42{
43public:
44 explicit QGstBus(QGstBusHandle);
46
47 ~QGstBus();
48 QGstBus(const QGstBus &) = delete;
49 QGstBus(QGstBus &&) = delete;
50 QGstBus &operator=(const QGstBus &) = delete;
51 QGstBus &operator=(QGstBus &&) = delete;
52
57
58 bool processPendingMessage(GstMessageType type = GST_MESSAGE_ANY,
59 std::optional<std::chrono::nanoseconds> timeout = {});
60
61private:
62 void processAllPendingMessages();
63
64 static GstBusSyncReply syncGstBusFilter(GstBus *, GstMessage *, QGstBus *);
65
66 QGstBusHandle m_bus;
67
68#ifndef Q_OS_WIN
69 QSocketNotifier m_socketNotifier{ QSocketNotifier::Read };
70#else
71 QWinEventNotifier m_socketNotifier{};
72#endif
73 QMutex filterMutex;
74 QList<QGstreamerSyncMessageFilter *> syncFilters;
75 QList<QGstreamerBusMessageFilter *> busFilters;
76};
77
79
80#endif // QGST_BUS_P_H
QGstBus & operator=(QGstBus &&)=delete
QGstBus(QGstBusHandle)
Definition qgst_bus.cpp:8
QGstBus(QGstBus &&)=delete
void removeMessageFilter(QGstreamerSyncMessageFilter *)
Definition qgst_bus.cpp:59
QGstBus & operator=(const QGstBus &)=delete
void installMessageFilter(QGstreamerSyncMessageFilter *)
Definition qgst_bus.cpp:51
bool processPendingMessage(GstMessageType type=GST_MESSAGE_ANY, std::optional< std::chrono::nanoseconds > timeout={})
Definition qgst_bus.cpp:79
QGstBus(const QGstBus &)=delete
virtual bool processBusMessage(const QGstreamerMessage &message)=0
virtual bool processSyncMessage(const QGstreamerMessage &message)=0
\inmodule QtCore
Definition qmutex.h:281
\inmodule QtCore
\inmodule QtCore
Combined button and popup list for selecting options.
GLbitfield GLuint64 timeout
[4]
GLenum type
GLuint GLsizei const GLchar * message