Qt 6.x
The Qt SDK
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 <private/qtmultimediaglobal_p.h>
19#include <QObject>
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{
44 QGstPipelinePrivate *d = nullptr;
45public:
46 constexpr QGstPipeline() = default;
49 QGstPipeline(const char *name);
50 QGstPipeline(GstPipeline *p);
51 ~QGstPipeline() override;
52
53 // This is needed to help us avoid sending QVideoFrames or audio buffers to the
54 // application while we're prerolling the pipeline.
55 // QMediaPlayer is still in a stopped state, while we put the gstreamer pipeline into a
56 // Paused state so that we can get the required metadata of the stream and also have a fast
57 // transition to play.
58 bool inStoppedState() const;
59 void setInStoppedState(bool stopped);
60
62
67
68 GstStateChangeReturn setState(GstState state);
69
70 GstPipeline *pipeline() const { return GST_PIPELINE_CAST(m_object); }
71
72 void dumpGraph(const char *fileName)
73 {
74 if (isNull())
75 return;
76
77#if 1 //def QT_GST_CAPTURE_DEBUG
78 GST_DEBUG_BIN_TO_DOT_FILE(bin(),
79 GstDebugGraphDetails(GST_DEBUG_GRAPH_SHOW_ALL |
80 GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE | GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS | GST_DEBUG_GRAPH_SHOW_STATES),
81 fileName);
82#else
84#endif
85 }
86
87 void beginConfig();
88 void endConfig();
89
90 void flush();
91
92 bool seek(qint64 pos, double rate);
93 bool setPlaybackRate(double rate);
94 double playbackRate() const;
95
97 qint64 position() const;
98
99 qint64 duration() const;
100};
101
103
104#endif
GstBin * bin() const
Definition qgst_p.h:564
GstState state() const
Definition qgst_p.h:456
GstObject * m_object
Definition qgst_p.h:233
bool isNull() const
Definition qgst_p.h:288
GstStateChangeReturn setState(GstState state)
GstPipeline * pipeline() const
bool inStoppedState() const
void installMessageFilter(QGstreamerSyncMessageFilter *filter)
void dumpGraph(const char *fileName)
void removeMessageFilter(QGstreamerSyncMessageFilter *filter)
qint64 duration() const
constexpr QGstPipeline()=default
qint64 position() const
QGstPipeline & operator=(const QGstPipeline &o)
double playbackRate() const
bool seek(qint64 pos, double rate)
bool setPlaybackRate(double rate)
void setInStoppedState(bool stopped)
~QGstPipeline() override
void setFlushOnConfigChanges(bool flush)
virtual bool processBusMessage(const QGstreamerMessage &message)=0
virtual bool processSyncMessage(const QGstreamerMessage &message)=0
Combined button and popup list for selecting options.
n void setPosition(void) \n\
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLuint GLsizei const GLchar * message
GLuint name
GLuint GLenum * rate
GLfloat GLfloat p
[1]
#define Q_UNUSED(x)
long long qint64
Definition qtypes.h:55