From 9084a960a565ed80d34c41c7b0ab4f4a716a4f54 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Wed, 15 Feb 2023 13:11:36 -0500 Subject: [PATCH] waylandsink: Let the baseclass know when frames are dropped This is using the new GST_BASE_SINK_FLOW_DROPPED return value. With this change, fpsdisplaysink will properly report the render and dropped rate. Part-of: --- subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c | 2 ++ subprojects/gst-plugins-bad/ext/wayland/gstwaylandsink.c | 1 + 2 files changed, 3 insertions(+) diff --git a/subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c b/subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c index 5288614bd7..acc32882ce 100644 --- a/subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c +++ b/subprojects/gst-plugins-bad/ext/gtk/gstgtkwaylandsink.c @@ -1001,6 +1001,7 @@ gst_gtk_wayland_sink_show_frame (GstVideoSink * vsink, GstBuffer * buffer) if (!priv->wl_window) { GST_LOG_OBJECT (self, "buffer %" GST_PTR_FORMAT " dropped (waiting for window)", buffer); + ret = GST_BASE_SINK_FLOW_DROPPED; goto done; } @@ -1008,6 +1009,7 @@ gst_gtk_wayland_sink_show_frame (GstVideoSink * vsink, GstBuffer * buffer) if (priv->redraw_pending) { GST_LOG_OBJECT (self, "buffer %" GST_PTR_FORMAT " dropped (redraw pending)", buffer); + ret = GST_BASE_SINK_FLOW_DROPPED; goto done; } diff --git a/subprojects/gst-plugins-bad/ext/wayland/gstwaylandsink.c b/subprojects/gst-plugins-bad/ext/wayland/gstwaylandsink.c index 6dd0807820..bbbcb93932 100644 --- a/subprojects/gst-plugins-bad/ext/wayland/gstwaylandsink.c +++ b/subprojects/gst-plugins-bad/ext/wayland/gstwaylandsink.c @@ -773,6 +773,7 @@ gst_wayland_sink_show_frame (GstVideoSink * vsink, GstBuffer * buffer) if (self->redraw_pending) { GST_LOG_OBJECT (self, "buffer %" GST_PTR_FORMAT " dropped (redraw pending)", buffer); + ret = GST_BASE_SINK_FLOW_DROPPED; goto done; }