Use old time code as this is 1.36
This commit is contained in:
parent
e0e81a3769
commit
431417ea8b
|
@ -265,9 +265,9 @@ void MonitorStream::processCommand(const CmdMsg *msg) {
|
|||
status_data.forced = false;
|
||||
status_data.buffer_level = 0;
|
||||
} else {
|
||||
FPSeconds elapsed = now - last_fps_update;
|
||||
if (elapsed.count()) {
|
||||
actual_fps = (frame_count - last_frame_count) / elapsed.count();
|
||||
int elapsed = now.tv_sec - last_fps_update.tv_sec;
|
||||
if (elapsed) {
|
||||
actual_fps = (frame_count - last_frame_count) / elapsed;
|
||||
last_frame_count = frame_count;
|
||||
last_fps_update = now;
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ protected:
|
|||
double base_fps; // Should be capturing fps, hence a rough target
|
||||
double effective_fps; // Target fps after taking max_fps into account
|
||||
double actual_fps; // sliding calculated actual streaming fps achieved
|
||||
SystemTimePoint last_fps_update;
|
||||
struct timeval last_fps_update;
|
||||
int frame_count; // Count of frames sent
|
||||
int last_frame_count; // Used in calculating actual_fps from frame_count - last_frame_count
|
||||
|
||||
|
@ -175,6 +175,7 @@ public:
|
|||
base_fps(0.0),
|
||||
effective_fps(0.0),
|
||||
actual_fps(0.0),
|
||||
last_fps_update({}),
|
||||
frame_count(0),
|
||||
last_frame_count(0),
|
||||
frame_mod(1)
|
||||
|
|
Loading…
Reference in New Issue