obs-studio/libobs
Kurt Kartaltepe bc9eee922e libobs: Fix pulseaudio monitoring, once and for all
This makes multiple changes to resolve issues with monitoring. We have
added a number of things over time to resolve various issues due to our
misunderstanding of the pulse api and the explicitly wrong pulse api
documentation.

First is removing the prior stream write tracking. Write tracking
was incorrect as pulse sends you the total number of bytes it wants
written at that time and not a incremental, but also this write tracking
is unhelpful since we can just let begin_write signal when we should
stop writing.

Second removing underflow tracking, this sort of worked to detect high
latency sources like vlc which buffer ~1s of data before writing audio
data. It worked because it would grow the buffer in PA until we could
write enough data into it, but it didn't allow us to leverage that
larger buffer because we never paused the PA stream.

To solve the buffering/high latency issue instead start the PA stream
corked and only uncork it once we have enough data to reach the targeted
latency. We also check how much data we recieve from the source and if
it appears to be high latency providing us with much more data than our
target latency we increase the latency to match the source. Fixing the
VLC source issue and resulting in a smooth start to audio instead of
underruns while we play and increase latency.

Finally add some handling for pulses incorrectly documented API. Notably
that begin_write may request more or less data from you so handle both
cases. And stop attempting to use attr.maxlength which is not updated
after set_buffer_attr calls and was always -1, and tlength is just more
appropriate.

old mantis resulting in some changes, still fixed. https://obsproject.com/mantis/view.php?id=1076
fixes #7574
2023-02-25 15:13:08 -08:00
..
audio-monitoring libobs: Fix pulseaudio monitoring, once and for all 2023-02-25 15:13:08 -08:00
callback libobs/callback: Make proc_handler_t threadsafe 2021-10-14 04:28:04 -07:00
cmake cmake: Fix CMake package export templates for CMake 3.24 2022-08-09 19:48:03 -04:00
data libobs,UI: Add P216/P416 pixel formats 2023-02-21 18:48:44 +01:00
graphics libobs: Fix non-exhaustive switch statements 2023-02-18 15:22:33 -08:00
media-io libobs,UI: Add P216/P416 pixel formats 2023-02-21 18:48:44 +01:00
pkgconfig cmake: Fix pkgconfig generation 2022-07-19 09:28:51 -03:00
util libobs: Calm stringop-overflow warning on GCC 2023-01-19 13:08:46 -05:00
CMakeLists.txt libobs,plugins: Remove individual -Wno-switch 2023-01-19 13:08:46 -05:00
obs-audio-controls.c libobs: Remove unnecessary UTF characters 2022-08-13 00:49:17 -07:00
obs-audio-controls.h libobs: Mark unused audio functions as deprecated 2021-10-24 02:00:16 -07:00
obs-audio.c libobs: Fix typo in function name 2023-02-15 13:40:13 -05:00
obs-avc.c libobs: Use nal_ref_idc for H.264 priority 2022-08-17 05:30:16 -07:00
obs-avc.h libobs: Implement H.264/HEVC priority parsing 2022-08-01 08:15:29 -07:00
obs-cocoa.m libobs: Log macOS Rosetta status 2022-11-09 03:03:26 -08:00
obs-config.h libobs: Update version to 29.0.2 2023-02-04 02:17:49 -08:00
obs-data.c libobs: Remove redundant get_data calls in obs_data functions 2022-07-27 21:58:16 +02:00
obs-data.h libobs: Add obs_data_get_last_json() 2021-04-23 12:38:50 -07:00
obs-defs.h libobs,docs: Improve failed module loading logging 2022-07-30 16:55:03 -07:00
obs-display.c libobs: Extend NVIDIA anti-flicker to desktops 2022-08-29 10:02:32 -07:00
obs-encoder.c libobs: Make internal version of remove encoder 2023-01-18 11:54:20 -08:00
obs-encoder.h libobs: Remove trailing whitespace 2022-07-26 09:23:35 -07:00
obs-ffmpeg-compat.h clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
obs-hevc.c libobs: Implement H.264/HEVC priority parsing 2022-08-01 08:15:29 -07:00
obs-hevc.h libobs: Implement H.264/HEVC priority parsing 2022-08-01 08:15:29 -07:00
obs-hotkey-name-map.c libobs: Remove WIN32_LEAN_AND_MEAN 2021-10-10 19:12:45 -07:00
obs-hotkey.c libobs: Trigger bindings injected by Qt directly 2022-07-25 17:33:40 +02:00
obs-hotkey.h libobs: Deprecate obs_hotkey_enable_strict_modifiers 2022-06-04 16:03:23 -07:00
obs-hotkeys.h libobs: Remove _WIN32 ifdef from enum 2019-11-17 20:30:42 -08:00
obs-interaction.h clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
obs-internal.h libobs,UI: Add P216/P416 pixel formats 2023-02-21 18:48:44 +01:00
obs-missing-files.c libobs: Add missing file API to sources 2021-01-17 10:31:58 +13:00
obs-missing-files.h libobs: Add missing file API to sources 2021-01-17 10:31:58 +13:00
obs-module.c libobs,docs: Improve failed module loading logging 2022-07-30 16:55:03 -07:00
obs-module.h libobs: Add functions to get locale text from modules 2020-08-10 12:24:01 -07:00
obs-nal.c libobs: Add HEVC parsing functions 2022-03-19 15:46:34 -07:00
obs-nal.h libobs: Consolidate H.264 priority scheme 2022-07-31 17:38:25 -07:00
obs-nix-platform.c libobs,libobs-opengl,obs-ffmpeg-mux: Calm deprecation warnings on *nix 2023-01-19 13:08:46 -05:00
obs-nix-platform.h Drop GLX renderer 2022-05-24 14:31:48 -03:00
obs-nix-wayland.c libobs: Add media key support for linux 2022-10-29 16:08:16 -07:00
obs-nix-wayland.h libobs: Add a Wayland platform 2021-02-09 09:39:04 -03:00
obs-nix-x11.c libobs: Close display when destroying X11 hotkey platform 2023-01-25 13:56:50 -05:00
obs-nix-x11.h libobs/nix: Move X11-specific code to obs-nix-x11.c 2021-02-01 19:03:43 -03:00
obs-nix.c libobs: Add desktop environment to Linux log 2023-02-11 16:19:12 -08:00
obs-nix.h libobs/nix: Move X11-specific code to obs-nix-x11.c 2021-02-01 19:03:43 -03:00
obs-output-delay.c libobs: Minor fixes / code cleanups 2021-03-04 19:29:33 +01:00
obs-output.c libobs: Refactor obs-output encoded use of mixes 2023-01-18 11:54:20 -08:00
obs-output.h libobs: Refactor obs-output encoded use of mixes 2023-01-18 11:54:20 -08:00
obs-properties.c libobs: Duplicate URL string for OBS_BUTTON_URL 2022-12-10 15:31:13 -08:00
obs-properties.h libobs,UI,docs: Add info as text property sub-type in the property API 2022-06-26 17:31:59 +10:00
obs-scene.c libobs: Fix non-exhaustive switch statements 2023-02-18 15:22:33 -08:00
obs-scene.h libobs: Add support for nonlinear SRGB blending 2022-04-02 16:02:41 -07:00
obs-service.c libobs: Add func to get supported service codecs 2022-07-26 09:23:35 -07:00
obs-service.h libobs: Add func to get supported service codecs 2022-07-26 09:23:35 -07:00
obs-source-deinterlace.c libobs: Fix non-exhaustive switch statements 2023-02-18 15:22:33 -08:00
obs-source-transition.c libobs: Fix stopping transitions that are not active 2023-01-14 15:54:48 -08:00
obs-source.c libobs: Fix non-exhaustive switch statements 2023-02-23 20:32:52 +01:00
obs-source.h libobs, UI: Add OBS_ICON_TYPE_PROCESS_AUDIO_OUTPUT 2022-07-23 17:41:34 -07:00
obs-ui.h docs/sphinx: Fix various typos 2019-10-14 17:19:38 -07:00
obs-video-gpu-encode.c libobs: Format changes for multiple video mixes 2022-07-31 15:35:37 -07:00
obs-video.c libobs,UI: Add P216/P416 pixel formats 2023-02-21 18:48:44 +01:00
obs-view.c libobs: Allow overriding video resolution per view 2022-11-19 15:34:54 -08:00
obs-win-crash-handler.c libobs: Specify format string for bcrash 2022-01-15 00:31:31 +01:00
obs-windows.c libobs: Convert security product name to UTF-8 for logging 2023-02-15 15:36:13 -05:00
obs.c libobs,UI: Add P216/P416 pixel formats 2023-02-21 18:48:44 +01:00
obs.h libobs: Deprecate obs_get/set_master_volume 2022-11-19 20:37:22 -05:00
obs.hpp libobs: Add obs_object abstraction and functions 2022-02-02 22:35:56 -08:00
obsconfig.h.in cmake/libobs: Set OBS_COMMIT based on git describe 2022-11-22 02:54:07 +01:00