Commit Graph

661 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks f907fc80b0 updater: Add functionality to check for updates
Implements a manual and automatic update checker with support for both release and testing update channels, allowing users to stay as up to date as possible. It is fully compliant with privacy regulations around the world, as it stays completely silent and inactive until the user gives the Ok to connect to GitHub for the latest releases.
2023-03-28 12:52:27 +02:00
Michael Fabian 'Xaymar' Dirks 1107c1e390 util/curl: Add C++ wrapper for CURL 2023-03-28 12:52:27 +02:00
Michael Fabian 'Xaymar' Dirks 59950bec3b ui: Fix support for disambiguation in translations 2023-03-28 12:52:27 +02:00
Michael Fabian 'Xaymar' Dirks 36976cb550 util/threadpool: Don't hold work endlessly after processing it 2023-03-28 12:52:27 +02:00
Michael Fabian 'Xaymar' Dirks 0e1377f359 encoders/handlers/nvenc: Don't list encoders on unsupported systems
Removes the NVENC entry on systems without an NVIDIA GPU by checking if the library for it can be loaded. If it can't be loaded, it's likely that the user does not have a system with NVENC capabilities - and guaranteed that they can't use the encoder as FFmpeg relies on these libraries.
2023-03-28 12:52:23 +02:00
Michael Fabian 'Xaymar' Dirks 8306dc5b92 encoders/ffmpeg: Add function to get info object 2023-03-28 12:52:23 +02:00
Michael Fabian 'Xaymar' Dirks a39fd89ba7 util/library: Cross-platform handler for library loading
Adds a utility class and functions to load libraries and symbols from libraries somewhat safely. Libraries are immediately unloaded when the last reference to them is lost, so the shared_ptr should be stored if the library is actually needed.
2023-03-28 12:52:23 +02:00
Michael Fabian 'Xaymar' Dirks ab9d9e8443 encoders/handlers/nvenc: Make code C++ standard compliant again 2023-03-28 12:52:23 +02:00
Michael Fabian 'Xaymar' Dirks c445865111 encoders/ffmpeg: Support for FFmpeg versions older than 58.x 2023-03-28 12:52:23 +02:00
Michael Fabian 'Xaymar' Dirks 012027578a encoders/ffmpeg: Disable hardware path on Linux 2023-03-28 12:52:22 +02:00
Michael Fabian 'Xaymar' Dirks 2f6070d7a2 encoders/handlers/prores_aw: Fix override warning 2023-03-28 12:52:22 +02:00
Michael Fabian 'Xaymar' Dirks 6b57cdf019 encoders/codecs: Add missing includes 2023-03-28 12:52:22 +02:00
Michael Fabian 'Xaymar' Dirks 66b1715d78 ffmpeg/tools: Fix compatibility with Ubuntu 18.04 2023-03-28 12:52:22 +02:00
Michael Fabian 'Xaymar' Dirks 63a5873413 project: Remove non-standard std:: prefix from types 2023-03-28 12:52:22 +02:00
Michael Fabian 'Xaymar' Dirks c20ac4a413 templates: Add generated configuration file 2023-03-28 12:52:21 +02:00
Michael Fabian 'Xaymar' Dirks f3b3af2030 ffmpeg/tools: Ensure we aren't comparing against a nullptr 2023-03-28 12:52:21 +02:00
Michael Fabian 'Xaymar' Dirks dbb9db596e project: Apply formatting 2023-03-28 12:52:21 +02:00
Michael Fabian 'Xaymar' Dirks f9f25dbd8a obs/gs/effect: Use the actual shared_ptr, not a pointer to it
Fixes several warnings and potential memory corruptions that could happen. Also makes the entire thing easier to read.
2023-03-28 12:52:20 +02:00
Michael Fabian 'Xaymar' Dirks dbb71cf801 project: Code cleanup and reapply formatting
Changes applied:

* Moved utility files to /util/.
* Removed unused #includes.
* Removed unused ::ffmpeg::tools function.
* Removed unused variables.
* Fixed missing parentheses in the version macro.
* Fixed missing override on virtual function overrides and removed unnecessary virtual keyword from them.
* Disabled additional warning for ATL headers on MSVC only.
* Replaced direct printf parameters with their macro equivalent.
* Replaced C-style casts with C++-style casts.
* Applied clang-format again after an earlier change to the CMake file broke the integration for it.
2023-03-28 12:52:20 +02:00
Michael Fabian 'Xaymar' Dirks d883f66fa0 util/threadpool: Show warnings for uncaught exceptions
Tasks should not leak exceptions, so it is better if we actually log them instead of silently ignoring them.
2023-03-28 12:52:20 +02:00
Michael Fabian 'Xaymar' Dirks 2fb901278f ui-about: Add new 'Thank You' entries 2023-03-28 12:52:20 +02:00
Michael Fabian 'Xaymar' Dirks 334ed4790c encoders/handlers/nvenc: Remove 5.2 from H.264
The levels 5.2 and above were added in a newer FFmpeg version than OBS Studio is shipping with. Ideally we'd take these options directly from FFmpeg, but that is for a future commit.
2023-03-28 12:52:19 +02:00
Michael Fabian 'Xaymar' Dirks 6185de2170 encoders/handlers/nvenc: Fix incorrect values being logged
Fixes the issue where "high444p" shows as "high", and "high" shows as "main", caused by the internal option mapping never being correct across version changes. Instead of keeping our own copy of things that has to be adjusted for each FFmpeg version, it's easier to just use the FFmpeg values and names.
2023-03-28 12:52:19 +02:00
Michael Fabian 'Xaymar' Dirks f7da7283fb ffmpeg/tools: Add string value mapping to print_av_option 2023-03-28 12:52:19 +02:00
Michael Fabian 'Xaymar' Dirks a0d0760f6d encoders/ffmpeg: Fix fallbacks, hide handler-less encoders and clean up
* Changes the encoder name to 'streamfx-{name}' from 'streamfx--{name}' as the latter is a typo, but adds a proxy to still support the latter in bad configurations.
* Some of the warning messages have been improved in order to better support end-users, and support for the new encoder error messages has been added.
* Adds support for the is_hw argument instead of blindly relying on obs_encoder_get_caps() which actually returns the wrong values due to rerouting.
* Fixed handler-less encoders showing up in the UI outside of debug builds.
2023-03-28 12:52:19 +02:00
Michael Fabian 'Xaymar' Dirks a7ac58aba6 obs/encoder-factory: Fix encoder rerouting not working properly
Due to an oversight in the code, the fallback code would simply fail to work as the encoder was always the zero-copy version. This resulted in weird crashes and encoders not working that used to work before.

Fixes #295
2023-03-28 12:52:18 +02:00
Michael Fabian 'Xaymar' Dirks 81a8a25d4a obs/gs/vertexbuffer: Cleanup and add workaround for OBS Studio memory leak 2023-03-28 12:52:18 +02:00
Michael Fabian 'Xaymar' Dirks 07034c0e6e obs/gs/helper: Throw exception if we aren't in a context 2023-03-28 12:52:18 +02:00
Michael Fabian 'Xaymar' Dirks c1abe07b0f utility: Don't crash on nullptr in free_aligned 2023-03-28 12:52:18 +02:00
Michael Fabian 'Xaymar' Dirks 56a90db234 plugin: Fix missing include 2023-03-28 12:52:18 +02:00
Michael Fabian 'Xaymar' Dirks 68a49498e6 common: Rename LOG_ to DLOG_ to avoid macro confusion 2023-03-28 12:52:17 +02:00
Michael Fabian 'Xaymar' Dirks 2a7187a3c4 plugin: Fix problematic 'using namespace' code 2023-03-28 12:52:17 +02:00
Michael Fabian 'Xaymar' Dirks f98319dee7 obs/source-tracker: Don't leak pointers to sources 2023-03-28 12:52:17 +02:00
Michael Fabian 'Xaymar' Dirks f5bc53564d configuration: Don't leak pointers and add messages to exceptions 2023-03-28 12:52:17 +02:00
Michael Fabian 'Xaymar' Dirks 75663f73a4 encoders/handlers/nvenc: Don't list 'each' mode for H.264 2023-03-28 12:52:16 +02:00
Michael Fabian 'Xaymar' Dirks c9e8b889b0 encoders/handlers/nvenc: Improve UI/UX for NVENC
* "Quality" Minimum/Maximum is actually QP Minimum/Maximum
* Bitrate Limits is now just Limits
* Buffer Size and Quality Target have been moved into "Limits".
2023-03-28 12:52:16 +02:00
Michael Fabian 'Xaymar' Dirks 9a969a0b61 encoders/handlers/nvenc: Update names 2023-03-28 12:52:16 +02:00
Michael Fabian 'Xaymar' Dirks c21f2c32a4 encoders/ffmpeg: Add support for settings migration 2023-03-28 12:52:13 +02:00
Michael Fabian 'Xaymar' Dirks d9198211f7 gfx/shader: Add Per-Instance/Activation/Frame Random values 2023-03-28 12:52:13 +02:00
Michael Fabian 'Xaymar' Dirks 9562d84221 filters/shader: Fix occasional invisibility problem 2023-03-28 12:52:13 +02:00
Michael Fabian 'Xaymar' Dirks 8fc9b5cf1f sources/mirror: Retrieve source size on acquire 2023-03-28 12:52:13 +02:00
Michael Fabian 'Xaymar' Dirks 22e94bb0d8 filters/shader: Don't use scaled size for input capture 2023-03-28 12:52:12 +02:00
Michael Fabian 'Xaymar' Dirks b4250a74f5 gfx/shader: Increase size limit and function to get base size 2023-03-28 12:52:12 +02:00
Michael Fabian 'Xaymar' Dirks 411b716402 obs/encoder-factory: Fix incorrect proxy registration 2023-03-28 12:52:12 +02:00
Michael Fabian 'Xaymar' Dirks ee0a69bbf0 project: Adjust object Ids and add proxies for compatibility 2023-03-28 12:52:12 +02:00
Michael Fabian 'Xaymar' Dirks 203581f30c obs/source-factory: Add function to register proxy objects
Proxies allow for older configurations to work fine on newer versions, without having to manually adjust the scene collection to match the new ids at all. Thanks to the migration system we can freely support any number of old versions, as long as we write migration code.
2023-03-28 12:52:12 +02:00
Michael Fabian 'Xaymar' Dirks 5530d2d416 nvidia/cuda/cuda: Convert to global Singleton 2023-03-28 12:52:12 +02:00
Michael Fabian 'Xaymar' Dirks 9658c1ee0f nvidia/cuda: Remove 'cu_' prefix from types 2023-03-28 12:52:11 +02:00
Michael Fabian 'Xaymar' Dirks 6ae69a5c71 strings: Add global id prefix 2023-03-28 12:52:11 +02:00
Michael Fabian 'Xaymar' Dirks 161f10a921 encoders/ffmpeg: Rename files to match naming scheme 2023-03-28 12:52:11 +02:00