mailarchive of the pengutronix oss-tools mailing list
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: oss-tools@pengutronix.de, graphics@pengutronix.de
Subject: [OSS-Tools] [PATCH 2/3] set pipeline latency and add some max-lateness slack
Date: Mon, 13 Feb 2023 15:57:22 +0100	[thread overview]
Message-ID: <20230213145723.4065393-2-m.felsch@pengutronix.de> (raw)
In-Reply-To: <20230213145723.4065393-1-m.felsch@pengutronix.de>

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




  reply	other threads:[~2023-02-13 14:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-13 14:57 [OSS-Tools] [PATCH 1/3] gstplayer: make use of playbin3 Marco Felsch
2023-02-13 14:57 ` Marco Felsch [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230213145723.4065393-2-m.felsch@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=graphics@pengutronix.de \
    --cc=oss-tools@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox