diff options
author | Piotr Srebrny <piotr.srebrny@qt.io> | 2021-11-01 11:37:01 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-11-01 17:48:14 +0000 |
commit | e8d25ce6d89aad07314a21babbd6cbab14230ad8 (patch) | |
tree | 5ecf4428864471e25aca6e1c5ccc4628164a26d3 | |
parent | 10f7c93ba39bc53d4b888d47a250e2a6f57e368f (diff) | |
download | qtmultimedia-e8d25ce6d89aad07314a21babbd6cbab14230ad8.tar.gz |
Consume videoframes in sync with clock on fake video sink
Fake video sink should consume video frames in sync with the pipeline
clock. Otherwise, when no video output is connected to the media
player the audio and video streams are out of sync and the pipeline
position that is primarly based on the video stream position is
incorrect.
Fixes: QTBUG-97730
Change-Id: Ia940254ac6289bbe47c64f4294cb8f9c8b714527
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit a95ff0c8b84d770ea46b712d52c04eb5114e3b9f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/multimedia/platform/gstreamer/common/qgstreamervideooutput.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/multimedia/platform/gstreamer/common/qgstreamervideooutput.cpp b/src/multimedia/platform/gstreamer/common/qgstreamervideooutput.cpp index 81fefdfe3..d77bc29a4 100644 --- a/src/multimedia/platform/gstreamer/common/qgstreamervideooutput.cpp +++ b/src/multimedia/platform/gstreamer/common/qgstreamervideooutput.cpp @@ -56,6 +56,7 @@ QGstreamerVideoOutput::QGstreamerVideoOutput(QObject *parent) videoQueue = QGstElement("queue", "videoQueue"); videoConvert = QGstElement("videoconvert", "videoConvert"); videoSink = QGstElement("fakesink", "fakeVideoSink"); + videoSink.set("sync", true); gstVideoOutput.add(videoQueue, videoConvert, videoSink); if (!videoQueue.link(videoConvert, videoSink)) qCDebug(qLcMediaVideoOutput) << ">>>>>> linking failed"; @@ -87,6 +88,7 @@ void QGstreamerVideoOutput::setVideoSink(QVideoSink *sink) isFakeSink = false; } else { gstSink = QGstElement("fakesink", "fakevideosink"); + gstSink.set("sync", true); isFakeSink = true; } |