Re: [spice] gstreamer-encoder: Document get_maximum_frame_size()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> Signed-off-by: Francois Gouget <fgouget@xxxxxxxxxxxxxxx>
> ---
>  server/gstreamer-encoder.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c
> index bccbe0660..110d12981 100644
> --- a/server/gstreamer-encoder.c
> +++ b/server/gstreamer-encoder.c
> @@ -404,6 +404,13 @@ static uint32_t get_average_frame_size(SpiceGstEncoder
> *encoder)
>      return encoder->stat_size_sum / count;
>  }
>  
> +/* Look for the largest frame and store it in stat_size_max to reduce how
> + * often we have to scan the history for the largest frame.
> + * Then all we need to keep things consistent is to:
> + * - Update stat_size_max when adding a larger frame to the history.
> + * - Reset stat_size_max to zero when the largest frame falls out of
> + *   the history.
> + */
>  static uint32_t get_maximum_frame_size(SpiceGstEncoder *encoder)
>  {
>      if (encoder->stat_size_max == 0) {

It looks good to me.

I'll wait a couple of days for comments.

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]