[Spice-devel] [spice] gstreamer-encoder: Document get_maximum_frame_size()
Frediano Ziglio
fziglio at redhat.com
Tue May 21 08:15:46 UTC 2019
>
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
> ---
> 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
More information about the Spice-devel
mailing list