[Spice-commits] src/channel-display-gst.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jan 15 17:25:22 UTC 2019
src/channel-display-gst.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 0240283191862aa4f17417cb2af7994a47908861
Author: Victor Toso <me at victortoso.com>
Date: Tue Mar 13 12:13:48 2018 +0100
channel-display-gst: summarize number of frames dropped
For example, this has produced 9 lines of debug below instead of 31.
GSpice-DEBUG: channel-display-gst.c:247 the GStreamer pipeline dropped 4 frames
GSpice-DEBUG: channel-display-gst.c:247 the GStreamer pipeline dropped 5 frames
GSpice-DEBUG: channel-display-gst.c:247 the GStreamer pipeline dropped 4 frames
GSpice-DEBUG: channel-display-gst.c:247 the GStreamer pipeline dropped 4 frames
GSpice-DEBUG: channel-display-gst.c:247 the GStreamer pipeline dropped 4 frames
GSpice-DEBUG: channel-display-gst.c:247 the GStreamer pipeline dropped 4 frames
GSpice-DEBUG: channel-display-gst.c:247 the GStreamer pipeline dropped 3 frames
GSpice-DEBUG: channel-display-gst.c:247 the GStreamer pipeline dropped 2 frames
GSpice-DEBUG: channel-display-gst.c:247 the GStreamer pipeline dropped 1 frames
Signed-off-by: Victor Toso <victortoso at redhat.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index 5b7b776..0b871a7 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -211,6 +211,7 @@ static void fetch_pending_sample(SpiceGstDecoder *decoder)
decoder->pending_samples--;
GstBuffer *buffer = gst_sample_get_buffer(sample);
+ guint num_frames_dropped = 0;
/* gst_app_sink_pull_sample() sometimes returns the same buffer twice
* or buffers that have a modified, and thus unrecognizable, PTS.
@@ -238,13 +239,16 @@ static void fetch_pending_sample(SpiceGstDecoder *decoder)
/* The GStreamer pipeline dropped the corresponding
* buffer.
*/
- SPICE_DEBUG("the GStreamer pipeline dropped a frame");
+ num_frames_dropped++;
free_gst_frame(gstframe);
}
break;
}
l = l->next;
}
+ if (num_frames_dropped != 0) {
+ SPICE_DEBUG("the GStreamer pipeline dropped %u frames", num_frames_dropped);
+ }
if (!l) {
spice_warning("got an unexpected decoded buffer!");
gst_sample_unref(sample);
More information about the Spice-commits
mailing list