Fixed and improved TimeCounter

This commit is contained in:
Bruno
2021-05-26 23:31:34 +02:00
parent 1f5056bf15
commit 473e24bcd7
4 changed files with 31 additions and 105 deletions

View File

@@ -144,17 +144,13 @@ protected:
// fps counter
struct TimeCounter {
GstClockTime last_time;
GstClockTime tic_time;
long nbFrames;
GTimer *timer;
gdouble fps;
public:
TimeCounter();
GstClockTime dt();
~TimeCounter();
void tic();
void reset();
gdouble frameRate() const;
inline gdouble frameRate() const { return fps; }
};
TimeCounter timecount_;