提交 ec5059ce 编写于 作者: J jp9000

win-capture: Always have some capture FPS limit

For game capture, if a game is running at for example 800 FPS and limit
capture framerate is off, it would try to capture all 800 of those
frames, dramatically reducing performance more than what would ever be
necessary.

When limit capture framerate is off, instead of capturing all frames,
capture frames at an interval of twice the OBS FPS, identical to how
OBS1 works by default.  This should greatly increase performance under
that circumstance.
上级 ddcf2436
......@@ -494,9 +494,17 @@ static inline void reset_frame_interval(struct game_capture *gc)
struct obs_video_info ovi;
uint64_t interval = 0;
if (gc->config.limit_framerate && obs_get_video_info(&ovi))
if (obs_get_video_info(&ovi)) {
interval = ovi.fps_den * 1000000000ULL / ovi.fps_num;
/* Always limit capture framerate to some extent. If a game
* running at 900 FPS is being captured without some sort of
* limited capture interval, it will dramatically reduce
* performance. */
if (!gc->config.limit_framerate)
interval /= 2;
}
gc->global_hook_info->frame_interval = interval;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册