Replace the 'playbin' by the more recent 'playbin3' element. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> --- plugin/gstplayer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/gstplayer.cpp b/plugin/gstplayer.cpp index c0b12df..909843b 100644 --- a/plugin/gstplayer.cpp +++ b/plugin/gstplayer.cpp @@ -408,14 +408,14 @@ void QtGstPlayer::updatePipeline() QString prefix = "gst-pipeline:"; QString source = m_source; - /* default pipeline (playbin) */ + /* default pipeline (playbin3) */ if (source.indexOf(prefix) != 0) { - m_pipeline = gst_element_factory_make("playbin", NULL); + m_pipeline = gst_element_factory_make("playbin3", NULL); g_signal_connect(m_pipeline, "element-setup", G_CALLBACK(setup_element_callback), this); if (!m_pipeline) { - qCWarning(lcGstPlayer, "Failed to create playbin element, \ + qCWarning(lcGstPlayer, "Failed to create playbin3 element, \ is the GStreamer playback plugin installed?"); return; } -- 2.30.2
From: Lucas Stach <l.stach@pengutronix.de> Set the pipeline latency via the processing deadline property to something that can actually be reached under real system load. Also add some more slack to the allowed buffer lateness. As the whole pipeline is running at 30fps, the default 5ms is a bit harsh and drops frames that are still fine to present. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> --- plugin/gstplayer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/gstplayer.cpp b/plugin/gstplayer.cpp index 909843b..df2c0c9 100644 --- a/plugin/gstplayer.cpp +++ b/plugin/gstplayer.cpp @@ -378,7 +378,9 @@ void QtGstPlayer::updatePipeline() GstElement *upload = gst_element_factory_make("glupload", NULL); GstElement *sink = gst_element_factory_make("qmlglsink", NULL); - g_object_set(G_OBJECT(sink), "widget", m_sink, NULL); + g_object_set(G_OBJECT(sink), "widget", m_sink, + "processing-deadline", 35 * GST_MSECOND, + "max-lateness", 15 * GST_MSECOND, NULL); gst_bin_add_many(GST_BIN(sinkBin), upload, sink, NULL); gst_element_link_many(upload, sink, NULL); -- 2.30.2
From: Michael Tretter <m.tretter@pengutronix.de> The sync variable allows to disable sync on the GStreamer sink element. Currently it is set to true and never changed. With glibc 2.36, the variable conflicts with the definition of the `void sync()` symbol defined in /usr/include/unistd.h, which is a POSIX standard function. Having this variable is doubtful by itself, but conflicting with a POSIX declaration is bad. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> --- plugin/gstplayer.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/plugin/gstplayer.cpp b/plugin/gstplayer.cpp index df2c0c9..7679c50 100644 --- a/plugin/gstplayer.cpp +++ b/plugin/gstplayer.cpp @@ -10,8 +10,6 @@ Q_LOGGING_CATEGORY(lcGstPlayer, "gst.player", QtWarningMsg) -static bool sync = true; - QtGstPlayer::QtGstPlayer() : m_pipeline(NULL), m_sink(NULL), @@ -451,9 +449,6 @@ void QtGstPlayer::updatePipeline() g_signal_connect(m_pipeline, "deep-notify", G_CALLBACK(gst_object_default_deep_notify), NULL); - if (!sync) - g_object_set(G_OBJECT(sinkBin), "sync", FALSE, NULL); - setState(m_state); } -- 2.30.2
All 3 patches look good. Please push. mol On Mon, Feb 13, 2023 at 03:57:21PM +0100, Marco Felsch wrote: > Replace the 'playbin' by the more recent 'playbin3' element. > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> > --- > plugin/gstplayer.cpp | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/plugin/gstplayer.cpp b/plugin/gstplayer.cpp > index c0b12df..909843b 100644 > --- a/plugin/gstplayer.cpp > +++ b/plugin/gstplayer.cpp > @@ -408,14 +408,14 @@ void QtGstPlayer::updatePipeline() > QString prefix = "gst-pipeline:"; > QString source = m_source; > > - /* default pipeline (playbin) */ > + /* default pipeline (playbin3) */ > if (source.indexOf(prefix) != 0) { > - m_pipeline = gst_element_factory_make("playbin", NULL); > + m_pipeline = gst_element_factory_make("playbin3", NULL); > > g_signal_connect(m_pipeline, "element-setup", G_CALLBACK(setup_element_callback), this); > > if (!m_pipeline) { > - qCWarning(lcGstPlayer, "Failed to create playbin element, \ > + qCWarning(lcGstPlayer, "Failed to create playbin3 element, \ > is the GStreamer playback plugin installed?"); > return; > } > -- > 2.30.2 > > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Hi Michael,
On 23-02-13, Michael Olbrich wrote:
> All 3 patches look good. Please push.
Done, thanks for the review.
Regards,
Marco