Implicitly capturing "this" with the capture default "=" is deprecated
with C++20. We fix this by either explicitly passing this, or by copying
the required members manually.
While this exposes some rather expensive copies like the QList
selectedItems in OBSBasic_Preview, it doesn't introduce them ("=" copies
implicitly).
Improves app shutdown in a few ways, including separating out different
pieces of the OBSBasic close handler into their own functions.
Removes the crash handler sentinel earlier when the main window is closed,
preventing unclean shutdown warnings when a plugin causes issues. While not
ideal, the dialog is not useful when we cannot specify which plugin caused the
problem.
Increases shutdown priority of the main application so that when OBS interrupts
the session ending, CEF is not closed at the same time. This fixes a crash.
Additional safeguards and event handling to try to ensure a smoother shutdown.
This removes the need to provide an undocumented launch argument to
enable custom RTMP service configurations to use multitrack encoding
and also provide a custom configuration.
Putting the crash sentinel in the main "obs-studio" directory carries
the risk of unwanted deletion of files in the same directory, which
usually contains user configuration files like "user.ini" and
"global.ini".
Even though the code will ignore any file that does not start with the
crash sentinel prefix string, the code itself would allow changing the
prefix to "global.ini" and thus inadvertently delete the global
configuration file as well.
To further reduce the risk, this change will put the sentinels in a
separate sub-directory that should only ever contain sentinel files,
all of which can possibly deleted without any data loss for the user.
The CrashHandler class encapsulates all functionality around unsafe
shutdown detection as well as crash log discovery and log upload.
Each (functional) CrashHandler should be initialized with an app launch
UUID, which enables the handler to disambiguate a sentinel file for the
current app launch from those of prior app launches.
Canvas is a move-only type without a copy constructor. Since C++17
requires types stored in std::optional to be copy-constructible unless
explicitly allowed, Clang 20+ emits an error when attempting to
instantiate std::optional<Canvas>.
While GCC allows this as an extension, Clang enforces the standard
more strictly.
This PR replaces std::optional<Canvas> with std::unique_ptr<Canvas> to
resolve the build error with Clang 20+ while keeping functional
behavior identical.
Tested with GCC 15.1.0 and Clang 20.1.7.
Co-Authored-By: Ryan Foster <ryan@obsproject.com>
"Enable network optimizations" in the Advanced Settings is referred to
as `NewSocketLoop` in the code. This feature was incompatible with
multitrack video but now works properly. Remove it from the
incompatible settings check.
Enhanced broadcasting requires system information to be gathered
on the client and submitted to the GetClientConfiguration request
in order to obtain a valid response from the server. This commit
adds support for gathering the required information on Linux-based
systems.
VAAPI encoders deviate from other encoders (e.g. AMF, NVENC) with
the "profile" setting being an integer instead of a string. With
enhanced broadcasting, "profile" is signalled as a string. Convert
the string-based profile to the appropriate integer-based profile
for VAAPI encoders as a workaround, until VAAPI supports string-based
"profile" (if ever).
This prevents the Windows headers from defining min/max macros.
Use std::min and std::max.
Modifies deps, frontend, libobs-d3d11, libobs-winrt, decklink, obs-vst,
and win-dshow.
The previous commit switched global hotkeys from requiring Accessibility
to just Input Monitoring permissions. This adds the matching changes to
the permissions dialog, also accounting for the fact that Accessibility
includes Input Monitoring.