c3d7abfaba
Simplify usage of the SIMDe header
This obviates the need for sse2neon as well and fixes compilation of all
plugins that referenced sse-intrin.h on all architectures, not just
arm*.
PulseAudio code needs to be called with the PA lock held. This chiefly
fixes multiple races during stream shutdown:
* If the functions are called without the lock held, deferred event
handling races end up with PA infinite looping on the mainloop, or
asserting, or other badness, as the reentrant calls cause data
structure corruption on the PA side.
* If we don't reset our callbacks, PA might call us even after we
request stream disconnection (since the stream actually getting fully
shut down is asynchronous), and then we dereference NULL pointers from
our userdata etc. PA will keep its data structures alive until necessary
via reference counting, but not ours.
The lock around pa_stream_begin_write doesn't result from any issues I
experienced, but it looks correct; PA doesn't say anywhere that that
function is thread-safe.
Regression introduced by dc4e20500: while the stop detection is pending,
it should still return false so the rest of the discard code can run.
Otherwise, the source audio will remain in the buffer, lagging the
source and triggering audio buffering increases until max audio
buffering is reached.
Similar to 315fbd6 and 6071098, ignore non-fatal errors during the
remux process. It's possible OBS itself writes a file that generates
these errors when remuxed.
(This commit also modifies rtmp-services and UI)
Changes the maximum resolution size to a resolution list, and splits the
maximum FPS to its own function.
(Note: ABI has not been modified because the last changes still haven't
been released yet, so it's safe to modify this as long as the changes
haven't been officially released)
(This commit also modifies rtmp-services)
Implements obs_service_get_max_bitrate, which allows retrieving the
maximum audio/video bitrates directly rather than being forced to use
the apply method. Makes it a bit easier to get the bitrate values.
Add the content of the XDG_SESSION_TYPE environment variable to
the output log if it is set. This is usually set on modern Linux
distributions and typically carry either "x11" or "wayland" when
run from a desktop environment.
This is independent from the QT_QPA_PLATFORM environment variable
which would allow OBS Studio to run inside a wayland session. The
session type it runs on does have an implication on the behavior of
some plugins like screen and window capture. So having this
information exposed here is extremely helpful for diagnosing
issues.
This obs_service_t object callback was implemented specifically for
services which may have a maximum recommended width, height, and
framerate that needs to be enforced.
Adds a cmake variable (DEBUG_FFMPEG_MUX) which enables FFmpeg debug
output in the ffmpeg-mux subprocess, and if on Windows, shows the
console window of the ffmpeg-mux subprocess so the current output can be
seen.
This isn't particularly needed, as a service with multiple tracks won't
be using multiple tracks to begin with anyway. This might change later,
but for now just mark it deprecated.
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.