[client v5 3/4] streaming: Stop streaming if GStreamer silently drops every frame

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Francois Gouget <fgouget@xxxxxxxxxxxxxxx>
---
 src/channel-display-gst.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index 5fb0b77..5ebfc53 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -446,6 +446,13 @@ static gboolean spice_gst_decoder_queue_frame(VideoDecoder *video_decoder,
         return TRUE;
     }
 
+    /* Verify that the pipeline is decoding the frames as expected */
+    g_mutex_lock(&decoder->queues_mutex);
+    if (g_queue_get_length(decoder->decoding_queue) > 25) {
+        spice_warning("GStreamer is not decoding the frames!");
+        free_pipeline(decoder);
+    }
+    g_mutex_unlock(&decoder->queues_mutex);
     if (decoder->pipeline == NULL) {
         /* An error occurred, causing the GStreamer pipeline to be freed */
         spice_warning("An error occurred, stopping the video stream");
-- 
2.10.1
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]