[Spice-commits] 2 commits - src/channel-display-gst.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jul 6 07:23:36 UTC 2018
src/channel-display-gst.c | 39 +++++++++++++++++++++++++--------------
1 file changed, 25 insertions(+), 14 deletions(-)
New commits:
commit c994ceac4600477141f955fc85db5f9c6132e180
Author: Snir Sheriber <ssheribe at redhat.com>
Date: Thu Jul 5 18:08:03 2018 +0300
Avoid schedule frames if GstVideoOverly is used
When GstVideoOverly is used there is no appsink, playing of a frame is
done according the time value of its buffer
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index e0898a3..93fd542 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -512,6 +512,10 @@ static gboolean create_pipeline(SpiceGstDecoder *decoder)
static void spice_gst_decoder_reschedule(VideoDecoder *video_decoder)
{
SpiceGstDecoder *decoder = (SpiceGstDecoder*)video_decoder;
+
+ if (!decoder->appsink) {
+ return;
+ }
guint timer_id;
g_mutex_lock(&decoder->queues_mutex);
commit cbd20be5f38fc37817cf0bde4ab4398a46388c3d
Author: Snir Sheriber <ssheribe at redhat.com>
Date: Thu Jul 5 18:08:02 2018 +0300
Update comments in spice-gtk regards GstVideoOverlay
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index 29476cb..e0898a3 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -570,20 +570,27 @@ static void spice_gst_decoder_destroy(VideoDecoder *video_decoder)
* decoding.
* 3) As soon as the GStreamer pipeline no longer needs the compressed frame it
* will call frame->unref_data() to free it.
- * 4) Once the decompressed frame is available the GStreamer pipeline calls
- * new_sample() in the GStreamer thread.
- * 5) new_sample() then matches the decompressed frame to a SpiceGstFrame from
- * the decoding queue using the GStreamer timestamp information to deal with
- * dropped frames. The SpiceGstFrame is popped from the decoding_queue.
- * 6) new_sample() then attaches the decompressed frame to the SpiceGstFrame,
- * set into display_frame and calls schedule_frame().
- * 7) schedule_frame() then uses gstframe->frame->mm_time to arrange for
- * display_frame() to be called, in the main thread, at the right time for
- * the next frame.
- * 8) display_frame() use SpiceGstFrame from display_frame and
- * calls stream_display_frame().
- * 9) display_frame() then frees the SpiceGstFrame, which frees the SpiceFrame
- * and decompressed frame with it.
+ *
+ * If GstVideoOverlay is used (win_handle was obtained by pipeline creation):
+ * 4) Decompressed frames will be renderd to widget directly from gstreamer's pipeline
+ * using some gstreamer sink plugin which implements the GstVideoOverlay interface
+ * (last step).
+ *
+ * Otherwise appsink is used:
+ * 4) Once the decompressed frame is available the GStreamer pipeline calls
+ * new_sample() in the GStreamer thread.
+ * 5) new_sample() then matches the decompressed frame to a SpiceGstFrame from
+ * the decoding queue using the GStreamer timestamp information to deal with
+ * dropped frames. The SpiceGstFrame is popped from the decoding_queue.
+ * 6) new_sample() then attaches the decompressed frame to the SpiceGstFrame,
+ * set into display_frame and calls schedule_frame().
+ * 7) schedule_frame() then uses gstframe->frame->mm_time to arrange for
+ * display_frame() to be called, in the main thread, at the right time for
+ * the next frame.
+ * 8) display_frame() use SpiceGstFrame from display_frame and
+ * calls stream_display_frame().
+ * 9) display_frame() then frees the SpiceGstFrame, which frees the SpiceFrame
+ * and decompressed frame with it.
*/
static gboolean spice_gst_decoder_queue_frame(VideoDecoder *video_decoder,
SpiceFrame *frame, int latency)
More information about the Spice-commits
mailing list