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
qgstpipeline_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 qgstpipeline_p_H
5#define qgstpipeline_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 <QtCore/qobject.h>
20
21#include "qgst_p.h"
22
24
26
28public:
29 //returns true if message was processed and should be dropped, false otherwise
31};
32
33
35public:
36 //returns true if message was processed and should be dropped, false otherwise
38};
39
41
42class QGstPipeline : public QGstBin
43{
44public:
45 constexpr QGstPipeline() = default;
46 QGstPipeline(const QGstPipeline &) = default;
48 QGstPipeline &operator=(const QGstPipeline &) = default;
49 QGstPipeline &operator=(QGstPipeline &&) noexcept = default;
50 QGstPipeline(GstPipeline *, RefMode mode);
52
53 // installs QGstPipelinePrivate as "pipeline-private" gobject property
54 static QGstPipeline create(const char *name);
55 static QGstPipeline adopt(GstPipeline *);
56
57 // This is needed to help us avoid sending QVideoFrames or audio buffers to the
58 // application while we're prerolling the pipeline.
59 // QMediaPlayer is still in a stopped state, while we put the gstreamer pipeline into a
60 // Paused state so that we can get the required metadata of the stream and also have a fast
61 // transition to play.
62 bool inStoppedState() const;
63 void setInStoppedState(bool stopped);
64
66
71
72 GstStateChangeReturn setState(GstState state);
73
74 GstPipeline *pipeline() const { return GST_PIPELINE_CAST(get()); }
75
76 void processMessages(GstMessageType = GST_MESSAGE_ANY);
77
78 void dumpGraph(const char *fileName);
79
80 template <typename Functor>
82 {
83 beginConfig();
84 fn();
85 endConfig();
86 }
87
88 template <typename Functor>
90 {
91 if (pipeline)
92 pipeline.modifyPipelineWhileNotRunning(fn);
93 else
94 fn();
95 }
96
97 void flush();
98
99 bool seek(qint64 pos, double rate);
100 bool setPlaybackRate(double rate, bool applyToPipeline = true);
101 double playbackRate() const;
102
103 bool setPosition(qint64 pos);
104 qint64 position() const;
105
106 qint64 duration() const;
107
108private:
109 QGstPipelinePrivate *getPrivate() const;
110
111 void beginConfig();
112 void endConfig();
113};
114
116
117#endif
GstStateChangeReturn setState(GstState state)
GstPipeline * pipeline() const
bool inStoppedState() const
void installMessageFilter(QGstreamerSyncMessageFilter *filter)
void dumpGraph(const char *fileName)
QGstPipeline & operator=(QGstPipeline &&) noexcept=default
void removeMessageFilter(QGstreamerSyncMessageFilter *filter)
qint64 duration() const
static void modifyPipelineWhileNotRunning(QGstPipeline &&pipeline, Functor &&fn)
QGstPipeline(const QGstPipeline &)=default
constexpr QGstPipeline()=default
qint64 position() const
double playbackRate() const
QGstPipeline(QGstPipeline &&)=default
bool seek(qint64 pos, double rate)
void processMessages(GstMessageType=GST_MESSAGE_ANY)
void setInStoppedState(bool stopped)
void setFlushOnConfigChanges(bool flush)
bool setPlaybackRate(double rate, bool applyToPipeline=true)
QGstPipeline & operator=(const QGstPipeline &)=default
void modifyPipelineWhileNotRunning(Functor &&fn)
static QGstPipeline adopt(GstPipeline *)
virtual bool processBusMessage(const QGstreamerMessage &message)=0
virtual bool processSyncMessage(const QGstreamerMessage &message)=0
else opt state
[0]
Combined button and popup list for selecting options.
n void setPosition(void) \n\
GLenum mode
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLuint GLsizei const GLchar * message
GLuint name
GLuint GLenum * rate
long long qint64
Definition qtypes.h:60
view create()