This adds logging for the "Hardware-accelerated GPU Scheduler" (HAGS)
introduced with Windows 10 2004 which is known to cause issues with OBS
and game performance.
Useful for sharing translated text from modules with the frontend. This
is technically already done via properties, but it would be nice to just
be able to explicitly look up locale text directly rather than have to
go through properties.
It is undefined behavior to apply an offset to a null pointer. I would
have liked to reference cppreference but best I found was the PR that
added this check to clang's undefined behavior sanitizer:
https://reviews.llvm.org/D67122 .
Currently we use a bool flag to signal the video thread that it should
call obs_source_deferred_update. This does not work correctly when the
update callback is slow and the update is triggered faster than the
callback can complete.
For example:
* the settings are set to state A
* defer_update is set
* obs_source_deferred_update is called and enters into the callback
* the callback starts making use of the settings in state A
* the settings are set to state B
* defer_update stays set
* the callback finishes
* defer_update is set to false
Now defer_update is false but the callback has only observed settings in
state A but not B.
This commit fixes this bug by keeping an update counter. If the counter
has changed while we were in the callback we know that we need to update
again.
The counter is atomic. The current version uses a plain bool which is a
data race as the value is written and read in parallel.
Add util/sse2neon.h to libobs_util_HEADERS in CMakelists.txt. The
previous patch #3180 for arm/rpi support was missing this in
libobs/CMakeLists.txt, and as a result plugins such as obs-websocket,
obs-ndi fail to compile on arm/rpi as the header is not copied with the
install.
Fixes a crash caused by checking for enum_all_sources and then calling
enum_active_sources instead of enum_all_sources. enum_active_sources is
not required for sources that specify enum_all_sources.
The previous preloaded video behavior updated the texture on preload
rather than when the video was shown, during which time the texture may
have been modified by other processes, resulting in the wrong frame
being displayed.
The OBSContext never called obs_startup but would always call
obs_shutdown in its destructor, resulting in shutdown calls even if
libobs wasn't initialized (eg due to a startup error). Instead, we now
track if libobs was initialized in OBSApp and call shutdown in the
destructor.
Modules are now unloaded while OBS core is still active, allowing
modules that call into libobs in their unload function to continue to
work. This changes the behavior of such calls - previously they were a
no-op since the OBS core would be gone, but they are now executed with
the OBS core still being active.
libobs functions check for a null obs_core inconsistently. If the core
is null, the functions silently return with no indication of an error to
the API user. This commit removes all null checks in libobs functions
that require libobs to be initialized. For OBS Studio, we are
(hopefully!) using the API properly so this should have no impact.
As of 3.17 using find_package_handle_standard_args checks that the name
of the FindXXX file and the first argument are the same case.
Some modules used non-standard variables or the old singular variables
instead of plurals. This normalizes variable usage to the new-style.
Some CMakeLists.txt did custom error checking instead of propagating
find_package errors. These were changes to call find_package with
REQUIRED or without QUIET where needed and shortens the custom status
messages. This helps users who want to enable that functionality see
what precisely wasnt found.