[Spice-devel] [client v10 22/27] spice-gtk: Rename num_drops_on_receive to arrive_late_count.

Francois Gouget fgouget at codeweavers.com
Tue Mar 1 15:55:04 UTC 2016


Starting with the next patch the frmae may not get dropped.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 src/channel-display-priv.h | 2 +-
 src/channel-display.c      | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/channel-display-priv.h b/src/channel-display-priv.h
index 4ca80b6..d074119 100644
--- a/src/channel-display-priv.h
+++ b/src/channel-display-priv.h
@@ -105,7 +105,7 @@ struct display_stream {
 
     /* stats */
     uint32_t             first_frame_mm_time;
-    uint32_t             num_drops_on_receive;
+    uint32_t             arrive_late_count;
     uint64_t             arrive_late_time;
     uint32_t             num_drops_on_playback;
     uint32_t             num_input_frames;
diff --git a/src/channel-display.c b/src/channel-display.c
index 8d472b8..d3072a7 100644
--- a/src/channel-display.c
+++ b/src/channel-display.c
@@ -1491,7 +1491,7 @@ static void display_handle_stream_data(SpiceChannel *channel, SpiceMsgIn *in)
         CHANNEL_DEBUG(channel, "stream data too late by %u ms (ts: %u, mmtime: %u), dropping",
                       mmtime - op->multi_media_time, op->multi_media_time, mmtime);
         st->arrive_late_time += mmtime - op->multi_media_time;
-        st->num_drops_on_receive++;
+        st->arrive_late_count++;
 
         if (!st->cur_drops_seq_stats.len) {
             st->cur_drops_seq_stats.start_mm_time = op->multi_media_time;
@@ -1567,15 +1567,15 @@ static void destroy_stream(SpiceChannel *channel, int id)
     if (!st)
         return;
 
-    num_out_frames = st->num_input_frames - st->num_drops_on_receive - st->num_drops_on_playback;
+    num_out_frames = st->num_input_frames - st->arrive_late_count - st->num_drops_on_playback;
     CHANNEL_DEBUG(channel, "%s: id=%d #in-frames=%d out/in=%.2f "
         "#drops-on-receive=%d avg-late-time(ms)=%.2f "
         "#drops-on-playback=%d", __FUNCTION__,
         id,
         st->num_input_frames,
         num_out_frames / (double)st->num_input_frames,
-        st->num_drops_on_receive,
-        st->num_drops_on_receive ? st->arrive_late_time / ((double)st->num_drops_on_receive): 0,
+        st->arrive_late_count,
+        st->arrive_late_count ? st->arrive_late_time / ((double)st->arrive_late_count): 0,
         st->num_drops_on_playback);
     if (st->num_drops_seqs) {
         CHANNEL_DEBUG(channel, "%s: #drops-sequences=%u ==>", __FUNCTION__, st->num_drops_seqs);
-- 
2.7.0



More information about the Spice-devel mailing list