[spice-gtk,v2,3/3] HACK reduce time to wait

Submitted by Frediano Ziglio on May 25, 2018, 12:55 p.m.

Details

Message ID 20180525125522.2642-3-fziglio@redhat.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio May 25, 2018, 12:55 p.m.
Hacky patch to display frames ASAP
---
 src/channel-display-gst.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index 977a864a..e0221f1a 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -186,7 +186,7 @@  static void schedule_frame(SpiceGstDecoder *decoder)
             break;
         }
 
-        if (spice_mmtime_diff(now, gstframe->frame->mm_time) < 0) {
+        if (0 && spice_mmtime_diff(now, gstframe->frame->mm_time) < 0) {
             decoder->timer_id = g_timeout_add(gstframe->frame->mm_time - now,
                                               display_frame, decoder);
         } else if (decoder->display_frame && !decoder->pending_samples) {
@@ -681,7 +681,8 @@  static gboolean spice_gst_decoder_queue_frame(VideoDecoder *video_decoder,
 
     GST_BUFFER_DURATION(buffer) = GST_CLOCK_TIME_NONE;
     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;
+//    GST_BUFFER_PTS(buffer) = gst_clock_get_time(decoder->clock) - gst_element_get_base_time(decoder->pipeline) + ((uint64_t)MAX(0, latency)) * 1000 * 1000;
+    GST_BUFFER_PTS(buffer) = gst_clock_get_time(decoder->clock) - gst_element_get_base_time(decoder->pipeline);
 
     if (decoder->appsink != NULL) {
         SpiceGstFrame *gst_frame = create_gst_frame(buffer, frame);