summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-02-12 14:36:30 +0100
committerLars Knoll <lars.knoll@qt.io>2021-02-17 08:28:28 +0000
commita6048657cafe1700b2377fa7ce1249d6140d48fa (patch)
treec17b3f644a817f3dbf9d811610cccfae80ac44fc
parent219cc6f943f45b58846677745cdd6150dfaa2869 (diff)
Move the player session into the player controlwip/qt6
Now the player control owns all the backend classes required for playback. Change-Id: I6f0356897e15fffeb5d993ca24ddf849c78650c1 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--src/multimedia/platform/gstreamer/common/qgstreamerplayercontrol.cpp4
-rw-r--r--src/multimedia/platform/gstreamer/common/qgstreamerplayercontrol_p.h2
-rw-r--r--src/multimedia/platform/gstreamer/mediaplayer/qgstreamerplayerservice.cpp3
-rw-r--r--src/multimedia/platform/gstreamer/mediaplayer/qgstreamerplayerservice_p.h1
4 files changed, 4 insertions, 6 deletions
diff --git a/src/multimedia/platform/gstreamer/common/qgstreamerplayercontrol.cpp b/src/multimedia/platform/gstreamer/common/qgstreamerplayercontrol.cpp
index e347d33a6..0017df93b 100644
--- a/src/multimedia/platform/gstreamer/common/qgstreamerplayercontrol.cpp
+++ b/src/multimedia/platform/gstreamer/common/qgstreamerplayercontrol.cpp
@@ -55,10 +55,10 @@
QT_BEGIN_NAMESPACE
-QGstreamerPlayerControl::QGstreamerPlayerControl(QGstreamerPlayerSession *session, QObject *parent)
+QGstreamerPlayerControl::QGstreamerPlayerControl(QObject *parent)
: QMediaPlayerControl(parent)
- , m_session(session)
{
+ m_session = new QGstreamerPlayerSession(this);
connect(m_session, &QGstreamerPlayerSession::positionChanged, this, &QGstreamerPlayerControl::positionChanged);
connect(m_session, &QGstreamerPlayerSession::durationChanged, this, &QGstreamerPlayerControl::durationChanged);
connect(m_session, &QGstreamerPlayerSession::mutedStateChanged, this, &QGstreamerPlayerControl::mutedChanged);
diff --git a/src/multimedia/platform/gstreamer/common/qgstreamerplayercontrol_p.h b/src/multimedia/platform/gstreamer/common/qgstreamerplayercontrol_p.h
index 9e672f78a..313ca6e1c 100644
--- a/src/multimedia/platform/gstreamer/common/qgstreamerplayercontrol_p.h
+++ b/src/multimedia/platform/gstreamer/common/qgstreamerplayercontrol_p.h
@@ -66,7 +66,7 @@ class Q_MULTIMEDIA_EXPORT QGstreamerPlayerControl : public QMediaPlayerControl
Q_OBJECT
public:
- QGstreamerPlayerControl(QGstreamerPlayerSession *session, QObject *parent = 0);
+ QGstreamerPlayerControl(QObject *parent = 0);
~QGstreamerPlayerControl();
QGstreamerPlayerSession *session() { return m_session; }
diff --git a/src/multimedia/platform/gstreamer/mediaplayer/qgstreamerplayerservice.cpp b/src/multimedia/platform/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
index 6909789a5..f08f43d95 100644
--- a/src/multimedia/platform/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
+++ b/src/multimedia/platform/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
@@ -53,8 +53,7 @@ QT_BEGIN_NAMESPACE
QGstreamerPlayerService::QGstreamerPlayerService()
: QMediaPlatformPlayerInterface()
{
- m_session = new QGstreamerPlayerSession(this);
- m_control = new QGstreamerPlayerControl(m_session, this);
+ m_control = new QGstreamerPlayerControl(this);
}
QGstreamerPlayerService::~QGstreamerPlayerService()
diff --git a/src/multimedia/platform/gstreamer/mediaplayer/qgstreamerplayerservice_p.h b/src/multimedia/platform/gstreamer/mediaplayer/qgstreamerplayerservice_p.h
index 074e1b527..1dc1c8423 100644
--- a/src/multimedia/platform/gstreamer/mediaplayer/qgstreamerplayerservice_p.h
+++ b/src/multimedia/platform/gstreamer/mediaplayer/qgstreamerplayerservice_p.h
@@ -76,7 +76,6 @@ public:
private:
QGstreamerPlayerControl *m_control = nullptr;
- QGstreamerPlayerSession *m_session = nullptr;
};
QT_END_NAMESPACE