To emit frontend events early during OBS' initialization, the
disableSaving state variable needs to be "falsy" (as events will not be
emitted otherwise).
The code path taken for generating a new fallback scene collection
has disableSaving decremented to "enable" saving (and thus frontend
events) already, so it's just the code paths for existing collections
that need this workaround.
Emitting the scene changed and preview scene changed events when a
fallback scene collection has been created has side-effects when
OBS Studio is set to studio mode and can lead to potential crashes,
as the studio mode is still in an invalid state at this point.
Co-authored-by: Ryan Foster <ryan@obsproject.com>
46adc4b - Check source validity before attempting to log renderer crash
ac34d8e - Don't loop Cef exit while shutting down if task post fails
b56fd78 - Update version to 2.24.6
(cherry picked from commit 95cea5487b)
On initial run of the Blur filter, some parameters are not all set when
there is the first call to load the effect. This is actually not an
issue, so the log is now silenced at this time.
Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit f6f5c7bb25)
The reset signal was triggered whenever there was an update in the
parent source. This destroys the effect and recreates it, which can be
resource heavy.
We now let the SDK handle the source update on its own rather than
manually resetting the effect on obs side.
Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit cc452e5acd)
During the mapping and unmapping of resources, the CudaStream was not
always consistent.
This fixes the issue.
Thanks to Stephan from NVIDIA Dev support for noticing the mismatch.
Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit 3402f6c7d0)
This properly allocates the temporal state variable used in AI
greenscreen effect, when the latter is reset.
Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit b5d0054cfa)
For the background blur effect, it was found that destroying it and
then adding any other NVIDIA effect led to a blank picture.
This commit swaps the order of destroying the effect and the associated
cudaStream.
For other effects the order does not matter; I have no idea why the
order matters for blur effect and the SDK gives no indication about any
proper order at destruction time.
Fixes bug #11383.
Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit 2682ccc33c)
The threshold THR in Background removal filter has the following effect:
- if alpha if between [THR - 0.1; THR], alpha is interpolated;
- if alpha >= THR, alpha is set to 1.0;
- if alpha <= THR - 0.1, alpha is set to 0.
It was introduced in order to smooth the alpha at the edges of the
foreground.
This works fine unless THR == 1, where there can be bulk pixels with
alpha which will be interpolated as if they were at the edge;
in order to ensure that a bulk area with alpha set to 1.0 is well
defined, the max threshold is now set to 0.95 (so if the user picks a
unity threshold, a value of 0.95 will actually be used).
This fixes a bug in third party plugins which rely on a bulk foreground
safely set at alpha == 1.0. [1]
[1] https://github.com/FiniteSingularity/obs-stroke-glow-shadow/issues/61
Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit ff51280ecb)
Use a rebuilt CEF of the same version (6533) that disables
use_partition_alloc_as_malloc and enable_backup_ref_ptr_support to avoid
memory-related crashes on macOS.
(cherry picked from commit 2964d54eef)
These servers are unresponsive and are causing our nightly service
checks to fail. We do not know if these servers are intentionally
unreachable, but I do not want our nightly CI runs to keep failing, so I
am removing them unless we are informed they are working.
(cherry picked from commit 6f115df3af)
If a frame has a width or height of zero, this value will make it into
libobs/media-io/video-frame.c:video_frame_init and cause linesizes or
heights to be zero, which will result in a bmalloc(0) call and OBS will
crash.
Instead of letting the call stack get that far, check the frame width
and height here at the source, log an error, and return early if the
frame width or height are zero.
(cherry picked from commit 3437e2b082)
082a0a2 - Don't emit a normal call to a function for closing panels
663dc38 - Disable modern game controller API on Windows
4023fad - Log fatal CEF crashes to file
52c1527 - Print browser source renderer crashes to OBS log
af0651b - Log error if CefInitialize fails
8223215 - Revert "Enable Qt message loop on Linux"
16ff0fa - Update version to 2.24.5
Additionally, update buildspec.json and build-aux/modules/99-cef.json to
use the new CEF builds. This is being done because the changes in
obs-browser specifically are meant to work with a CEF build compiled
with use_gtk=false.
(cherry picked from commit 3d9d066d07)
This was logging an intermediate value, rather than the final lookahead
depth value after all calculations. Log the final value instead.
(cherry picked from commit a8a349c805)
The regexp was not tolerating a + sign is the version string,
causing configuration to fail on Ubuntu 24.04 when the installed
version is 6.1.1-3ubuntu5+esm2.
(cherry picked from commit 9b97d48573)
We don't use CUDA RT functions anymore.
So this commit removes their loading from the CUDA RT DLL.
This also fixes a crash when loading different versions of CUDA RT when
the SDK is updated [1].
[1] https://github.com/obsproject/obs-studio/issues/11813
Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit d1249cd993)
This updates checks against current SDK redist versions:
- 0.7.6 (Video Effects)
- 1.6.1.2 (Audio Effects)
Users will receive a warning if their redist versions are lower than
these.
Signed-off-by: pkv <pkv@obsproject.com>
(cherry picked from commit 417eddfc9d)
If - for some reason - the name in a scene collection is empty (or
the key doesn't even exist), use the filename stem as a fallback name.
This ensures that the scene collection entry in the cache has a valid
non-empty name.
Using an std::string allows the use of its "empty" method to check for
this otherwise invalid state of the collection data.
Ported from 1baa4619e4.
Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
Empty names for scene collections are not allowed, but this constraint
is only enforced by UI code during text input.
Thus frontend API users are able to create valid scene collections with
empty names which will lead to later possible crashes as the scene
collection is malformed.
As the frontend API uses the related function CreateNewSceneCollection
which handles exceptions by this method, no crashes should occur when
an empty string is provided by an API caller.
Ported from 552c19cab2.
Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
We directly depend on libx11 for various operations in obs-nix-x11.c,
not just xcb. So be sure to link it in too.
fixes#11667
(cherry picked from commit 22f222600a)
The reaction effects that macOS adds by default are confusing to users
as they're turned on by default and users don't know where they come
from or where to turn them off. Setting this flag in the apps Info.plist
prevents them from being turned on by default. The macOS UI makes it
very obvious to the user where they can turn them on should they wish to
do so.
(cherry picked from commit 79f5ba0e1d)
This fixes a bug where the NVIDIA NVAFX filters are migrated but not
kept in their original order, with respect to other filters.
Signed-off-by: pkv <pkv@obsproject.com>