obs-studio
obs-studio copied to clipboard
NVENC error logging improvements
Description
This copies the result of nvEncGetLastErrorString to the last encoder error instead of only writing it to the log file. This makes it user-visible, which should help users diagnose and solve the problem.
Also strips off leading colons from NVENC error strings as these can look odd given our format string. An example of such an error:
::NV_ENC_TWO_PASS_FULL_RESOLUTION is only supported multipass encoding on this architecture.
Motivation and Context
While the full error message in the log file is useful, it's not really visible to users. Showing it in the encoder failure message box should help users solve the problem.
How Has This Been Tested?
Not tested very well as I couldn't easily trigger error conditions on my GPU, code seems OK though?
Types of changes
- 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.
- [ ] 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.