Add FPS counter

Remove frame counter from scrcpy.c and add a new FPS counter, logging as
INFO the measured frame rate every second (on new frame).
This commit is contained in:
Romain Vimont
2018-02-15 11:10:58 +01:00
parent c6c17af840
commit 38e6682875
6 changed files with 99 additions and 21 deletions

View File

@@ -5,6 +5,7 @@
#include <SDL2/SDL_stdinc.h>
#include "config.h"
#include "fpscounter.h"
// forward declarations
typedef struct AVFrame AVFrame;
@@ -18,6 +19,7 @@ struct frames {
SDL_cond *rendering_frame_consumed_cond;
#endif
SDL_bool rendering_frame_consumed;
struct fps_counter fps_counter;
};
SDL_bool frames_init(struct frames *frames);