summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Srebrny <piotr.srebrny@qt.io>2021-11-02 17:00:46 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-11-03 12:00:55 +0000
commit8c98ed277aa73685df6a4abe6c46da2614021465 (patch)
treef7d56d248b9de92756a593d627b8b87ac447b25d
parentd5022b31221ce465f0cd536121ea650f34e9a23c (diff)
downloadqtmultimedia-8c98ed277aa73685df6a4abe6c46da2614021465.tar.gz
Use system clock on the pipeline instead of audio device clock
By default the pipeline uses the audio output device clock. When changing the audio output, the clock is lost and the pipeline must be paused and then put to the play state again. However, this process results in a complete stop of the pipeline. To avoid the clock switching problem, we can enforce the system clock on the pipeline that will never be changed. Change-Id: I00542060d14aa546f5945d863c59831caacf9fdc Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 0e259b5a0b90544d706594e581befaedcf914bdb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/multimedia/platform/gstreamer/common/qgstreamermediaplayer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/multimedia/platform/gstreamer/common/qgstreamermediaplayer.cpp b/src/multimedia/platform/gstreamer/common/qgstreamermediaplayer.cpp
index 999d3ba19..6f06041c3 100644
--- a/src/multimedia/platform/gstreamer/common/qgstreamermediaplayer.cpp
+++ b/src/multimedia/platform/gstreamer/common/qgstreamermediaplayer.cpp
@@ -135,6 +135,8 @@ QGstreamerMediaPlayer::QGstreamerMediaPlayer(QMediaPlayer *parent)
playerPipeline.installMessageFilter(static_cast<QGstreamerBusMessageFilter *>(this));
playerPipeline.installMessageFilter(static_cast<QGstreamerSyncMessageFilter *>(this));
+ gst_pipeline_use_clock(playerPipeline.pipeline(), gst_system_clock_obtain());
+
/* Taken from gstdicoverer.c:
* This is ugly. We get the GType of decodebin so we can quickly detect
* when a decodebin is added to uridecodebin so we can set the