summaryrefslogtreecommitdiffstats
path: root/src/gsttools
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-01 03:03:28 +0200
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2019-10-01 07:28:44 +0000
commita330616496cf14e53db344513889444c6d60e7de (patch)
tree8e2b88bfbadfacb3c684dc7dc2fd8b18321e81ba /src/gsttools
parent48206ccc29154a2ebdbe14c549c84b2e590b6a06 (diff)
parent545959e45ec86c70617f4839d20d931297c30c20 (diff)
Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts: src/multimedia/video/qvideoframe.h Change-Id: I8458c4138be05f661d6528116cbc6b18298f0a91
Diffstat (limited to 'src/gsttools')
-rw-r--r--src/gsttools/qgstreamerplayercontrol.cpp48
-rw-r--r--src/gsttools/qgstreamerplayersession.cpp8
2 files changed, 22 insertions, 34 deletions
diff --git a/src/gsttools/qgstreamerplayercontrol.cpp b/src/gsttools/qgstreamerplayercontrol.cpp
index b49ec479f..bd4c90ac5 100644
--- a/src/gsttools/qgstreamerplayercontrol.cpp
+++ b/src/gsttools/qgstreamerplayercontrol.cpp
@@ -64,39 +64,27 @@ QGstreamerPlayerControl::QGstreamerPlayerControl(QGstreamerPlayerSession *sessio
m_resources = QMediaResourcePolicy::createResourceSet<QMediaPlayerResourceSetInterface>();
Q_ASSERT(m_resources);
- connect(m_session, SIGNAL(positionChanged(qint64)),
- this, SIGNAL(positionChanged(qint64)));
- connect(m_session, SIGNAL(durationChanged(qint64)),
- this, SIGNAL(durationChanged(qint64)));
- connect(m_session, SIGNAL(mutedStateChanged(bool)),
- this, SIGNAL(mutedChanged(bool)));
- connect(m_session, SIGNAL(volumeChanged(int)),
- this, SIGNAL(volumeChanged(int)));
- connect(m_session, SIGNAL(stateChanged(QMediaPlayer::State)),
- this, SLOT(updateSessionState(QMediaPlayer::State)));
- connect(m_session,SIGNAL(bufferingProgressChanged(int)),
- this, SLOT(setBufferProgress(int)));
- connect(m_session, SIGNAL(playbackFinished()),
- this, SLOT(processEOS()));
- connect(m_session, SIGNAL(audioAvailableChanged(bool)),
- this, SIGNAL(audioAvailableChanged(bool)));
- connect(m_session, SIGNAL(videoAvailableChanged(bool)),
- this, SIGNAL(videoAvailableChanged(bool)));
- connect(m_session, SIGNAL(seekableChanged(bool)),
- this, SIGNAL(seekableChanged(bool)));
- connect(m_session, SIGNAL(error(int,QString)),
- this, SIGNAL(error(int,QString)));
- connect(m_session, SIGNAL(invalidMedia()),
- this, SLOT(handleInvalidMedia()));
- connect(m_session, SIGNAL(playbackRateChanged(qreal)),
- this, SIGNAL(playbackRateChanged(qreal)));
-
- connect(m_resources, SIGNAL(resourcesGranted()), SLOT(handleResourcesGranted()));
+ connect(m_session, &QGstreamerPlayerSession::positionChanged, this, &QGstreamerPlayerControl::positionChanged);
+ connect(m_session, &QGstreamerPlayerSession::durationChanged, this, &QGstreamerPlayerControl::durationChanged);
+ connect(m_session, &QGstreamerPlayerSession::mutedStateChanged, this, &QGstreamerPlayerControl::mutedChanged);
+ connect(m_session, &QGstreamerPlayerSession::volumeChanged, this, &QGstreamerPlayerControl::volumeChanged);
+ connect(m_session, &QGstreamerPlayerSession::stateChanged, this, &QGstreamerPlayerControl::updateSessionState);
+ connect(m_session, &QGstreamerPlayerSession::bufferingProgressChanged, this, &QGstreamerPlayerControl::setBufferProgress);
+ connect(m_session, &QGstreamerPlayerSession::playbackFinished, this, &QGstreamerPlayerControl::processEOS);
+ connect(m_session, &QGstreamerPlayerSession::audioAvailableChanged, this, &QGstreamerPlayerControl::audioAvailableChanged);
+ connect(m_session, &QGstreamerPlayerSession::videoAvailableChanged, this, &QGstreamerPlayerControl::videoAvailableChanged);
+ connect(m_session, &QGstreamerPlayerSession::seekableChanged, this, &QGstreamerPlayerControl::seekableChanged);
+ connect(m_session, &QGstreamerPlayerSession::error, this, &QGstreamerPlayerControl::error);
+ connect(m_session, &QGstreamerPlayerSession::invalidMedia, this, &QGstreamerPlayerControl::handleInvalidMedia);
+ connect(m_session, &QGstreamerPlayerSession::playbackRateChanged, this, &QGstreamerPlayerControl::playbackRateChanged);
+
+ connect(m_resources, &QMediaPlayerResourceSetInterface::resourcesGranted, this, &QGstreamerPlayerControl::handleResourcesGranted);
//denied signal should be queued to have correct state update process,
//since in playOrPause, when acquire is call on resource set, it may trigger a resourcesDenied signal immediately,
//so handleResourcesDenied should be processed later, otherwise it will be overwritten by state update later in playOrPause.
- connect(m_resources, SIGNAL(resourcesDenied()), this, SLOT(handleResourcesDenied()), Qt::QueuedConnection);
- connect(m_resources, SIGNAL(resourcesLost()), SLOT(handleResourcesLost()));
+ connect(m_resources, &QMediaPlayerResourceSetInterface::resourcesDenied,
+ this, &QGstreamerPlayerControl::handleResourcesDenied, Qt::QueuedConnection);
+ connect(m_resources, &QMediaPlayerResourceSetInterface::resourcesLost, this, &QGstreamerPlayerControl::handleResourcesLost);
}
QGstreamerPlayerControl::~QGstreamerPlayerControl()
diff --git a/src/gsttools/qgstreamerplayersession.cpp b/src/gsttools/qgstreamerplayersession.cpp
index 891eecbb0..10e83342d 100644
--- a/src/gsttools/qgstreamerplayersession.cpp
+++ b/src/gsttools/qgstreamerplayersession.cpp
@@ -1155,10 +1155,10 @@ bool QGstreamerPlayerSession::processBusMessage(const QGstreamerMessage &message
gst_message_parse_state_changed(gm, &oldState, &newState, &pending);
#ifdef DEBUG_PLAYBIN
- QStringList states;
- states << QStringLiteral("GST_STATE_VOID_PENDING") << QStringLiteral("GST_STATE_NULL")
- << QStringLiteral("GST_STATE_READY") << QStringLiteral("GST_STATE_PAUSED")
- << QStringLiteral("GST_STATE_PLAYING");
+ static QStringList states = {
+ QStringLiteral("GST_STATE_VOID_PENDING"), QStringLiteral("GST_STATE_NULL"),
+ QStringLiteral("GST_STATE_READY"), QStringLiteral("GST_STATE_PAUSED"),
+ QStringLiteral("GST_STATE_PLAYING") };
qDebug() << QStringLiteral("state changed: old: %1 new: %2 pending: %3") \
.arg(states[oldState]) \