plugins/screencast: Make frame throttling less strict
If the max framerate is 60Hz, currently, the frameInterval is going to be 16.6ms. On the other hand, lastSentAgo is likely to be just 16ms. So the frame throttling timer will be started just to wait less than a millisecond.
This commit is contained in:
parent
24f4e268a9
commit
5ff705a124
1 changed files with 1 additions and 1 deletions
|
@ -437,7 +437,7 @@ void ScreenCastStream::recordFrame(const QRegion &_damagedRegion)
|
|||
}
|
||||
|
||||
if (m_videoFormat.max_framerate.num != 0 && !m_lastSent.isNull()) {
|
||||
auto frameInterval = (1000. * m_videoFormat.max_framerate.denom / m_videoFormat.max_framerate.num);
|
||||
auto frameInterval = (1000 * m_videoFormat.max_framerate.denom / m_videoFormat.max_framerate.num);
|
||||
auto lastSentAgo = m_lastSent.msecsTo(QDateTime::currentDateTimeUtc());
|
||||
if (lastSentAgo < frameInterval) {
|
||||
m_pendingDamages += damagedRegion;
|
||||
|
|
Loading…
Reference in a new issue