[Spice-devel] [client v14 24/29] spice-gtk: Rename num_drops_on_receive to arrive_late_count

Pavel Grunt pgrunt at redhat.com
Fri May 6 09:56:51 UTC 2016


On Wed, 2016-05-04 at 11:44 +0200, Francois Gouget wrote:
> The frame may not get dropped once that's left up to video decoders.
> 
Also the debug message should be adjusted to the change.

> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>

Acked-by: Pavel Grunt <pgrunt at redhat.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 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 c681a4e..4a06193 100644
> --- a/src/channel-display.c
> +++ b/src/channel-display.c
> @@ -1458,7 +1458,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;
> @@ -1534,15 +1534,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);


More information about the Spice-devel mailing list