If no max_fps set we don't care how long it takes to send frame
This commit is contained in:
parent
edbe726e86
commit
77793da70e
|
@ -460,6 +460,7 @@ bool MonitorStream::sendFrame(Image *image, SystemTimePoint timestamp) {
|
|||
|
||||
} // Not mpeg
|
||||
|
||||
if (maxfps) {
|
||||
TimePoint send_end_time = std::chrono::steady_clock::now();
|
||||
TimePoint::duration frame_send_time = send_end_time - send_start_time;
|
||||
TimePoint::duration maxfps_milliseconds = Milliseconds(lround(Milliseconds::period::den / maxfps));
|
||||
|
@ -471,6 +472,7 @@ bool MonitorStream::sendFrame(Image *image, SystemTimePoint timestamp) {
|
|||
static_cast<int64>(std::chrono::duration_cast<Milliseconds>(maxfps_milliseconds).count()),
|
||||
maxfps);
|
||||
}
|
||||
}
|
||||
last_frame_sent = send_end_time;
|
||||
return true;
|
||||
} // end bool MonitorStream::sendFrame(Image *image, SystemTimePoint timestamp)
|
||||
|
|
Loading…
Reference in New Issue