The previous calculation was completely broken, returning offset
timestamps in the best case, and complete insanity in the worst case
(e.g. if an xrun occurs or JACK otherwise has a glitch).
This lock causes a deadlock when freeing the JACK client while a
process callback is pending:
deactivate_jack -> locks mutex
JACK thread -> calls jack_process_callback
jack_process_callback -> blocks on mutex
jack_client_close -> joins JACK thread
(deadlock as the process callback never returns)
Instead, just don't lock the mutex. This is only mutexing on
creation/destruction of the JACK client. This is not necessary: the
process callback will only run after jack_activate (which is right
before the mutex is released in jack_init()), and will stop running
by the time jack_client_close returns. We don't actually need to
unregister any ports, so just call jack_client_close first thing in
deactivate_jack, which will guarantee the process callback has
completed before returning.
In fact, jack_process_callback isn't allowed to lock any mutexes or
allocate any memory at all, so this plug-in is still broken in this way
as obs_source_output_audio does that. This can cause audio xruns, as
realtime guarantees are violated. This is something that should be
fixed in the future, but at least it's not a deadlock.
When /bin/sh isn't bash, the previous line always appears to succeed,
and modinfo's output is not redirected, because it actually runs
modinfo in the background (which always succeeds) then opens and closes
/dev/null without doing anything to it. This causes us to always think
that the v4l2loopback module is installed, even when it isn't.
Certain RTMP status descriptions can contain stream keys. We don't want
to log those normally, so log the description for unhandled status codes
as RTMP_LOGDEBUG. If someone needs to debug an RTMP server's return
messages, they can compile OBS with the RTMP Log Level set to
RTMP_LOGDEBUG.
4f873376 as part of PR #3460 changed ffmpeg_mux_packet to
fail = !ffmpeg_mux_packet. ffe4c855 only reverted that one line
instead of the entire previous commit. When the change was
reintroduced in 6071098a as part of PR #3740, it became
fail = ffmpeg_mux_packet without the negation.
This commit reverts db1e6aa and fixes the logic check.
ffmpeg-mux does not notice if ffmpeg returns an error from
av_interleaved_write_frame() which means that OBS never knows if there
is a problem in ffmpeg.
This is the biggest issue for cases like srt:// or tcp:// streams that
can regularly fail. Without this change OBS never knows that something
went wrong.
Only network streams are checked to prevent impacting potential
transient errors in recordings.
(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)
Add explicit casts to convert data pointers to function pointers.
Add references for unused parameters.
Replace accidental BOOL* return values with BOOL.