FPSCounter
#include <icy/av/fpscounter.h>
class FPSCounterDefined in src/av/include/icy/av/fpscounter.h:27
Public Attributes
fps
double fpsDefined in src/av/include/icy/av/fpscounter.h:48
frames
int64_t framesDefined in src/av/include/icy/av/fpscounter.h:49
Public Methods
| Return | Name | Description |
|---|---|---|
FPSCounter inline | Initialise the counter with all zeroes. | |
void | reset inline | Reset all counters and the SMA window to zero. |
void | tick inline | Record a new frame and update the FPS estimate. Must be called once per frame. Updates fps and increments frames. |
FPSCounter
inline
inline FPSCounter()Defined in src/av/include/icy/av/fpscounter.h:52
Initialise the counter with all zeroes.
reset
inline
inline void reset()Defined in src/av/include/icy/av/fpscounter.h:55
Reset all counters and the SMA window to zero.
tick
inline
inline void tick()Defined in src/av/include/icy/av/fpscounter.h:68
Record a new frame and update the FPS estimate. Must be called once per frame. Updates fps and increments frames.
Private Attributes
tickIndex
int tickIndexDefined in src/av/include/icy/av/fpscounter.h:32
prevTick
clock_t prevTickDefined in src/av/include/icy/av/fpscounter.h:33
tickSum
clock_t tickSumDefined in src/av/include/icy/av/fpscounter.h:34
tickList
clock_t tickList[MAX]Defined in src/av/include/icy/av/fpscounter.h:35
Private Methods
| Return | Name | Description |
|---|---|---|
double | updateAvg inline |
updateAvg
inline
inline double updateAvg(clock_t newTick)Defined in src/av/include/icy/av/fpscounter.h:37
Private Static Attributes
| Return | Name | Description |
|---|---|---|
const int | MAX static |
MAX
static
const int MAX = 100