use image_count when reporting earlier than fps_report_interval

This commit is contained in:
Isaac Connor 2019-02-16 11:49:28 -05:00
parent 9656032906
commit baba438ce1
1 changed files with 1 additions and 1 deletions

View File

@ -2481,7 +2481,7 @@ int Monitor::Capture() {
// If we are too fast, we get div by zero. This seems to happen in the case of audio packets. // If we are too fast, we get div by zero. This seems to happen in the case of audio packets.
if ( now != last_fps_time ) { if ( now != last_fps_time ) {
// # of images per interval / the amount of time it took // # of images per interval / the amount of time it took
double new_fps = double(fps_report_interval)/(now-last_fps_time); double new_fps = double(image_count%fps_report_interval?image_count:fps_report_interval)/(now-last_fps_time);
unsigned int new_camera_bytes = camera->Bytes(); unsigned int new_camera_bytes = camera->Bytes();
unsigned int new_capture_bandwidth = (new_camera_bytes - last_camera_bytes)/(now-last_fps_time); unsigned int new_capture_bandwidth = (new_camera_bytes - last_camera_bytes)/(now-last_fps_time);
last_camera_bytes = new_camera_bytes; last_camera_bytes = new_camera_bytes;