4#include <QtCore/qmap.h>
5#include <QtCore/qtimer.h>
6#include <QtCore/qmutex.h>
7#include <QtCore/qlist.h>
8#include <QtCore/qabstracteventdispatcher.h>
9#include <QtCore/qcoreapplication.h>
10#include <QtCore/qproperty.h>
68 while ((
message = gst_bus_poll(
m_bus, GST_MESSAGE_ANY, 0)) !=
nullptr) {
76 if (
filter->processBusMessage(msg))
82 void processMessage(GstMessage*
message)
85 doProcessMessage(msg);
88 void queueMessage(GstMessage*
message)
95 static gboolean busCallback(GstBus *bus, GstMessage *
message, gpointer
data)
109 const bool hasGlib = dispatcher && dispatcher->
inherits(
"QEventDispatcherGlib");
116 m_tag = gst_bus_add_watch_full(bus, G_PRIORITY_DEFAULT, busCallback,
this,
nullptr);
119 gst_bus_set_sync_handler(bus, (GstBusSyncHandler)
syncGstBusFilter,
this,
nullptr);
127 gst_bus_remove_watch(
m_bus);
129 gst_bus_set_sync_handler(
m_bus,
nullptr,
nullptr,
nullptr);
130 gst_object_unref(GST_OBJECT(
m_bus));
184 :
QGstBin(GST_BIN(gst_pipeline_new(
name)), NeedsRef)
298 bool success = gst_element_seek(
element(),
rate, GST_FORMAT_TIME,
299 GstSeekFlags(GST_SEEK_FLAG_FLUSH),
300 GST_SEEK_TYPE_SET, from,
301 GST_SEEK_TYPE_SET, to);
330 if (gst_element_query_position(
element(), GST_FORMAT_TIME, &
pos))
338 if (!gst_element_query_duration(
element(), GST_FORMAT_TIME, &
d))
345#include "qgstpipeline.moc"
static QAbstractEventDispatcher * eventDispatcher()
Returns a pointer to the event dispatcher object for the main thread.
GstElement * element() const
bool setStateSync(GstState state)
QGstObject & operator=(const QGstObject &other)
void installMessageFilter(QGstreamerSyncMessageFilter *filter)
QGstPipelinePrivate(GstBus *bus, QObject *parent=0)
QList< QGstreamerBusMessageFilter * > busFilters
void removeMessageFilter(QGstreamerSyncMessageFilter *filter)
static GstBusSyncReply syncGstBusFilter(GstBus *bus, GstMessage *message, QGstPipelinePrivate *d)
bool m_flushOnConfigChanges
QList< QGstreamerSyncMessageFilter * > syncFilters
GstStateChangeReturn setState(GstState state)
GstPipeline * pipeline() const
bool inStoppedState() const
void installMessageFilter(QGstreamerSyncMessageFilter *filter)
void removeMessageFilter(QGstreamerSyncMessageFilter *filter)
constexpr QGstPipeline()=default
QGstPipeline & operator=(const QGstPipeline &o)
double playbackRate() const
bool seek(qint64 pos, double rate)
bool setPlaybackRate(double rate)
void setInStoppedState(bool stopped)
void setFlushOnConfigChanges(bool flush)
bool setPosition(qint64 pos)
qsizetype removeAll(const AT &t)
void append(parameter_type t)
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
bool inherits(const char *classname) const
Returns true if this object is an instance of a class that inherits className or a QObject subclass t...
void start(int msec)
Starts or restarts the timer with a timeout interval of msec milliseconds.
void setInterval(int msec)
Combined button and popup list for selecting options.
#define Q_ARG(Type, data)
GLbitfield GLuint64 timeout
[4]
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLuint GLsizei const GLchar * message
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
bool contains(const AT &t) const noexcept
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent