Simplify some preferred refresh rate logic
This commit is contained in:
@@ -781,8 +781,9 @@ void compositor::set_bitrate(uint32_t bitrate)
|
||||
|
||||
void compositor::set_refresh_rate(float hz)
|
||||
{
|
||||
if (refresh_rate.exchange(hz) == hz)
|
||||
return;
|
||||
U_LOG_IFL_D(log_level, "Refresh rate change from %.0f to %.0f", refresh_rate.load(), hz);
|
||||
refresh_rate = hz;
|
||||
pacer.set_frame_duration(U_TIME_1S_IN_NS / hz);
|
||||
for (auto & encoder: encoders)
|
||||
encoder->set_framerate(hz);
|
||||
|
||||
Reference in New Issue
Block a user