[Spice-devel] RFC spice: Should the input-fps be refreshed regularly?

Marc-André Lureau mlureau at redhat.com
Tue Jun 9 04:19:31 PDT 2015


Hi

----- Original Message -----
> 
> Spice provides an estimate of the input video fps to the video streaming
> backends. This is done by red_stream_input_fps_timer_cb() in
> red_worker.c which is called 5 seconds after the streaming starts.
> 
> That callback contains code so it can be called again:
> 
>     stream->num_input_frames = 0;
>     stream->input_fps_timer_start = now;
> 
> However the corresponding timer is not rearmed so it is in fact called
> only once. Is that the correct behavior or do we want the input_fps
> field to be refreshed regularly?
> 
> For video the framerate tends to be pretty constant so calculating it
> once could be sufficient. But maybe there are other cases where we would
> want more up to date information. Games maybe?

I think it should compute it regularly. Also, there is no need for a timer for that,
it could just check after each update, and update the average over time, or check
after N seconds have passed how many frames went in the stream (without timers).


More information about the Spice-devel mailing list