From 9eef3390241f8c6e25c5ccc7b1baa25058146927 Mon Sep 17 00:00:00 2001 From: VaL Doroshchuk Date: Tue, 10 Sep 2019 11:37:39 +0200 Subject: GStreamer: Recreate playbin after custom pipeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently if custom pipeline is set, old playbin elements are destroyed. And if normal url is passed again after the custom pipeline, it is unable to play. Because no playbin elements exist anymore. Adding a fix to recreate playbin elements if "not a pipeline url" is passed. Fixes: QTBUG-78079 Change-Id: I8b3498c4660639f5d757b322a136846ee82fdc28 Reviewed-by: Christian Strømme --- src/gsttools/qgstreamerplayersession_p.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gsttools/qgstreamerplayersession_p.h') diff --git a/src/gsttools/qgstreamerplayersession_p.h b/src/gsttools/qgstreamerplayersession_p.h index 69027eeb2..797229e69 100644 --- a/src/gsttools/qgstreamerplayersession_p.h +++ b/src/gsttools/qgstreamerplayersession_p.h @@ -210,6 +210,9 @@ private: void resumeVideoProbes(); bool parsePipeline(); bool setPipeline(GstElement *pipeline); + void resetElements(); + void initPlaybin(); + void setBus(GstBus *bus); QNetworkRequest m_request; QMediaPlayer::State m_state = QMediaPlayer::StoppedState; -- cgit v1.2.3