obs-studio
obs-studio copied to clipboard
Adaptive Replay Buffer Memory Limit
Description
Adds libobs utility function to get total available memory and changes UI code to adjust the maximum replay buffer accordingly. Also adds a warning for CBR/VBR modes when estimated usage exceeds suggested maximum.
Motivation and Context
8 GiB is a little small considering most users have 16, and 32 is getting increasingly popular.
How Has This Been Tested?
Tested on Windows 10 with advanced output replay buffer.
ToDo
- Test on macOS
- Test on Linux
- Make sure FreeBSD and OpenBSD don't break (they shouldn't)
Types of changes
- New feature (non-breaking change which adds functionality)
- Tweak (non-breaking change to improve existing functionality)
Checklist:
- [x] My code has been run through clang-format.
- [x] I have read the contributing document.
- [x] My code is not on the master branch (ignore the typo).
- [x] The code has been tested.
- [x] All commit messages are properly formatted and commits squashed where appropriate.
- [x] I have included updates to all appropriate documentation.
I tested this and this works.
Wouldn't a hard cap for CBR be more consistent with VBR and CQP rather than a warning? (I don't know how hard it is to implement that)
I have tested this on macOS and Windows at least. I don't have a Linux machine handy, so if somebody could cross-check that that would be great.
Rebased to fix merge conflicts due to f9e7d237ad3d821707e3b5508ff316cd80755347 and ff555dd2b0b8f79070ec627309877ef4bbe05993
The warning gets truncated instead of wrapped if the Settings window is too narrow.
Other than that, the new UI limit seems to work. Haven't yet tested the limits of the buffer itself, but if you've already tested that on Windows and macOS, it's probably fine.
The warning is using the existing QLabel
so that's not an issue introduced by this PR. I guess it would need some sort of line wrap to be enabled?
The warning is using the existing
QLabel
so that's not an issue introduced by this PR. I guess it would need some sort of line wrap to be enabled?
If it's a pre-existing issue, feel free to leave that for a later fix.
Appears to work on Linux (tested Flatpak in VM).
Seems to work on my 32GB machine on Windows.
Wondering if this'd be better in GiB, or to add a separator for thousands.