63 lines
2.5 KiB
Diff
63 lines
2.5 KiB
Diff
From 3ffaca250df9e72917ed3306d538474f44d7b1e2 Mon Sep 17 00:00:00 2001
|
|
From: Hugues Fruchet <hugues.fruchet@foss.st.com>
|
|
Date: Thu, 17 Aug 2023 11:10:54 +0200
|
|
Subject: [PATCH 2/2] gtkwaylandsink: HACK: disable frame dropping while redraw
|
|
is pending
|
|
|
|
This workaround is needed to reach 30fps video playback.
|
|
|
|
Redraw callback is received late, leading to many frames
|
|
being dropped and so low framerate on display driver stage.
|
|
The fact that redraw callback is received late is not yet understood
|
|
but display subsystem is able to sustain a higher framerate
|
|
than the one reached with redraw callback mechanism.
|
|
This workaround consists to ignore redraw callback allowing to
|
|
get back to the expected framerate performances.
|
|
|
|
Even if not observed yet, there is a risk of visible decoding artefacts
|
|
due to the fact that downstream elements could rewrite in a frame
|
|
being currently rendered by display subsystem...
|
|
|
|
Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
|
|
---
|
|
ext/gtk/gstgtkwaylandsink.c | 19 +++++++++++++++++++
|
|
1 file changed, 19 insertions(+)
|
|
|
|
diff --git a/ext/gtk/gstgtkwaylandsink.c b/ext/gtk/gstgtkwaylandsink.c
|
|
index 26e4aa0..88cbe5d 100644
|
|
--- a/ext/gtk/gstgtkwaylandsink.c
|
|
+++ b/ext/gtk/gstgtkwaylandsink.c
|
|
@@ -1095,10 +1095,29 @@ render_last_buffer (GstGtkWaylandSink * self, gboolean redraw)
|
|
wlbuffer = gst_buffer_get_wl_buffer (priv->display, priv->last_buffer);
|
|
surface = gst_wl_window_get_wl_surface (priv->wl_window);
|
|
|
|
+ /*
|
|
+ * HACK: disable frame dropping while redraw is pending
|
|
+ *
|
|
+ * This workaround is needed to reach 30fps video playback.
|
|
+ *
|
|
+ * Redraw callback is received late, leading to many frames
|
|
+ * being dropped and so low framerate on display driver stage.
|
|
+ * The fact that redraw callback is received late is not yet understood
|
|
+ * but display subsystem is able to sustain a higher framerate
|
|
+ * than the one reached with redraw callback mechanism.
|
|
+ * This workaround consists to ignore redraw callback allowing to
|
|
+ * get back to the expected framerate performances.
|
|
+ *
|
|
+ * Why not observed yet, there is a risk of visible decoding artefacts
|
|
+ * due to the fact that downstream elements could rewrite in a frame
|
|
+ * being currently rendered by display subsystem...
|
|
+ */
|
|
+#if 0
|
|
priv->redraw_pending = TRUE;
|
|
callback = wl_surface_frame (surface);
|
|
priv->callback = callback;
|
|
wl_callback_add_listener (callback, &frame_callback_listener, self);
|
|
+#endif
|
|
|
|
if (G_UNLIKELY (priv->video_info_changed && !redraw)) {
|
|
info = &priv->video_info;
|
|
--
|
|
2.25.1
|
|
|