Adds a new API call to the frontend API to check if OBS was launched in
Safe Mode. This will primarily be used by core modules that need to know
if they should disable certain functionality when OBS is launched in
Safe Mode, e.g., frontend-tools disabling third party scripts, or
obs-websocket turning off its server by default in Safe Mode.
Updates the plugin manager window to use the new failed module info.
Plugins installed in legacy folder locations are marked as Legacy with
a notice that will stop working in the future.
Plugins that failed to load are listed under an Errors section.
Plugins in the modules.json file that are not found are listed under
a Missing section. These entries can be removed from the modules.json
via a delete button.
This also cleans up some other small issues and updates the dialog
buttons to be Save/Discard instead of Ok/Close.
The rowLayout index is 0 which means the header was being inserted at
index -1. Qt interprets negative indexes as the end of the list, which
caused it to be inserted after the actual rows, rather than before.
This also makes the count of rows public.
With this change module loading in the application is managed by the
plugin manager and allows the application to explicitly load core
modules independantly from 3rd party (plugin) modules.
The implementation is split into separate files for different platforms
to allow for cleaner code handling the different possible locations and
path schemes used, including all possible legacy locations and plugin
bundle formats.
This change introduces new locations and directory formats for plugins:
* WINDOWS: Portable plugins need to be placed in a directory called
"plugins" adjacent to the "bin" directory of an OBS Studio
installation.
* WINDOWS: Plugins need to be packaged into their own directory
"bundles", with the associated DLL in the root of the bundle and the
associated "data" directory next to it.
* WINDOWS: The "obs-plugins" directory adjacent to the "bin" directory
is deprecated and considered a legacy location for all plugins.
* MACOS: No changes in locations or formats.
* LINUX: Plugins distributed via system package managers now need to use
the "obs-modules/plugins" directory in the system library directory
for binaries, and the "obs/obs-modules/plugins" directory in the
system data directory for resources.
* LINUX: The "obs-plugins" directories in the system library and system
data directories are deprecated.
* LINUX: Plugins distributed outside of system packages need to use the
same directory format as plugins for Windows (see above).
* LINUX: A "portable" plugin location like on Windows is not supported.
* LINUX: Proper XDG directory locations are scanned for plugins, using
XDG_CONFIG_HOME for the legacy plugin format and XDG_DATA_HOME for the
new plugin structure.
* LINUX: Changes Flatpak plugin loading to use the new plugin structure
(while still supporting the legacy structure), and moves Flatpak
specific plugin loading to its own source files.
* ALL PLATFORMS: A single environment variable "OBS_PLUGINS_PATH" can
now be used to provide a highest-priority location from which to load
plugins. This directory needs to contain plugin bundles per the new
format. The one exception is Flatpak which does not support loading
plugins from an env provided location.
* ALL PLATFORMS: A custom legacy plugin locations can still be provided
via the "OBS_LEGACY_PLUGINS_PATH" and "OBS_LEGACY_PLUGINS_DATA_PATH"
environment variables. These are only compatible with plugins using
the legacy format and are considered deprecated. The one exception is
Flatpak which does not support loading plugins from an env provided
location.
Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
Adds a separate code path just for loading core modules based on the
list of modules created at build system generation. Paths to load core
modules from is platform-specific, but not changeable for users and is
thus not changeable by a caller.
Instead path discovery is implemented for each platform separately,
generating the necessary module loading package directly before handing
it over to the existing module load callback function.
Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
This adds an ENABLE_FLATPAK option which sets an OS_FLATPAK variable
for linux builds, and causes any Flatpak-specific build logic to be
enabled at configure time.
Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
Moves first-party runtime modules into the "core" directory rather than
the "obs-plugins" directory to better differentiate them from legacy
plugins as well as existing 3rd-party plugins.
This change also requires the existing plugin directory to be explicitly
added as a possible module search path by application logic, as libobs's
internal logic will not add this path anymore and thus third-party
plugins would not be discovered anymore.
Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
Core modules are main OBS Studio functionality implemented as runtime
modules, but are conceptually considered mandatory and the application
is incomplete without them.
This change also introduces a configure-time dependency of core modules
on "libobs" (already a generation-time dependency) and produces a
library target with the names of all core modules available at build
system generation.
Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
This provides the counterpart to the existing "target_disable" function,
which also allows the functionality to be factored out of existing
helper code that might run this implicitly.
Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
Should always call `gs_leave_context` after `gs_enter_context` or it
might cause a lock leave.
This commit makes sure all code paths will call `gs_leave_context` if
it called `gs_enter_context`.
We're still getting crash reports from this code and it seems like C++
file I/O with exceptions set is a minefield - even closing a file in an
exception handler can trigger further exceptions from buffer flushes for
example. Using std::filesystem to check the file exists before opening
it also introduces exceptions and is a pointless TOCTOU check anyway.
This commit removes the exception bits from the streams and relies on
ifstream operator bool and ofstream fail() instead, greatly reducing the
number of possible exception generating paths we need to worry about.
Uses Qt's QGlobalStatic macro to create a shared Utils singleton for
repolishing widgets. This means that multiple calls to the Utils'
styling class helpers only trigger a single repolish per widget during
a one tick of the Qt event loop.
Updates the idian widgets to no longer inherit from the Utils class.
The multi-inheritance approach was from an earlier iteration of the
utils prior to the static methods and served as a convenience factor.
With the addition of the static methods, many of them no longer need
an actual instance of the class.
The idian widgets were built when we had a much lower
understanding of how Qt expects you to build custom
complex widgets and without a direct use-case.
They were also built far too rigid for what every attempted
use of them thus far has necessitated. These changes break
them into simpler 'pieces' and provide getters for internals
that are intended to be accessed.
The CVDisplayLink callback thread driving blitSwapChains() has no
implicit autorelease pool. CAMetalDrawable objects returned by
nextDrawable() are autoreleased and each holds an IOSurface backed
by an IOSurfaceSharedEventReference mach port.
Without an autoreleasepool, these drawables are never drained on the
display link thread, causing a new IOSurface (and port) to leak every
frame when a render target is set (e.g. cross-process preview via
CAContext/CALayerHost).
Fix by wrapping the full frame cycle (nextDrawable → blit → present
→ commit) in an autoreleasepool, so autoreleased drawables are
reclaimed each frame and returned to the maximumDrawableCount pool.
- Enables access to stable branch (Flathub) plugin to Flathub Beta releases
- Strip away access to beta branch plugins (Flathub Beta), mostly unused
by submitters
- Enables test Flatpak plugin from Flathub submissions to be tested
This updates the video FX SDK to 1.3.0, which enables arm64 support.
Backwards compatibility with SDK 0.7.6 has been kept.
Signed-off-by: pkv <pkv@obsproject.com>
Voice Activated Detection (VAD) does not work with the room echo removal
(dereverb) FX.
So we remove it from Properties.
Signed-off-by: pkv <pkv@obsproject.com>
SDK 3.0.0 brings compatibility with arm64. The DLL loading sequence has
been adjusted since the FX are now loaded in their own child DLL.
The DLL loader has been also cleaned up by removing unused symbols. This
allowed us to dodge a few ABI breaks from NVIDIA...
Signed-off-by: pkv <pkv@obsproject.com>
Clarifies language around thread-safety of function-local static
variables. Since C++11 these variables are initialized in a thread-safe
way (no concurrent initialization), but this guarantee does not extend
to consecutive accesses to that object (which would still need to use
a thread-safe internal implementation if necessary).
Adds guidelines for pull request reviews particularly around requesting
reviews and how to handle review threads:
* Only project members are allowed to request reviews from specific
users.
* Only reviewers are allowed to resolve review comment threads, only
project members can unilaterally resolve them if reviewers are
unresponsive.
* Reviewers should thus take care to check for updates and resolve
their comments if they have been addressed.
* Pull requests authors should try to avoid force-pushes and rebasing
their branches to a minimum to make it easier for reviewers to track
changes during review.