Commit e75f67bc authored by Val Doroshchuk's avatar Val Doroshchuk

refact

parent 5403698c
......@@ -60,7 +60,6 @@ void QGstreamerPipelinePrivate::updateMediaObject()
Q_Q(QGstreamerPipeline);
QMediaPlayer *obj = qobject_cast<QMediaPlayer*>(source->property("mediaObject").value<QObject*>());
q->setMediaPlayer(obj);
}
......@@ -69,10 +68,8 @@ void QGstreamerPipelinePrivate::updatePipeline(bool ready)
Q_Q(QGstreamerPipeline);
emit rendererIsReady(ready);
if (!ready)
return;
q->setPipeline(pendingPipelineDesc);
if (ready)
q->setPipeline(pendingPipelineDesc);
}
QGstreamerPipeline::QGstreamerPipeline(QObject *parent)
......
......@@ -52,6 +52,7 @@
//
#include <QPointer>
#include <gst/gst.h>
QT_BEGIN_NAMESPACE
......@@ -59,7 +60,6 @@ class QMediaPlayer;
class QGstreamerPlayerSession;
class QGstreamerPipeline;
class QGstreamerVideoRendererInterface;
typedef struct _GstElement GstElement;
class QGstreamerPipelinePrivate : public QObject
{
Q_OBJECT
......
......@@ -41,7 +41,6 @@
#include "qgstreamerpipeline_p.h"
#include <private/qgstreamervideorendererinterface_p.h>
#include <QtMultimedia/qmediametadata.h>
#include <gst/gst.h>
QT_BEGIN_NAMESPACE
......@@ -103,12 +102,6 @@ void QGstreamerPlaybinPrivate::mediaPlayerChanged()
if (!isReady())
return;
connect(this, &QGstreamerPipelinePrivate::streamsChanged,
this, &QGstreamerPlaybinPrivate::onStreamsChanged);
connect(this, &QGstreamerPipelinePrivate::rendererIsReady,
this, &QGstreamerPlaybinPrivate::updatePlaybin);
// In case if these values've been applied
// before mediaObject is available.
q->setShowText(pendingShowText);
......@@ -243,6 +236,12 @@ QGstreamerPlaybin::QGstreamerPlaybin(QMediaPlayer *media, QObject *parent)
{
Q_D(QGstreamerPlaybin);
connect(d, &QGstreamerPipelinePrivate::streamsChanged,
d, &QGstreamerPlaybinPrivate::onStreamsChanged);
connect(d, &QGstreamerPipelinePrivate::rendererIsReady,
d, &QGstreamerPlaybinPrivate::updatePlaybin);
connect(this, &QGstreamerPipeline::mediaPlayerChanged,
d, &QGstreamerPlaybinPrivate::mediaPlayerChanged);
......
......@@ -46,7 +46,6 @@
QT_BEGIN_NAMESPACE
class QMediaPlayer;
class QGstreamerPlaybinPrivate;
class Q_MULTIMEDIA_EXPORT QGstreamerPlaybin : public QGstreamerPipeline
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment