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.
The icon and text label for items in the source list was previously
enabled/disabled based on scene item visibility state. As of Qt 6.11
Qt no longer triggers context menus when right clicking a disabled
QLabel. This means right-clicking a hidden scene item would not
show a context menu.
Updates SourceTreeItem to use styling classes via idian helpers
instead of changing the enabled state of these labels.
Existing registering of the save hotkey in obs-ffmpeg makes it
impossible for it to trigger a frontend event, and is inconsistent with
other existing output hotkeys.
This registers the save hotkey in the frontend and removes the
registration in obs-ffmpeg, and adds a "due to hotkey" log message,
like other output hotkeys.
Notable Changes:
* deps.macos: Fix deletion of MbedTLS CMake files
* deps.ffmpeg: Fix deletion of MbedTLS static libs
* deps.ffmpeg: Enable Windows on Arm for nv-codec-headers
Construct 3 games register a top-level window class named
"WindowsWebview2Wrapper" which does not contain "Chrome" or "Mozilla",
causing OBS automatic mode to use BitBlt instead of WGC, which results
in a black screen for Construct 3 games.
Add "WindowsWebview2Wrapper" to wgc_whole_match_classes and add
compatibility entries for window capture BitBlt and game capture
warnings.
Closes#13359
AVC and AV1 encoders in AMF that support B-frames were incrementing
`dts_offset` even when B-frames were set to 0. For AVC, adjust the
`dts_offset` only when B-frames are supported and are greater than 0,
and clamp to maximum supported.
For AV1, remove the dts_offset code completely because it is being
ignored anyway. AV1 handles B-frames and offsets differently; refer
to [1] for details.
[1]: https://github.com/obsproject/obs-studio/pull/10996
obs_module_unload was never properly documented, so some plugins use it
to free resources, some use it to save data, etc. While libobs tries to
ensure all objects are shut down and destroyed before calling unload, if
another plugin is holding a strong reference, or if a reference leak has
occurred, libobs may need to call back into a plugin-provided object's
destroy function even after obs_module_unload has returned. If the
plugin has freed memory or other resources needed for the callback then
this likely results in a crash.
Going forward, we should document that obs_module_unload is now intended
only for saving data and releasing references, and that calling libobs
after it returns is not allowed. For cases where resource cleanup is
actually needed (for example, an external out of process helper needs to
be shut down or a release call to a hardware driver), a new
obs_module_destroy callback is intended to be added in a future version.
It's not that uncommon for apps on Windows to use a hacky method of
extending their windows 1-2px past the supported monitor resolution
to preserve "true" windowed fullscreen and circumvent some exclusive
fullscreen-related issues presented by their graphics library,
Windows itself, or both.
Therefore, the fullscreen detection technique has been relaxed
to properly identify windows slightly larger than the monitor's
viewport as fullscreen.
Windows also does something similar, evident by the fact that
the taskbar disappears, as it always does for fullscreen windows,
even when a window stretches slightly beyond the defined viewport.