The frame may not get dropped once that's left up to video decoders. Signed-off-by: Francois Gouget <fgouget@xxxxxxxxxxxxxxx> --- 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 7f1c520..5256ad9 100644 --- a/src/channel-display-priv.h +++ b/src/channel-display-priv.h @@ -104,7 +104,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 8142996..e239f3c 100644 --- a/src/channel-display.c +++ b/src/channel-display.c @@ -1459,7 +1459,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; @@ -1535,15 +1535,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 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel