RTLD_LAZY means that symbols will only be resolved when first used,
while RTLD_NOW tries to resolve them immediately. This means that if
there are missing symbols (e.g, because a function got removed from
libobs), dlopen with RTLD_LAZY will happily open that module but we get
a runtime crash when the module tries to use that symbol, while with
RTLD_NOW we instead get a (nicer) error on dlopen.
These were likely originally used for the obs_*_get_module functions,
but no longer are. Additionally, they weren't even implemented for
anything but obs_source_info. Let's remove this before it hits stable.
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.
Current code isn't catching a parse error exception if an invalid config
file is loaded by the plugin manager. This change wraps the plugin
manager config json parse call with a try/catch, and handles invalid
config files by creating a new config file, and logs an error that the
existing config file is invalid.
Notable Changes:
* deps.qt: Backport upstream patch removing AGL linkage from macOS
There are no dependency version updates in this deps release. The Qt
change is to ensure that OBS Studio will build with Xcode 26.
CMake internally manages the Windows SDK version as a 4-component
version string. If only provided with 3 components, CMake will
implicitly add a "0" as the fourth component and the internal
CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION variable will represent that
4-component string.
As this variable is used to set up sub-projects for other platforms,
re-creating them will fail if the original version is only provided
in its 3-component form.
For phase 1 of the plugin manager, the ability to toggle off/on plugins
to be loaded at launch is provided.
This commit adds a new Plugin Manager dialog which can be accessed from
the Tools menu, which shows a list of all installed 3rd party plugins
with a checkbox to toggle them off or on. If a change is made, the user
is prompted to restart OBS. To allow this, the plugin manager uses a
json based config file stored in the OBS config directory. Additionally
for sources in the source tree, a sample UI has been provided that
indicates any sources whose parent module is disabled, by turning its
title red.
Phase 1 of the plugin manager provides the the ability to toggle off/on
plugins loading when OBS starts. Additionally, it implements loading of
a manifest file for plugins that allows plugin authors to provide more
detailed information about the plugin including authors, support site,
name, description.
In order to accomplish this, this change updates libobs to provide
more detailed tracking of modules- specifically tracking both enabled
and disabled modules, alone with a module load state which indicates
why a module is not loaded. Additionally, changes were made to establish
a links between a module and any features (inputs, outputs, encoders,
and services) it provides (and thus the ability to determine why a
feature might not be enabled). Along with these changes to modules,
this commit also provides an indicator and lookup for core modules which
can not be disabled by the plugin manager.
Finally, this change provides functions to properly load and retrieve
a standardized plugin metadata file.
The autoselect functionality was meant to enable user feedback for when
data was selected, but something else actually used, for example in case
the value "Auto" was chosen, or an incompatible one.
However, it has a few problems:
1. It was not really used, the only places in OBS were the legacy Video
Capture Device on macOS and the Video Capture Device on Windows.
2. It was never even fully implemented in the UI. In fact, the
properties view *only* supports it for obs_property_list, despite the
API theoretically allowing any data/property type.
3. The core obs_data seems like the wrong place for this kind of
interaction between plugins and UI. obs_data should carry data from one
place to another, some built-in feedback mechanism for the other
direction doesn't make too much sense. If the functionality is desired,
I think this should be rearchitectured as some place of explicit data
transfer.
Let's mark it as deprecated for future removal.
The usages of this function are correct and intentional here. They are
meant to stay to keep consumers of the autoselect APIs working until
those APIs are removed. As such, PRAGMA_DISABLE_DEPRECATION disables the
deprecations. There is no reason to remove these calls before the APIs
themselves are removed.
These usages should be removed! On Clang or GCC this would throw a
warning now, but unfortunately on MSVC (the only compiler this plugin is
built with) PRAGMA_WARN_DEPRECATION disables the warning completely.
The only reason the usages here are tolerated is that removing them is
not completely trivial and I cannot test it.
On MSVC, PRAGMA_WARN_DEPRECATION already does that, but on other
compilers it still throws a warning. PRAGMA_DISABLE_DEPRECATION is for
(rare) situations where it's intentional and correct that the deprecated
API is still used, such as to make sure some other API still works
internally.
This reverts commit 3dcf68f8ed.
The bug that this was meant to work around was most likely QTBUG-102718,
which was fixed in Qt 6.2.5, 6.3.1, and 6.4.0. The minimum version of Qt
we currently support is Qt 6.4.2 because it is what is available on
Ubuntu 24.04. Thus, we should not need this workaround now.
https://bugreports.qt.io/browse/QTBUG-102718
Current code assumes that the overflow texture and the render target
always share the same color format including transfer function.
This assumption is incorrect however as OBS might use a 16-bit floating
point texture with a linear gamma transfer function when a high-bitrate
format is selected. On top of that OBS Studio wants rendering code to
ensure that linear color blending is used throughout the application.
The DrawOverflow function had not been updated to reflect this. This
change brings it in line with other functions involved in preview
rendering, which enable automatic sRGB conversion for the framebuffer
and the texture used in the fragment shader.
This fixes the following issue:
- when an Audio Capture source (like 'Desktop Audio',
'wasapi_output_capture' or 'pulse_output_capture') and monitoring use
the same device, one gets duplicated audio for any monitored source,
since their audio is added through both the current scene and the output
capture.
This creates a shift in audio level (about 3 dBFS for white noise, and
oftentimes for music; up to 6 dBFS for very low frequency sine waves).
We solve the bug by:
- detecting when an Audio Capture source and monitoring share the same
device;
- silencing monitored sources whenever the Audio Capture source is
unmuted.
Signed-off-by: pkv <pkv@obsproject.com>
This reimplements the reconnect logic in mpegts muxer.
Taking cues from the WHIP output, a start and stop thread is used,
controlled by a mutex, ensuring the start and stop pipelines can never
be run concurrently.
Fixes bugs #11885, #11721, #11620, #11062, #12133.
For better readibility, this commits also breaks the big set_config
function into smaller units.
Signed-off-by: pkv <pkv@obsproject.com>
This is the first part of a fix for reconnection issues with SRT
protocol.
This part implements the logic on the side of the protocol.
The fixes are as follows:
- a cleanup of return values of the various functions used. The main
libsrt_open function returns OBS_OUTPUT_XXX enum members. But the other
functions return now only AVERROR(xxx).
- an explicit check of the socket state before returning
OBS_OUTPUT_SUCCESS. This fixes an issue due to relying on socket
non-blocking mode; in caller mode, the srt_connect function will return
a success even before a connection has succeeded since it relies on
notifications by srt_epoll_wait. This would prompt obs UI to display a
successful reconnection in spite of a failure.
Signed-off-by: pkv <pkv@obsproject.com>
The do_log function defined for the muxer expects that the struct is
named stream rather than output. So rename output to stream.
This also avoids confusion with stream->output which is an obs_output_t
pointer.
Signed-off-by: pkv <pkv@obsproject.com>