[Spice-devel] [PATCH spice-gtk 2/3] fixup! Gstreamer: Use GstVideoOverlay if possible

Frediano Ziglio fziglio at redhat.com
Sun Apr 15 19:12:17 UTC 2018


Remove gstvideooverlay field, just check if appsink is there, the check
if to store data for new_sample which is called by appsink
---
 src/channel-display-gst.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index 7783393..6103fcb 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -49,8 +49,6 @@ typedef struct SpiceGstDecoder {
     GQueue *decoding_queue;
     GQueue *display_queue;
     guint timer_id;
-
-    gboolean gstvideooverlay;
 } SpiceGstDecoder;
 
 #define VALID_VIDEO_CODEC_TYPE(codec) \
@@ -374,7 +372,6 @@ static gboolean create_pipeline(SpiceGstDecoder *decoder)
     }
 
     g_object_get(decoder->base.stream->channel, "handle", &handle, NULL);
-    decoder->gstvideooverlay = (handle != 0);
     SPICE_DEBUG("Creating Gstreamer pipline (handle for overlay %s)\n",
                 handle ? "received" : "not received");
     if (handle == 0) {
@@ -605,7 +602,7 @@ static gboolean spice_gst_decoder_queue_frame(VideoDecoder *video_decoder,
     GST_BUFFER_DTS(buffer) = GST_CLOCK_TIME_NONE;
     GST_BUFFER_PTS(buffer) = gst_clock_get_time(decoder->clock) - gst_element_get_base_time(decoder->pipeline) + ((uint64_t)MAX(0, latency)) * 1000 * 1000;
 
-    if (!decoder->gstvideooverlay) {
+    if (decoder->appsink != NULL) {
         g_mutex_lock(&decoder->queues_mutex);
         g_queue_push_tail(decoder->decoding_queue, create_gst_frame(buffer, frame));
         g_mutex_unlock(&decoder->queues_mutex);
-- 
2.14.3



More information about the Spice-devel mailing list