mailarchive of the pengutronix oss-tools mailing list
 help / color / mirror / Atom feed
* [OSS-Tools] [PATCH 1/3] gstplayer: make use of playbin3
@ 2023-02-13 14:57 Marco Felsch
  2023-02-13 14:57 ` [OSS-Tools] [PATCH 2/3] set pipeline latency and add some max-lateness slack Marco Felsch
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Marco Felsch @ 2023-02-13 14:57 UTC (permalink / raw)
  To: oss-tools, graphics

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [OSS-Tools] [PATCH 2/3] set pipeline latency and add some max-lateness slack
  2023-02-13 14:57 [OSS-Tools] [PATCH 1/3] gstplayer: make use of playbin3 Marco Felsch
@ 2023-02-13 14:57 ` Marco Felsch
  2023-02-13 14:57 ` [OSS-Tools] [PATCH 3/3] plugin: remove sync variable Marco Felsch
  2023-02-13 15:04 ` [OSS-Tools] [PATCH 1/3] gstplayer: make use of playbin3 Michael Olbrich
  2 siblings, 0 replies; 5+ messages in thread
From: Marco Felsch @ 2023-02-13 14:57 UTC (permalink / raw)
  To: oss-tools, graphics

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [OSS-Tools] [PATCH 3/3] plugin: remove sync variable
  2023-02-13 14:57 [OSS-Tools] [PATCH 1/3] gstplayer: make use of playbin3 Marco Felsch
  2023-02-13 14:57 ` [OSS-Tools] [PATCH 2/3] set pipeline latency and add some max-lateness slack Marco Felsch
@ 2023-02-13 14:57 ` Marco Felsch
  2023-02-13 15:04 ` [OSS-Tools] [PATCH 1/3] gstplayer: make use of playbin3 Michael Olbrich
  2 siblings, 0 replies; 5+ messages in thread
From: Marco Felsch @ 2023-02-13 14:57 UTC (permalink / raw)
  To: oss-tools, graphics

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OSS-Tools] [PATCH 1/3] gstplayer: make use of playbin3
  2023-02-13 14:57 [OSS-Tools] [PATCH 1/3] gstplayer: make use of playbin3 Marco Felsch
  2023-02-13 14:57 ` [OSS-Tools] [PATCH 2/3] set pipeline latency and add some max-lateness slack Marco Felsch
  2023-02-13 14:57 ` [OSS-Tools] [PATCH 3/3] plugin: remove sync variable Marco Felsch
@ 2023-02-13 15:04 ` Michael Olbrich
  2023-02-13 15:08   ` Marco Felsch
  2 siblings, 1 reply; 5+ messages in thread
From: Michael Olbrich @ 2023-02-13 15:04 UTC (permalink / raw)
  To: Marco Felsch; +Cc: oss-tools, graphics

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 |



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OSS-Tools] [PATCH 1/3] gstplayer: make use of playbin3
  2023-02-13 15:04 ` [OSS-Tools] [PATCH 1/3] gstplayer: make use of playbin3 Michael Olbrich
@ 2023-02-13 15:08   ` Marco Felsch
  0 siblings, 0 replies; 5+ messages in thread
From: Marco Felsch @ 2023-02-13 15:08 UTC (permalink / raw)
  To: oss-tools, graphics

Hi Michael,

On 23-02-13, Michael Olbrich wrote:
> All 3 patches look good. Please push.

Done, thanks for the review.

Regards,
  Marco



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-13 15:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-13 14:57 [OSS-Tools] [PATCH 1/3] gstplayer: make use of playbin3 Marco Felsch
2023-02-13 14:57 ` [OSS-Tools] [PATCH 2/3] set pipeline latency and add some max-lateness slack Marco Felsch
2023-02-13 14:57 ` [OSS-Tools] [PATCH 3/3] plugin: remove sync variable Marco Felsch
2023-02-13 15:04 ` [OSS-Tools] [PATCH 1/3] gstplayer: make use of playbin3 Michael Olbrich
2023-02-13 15:08   ` Marco Felsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox