Commit Graph

4852 Commits

Author SHA1 Message Date
jcm
4fd671ee89 mac-avcapture: Prevent race condition in source init/deinit 2025-03-07 13:51:17 -05:00
Ryan Foster
3437e2b082 win-dshow: Fix possible crash if frame width or height is zero
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.
2025-03-07 12:33:08 -05:00
Mirza Özokyay
90570e7a70 libobs,win-capture,win-wasapi: Fix typo in macro WIN32_LEAN_AND_MEAN
Fix the macro to prevent unnecessary headers from being included by
<windows.h>. This reduces compilation time and may prevent future bugs
due to unexpected includes.
2025-03-03 16:13:36 -05:00
Ryan Foster
3d9d066d07 obs-browser: Update version to 2.24.5
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.
2025-03-03 15:10:46 -05:00
Ryan Foster
50429bd2b0 obs-websocket: Update version to 5.5.5 2025-03-03 14:13:23 -05:00
thirumalai-qcom
6862de6d14 obs-outputs: Use _CountTrailingZeros() in ctz32 for ARM64
This change modifies the `ctz32` function to use `_CountTrailingZeros`
when `_M_ARM64` is defined, as `_tzcnt_u32` is not available on WOA.
2025-02-28 16:29:57 -05:00
thirumalai-qcom
b9fa929ab3 obs-filters: Rename S_THRESHOLD to S_FILTER_THRESHOLD
Rename S_THRESHOLD to S_FILTER_THRESHOLD to prevent macro redefinition
warnings in obs-filters.
2025-02-28 16:29:57 -05:00
DeeDeeG
a8a349c805 obs-nvenc: Fix lookahead depth value logging
This was logging an intermediate value, rather than the final lookahead
depth value after all calculations. Log the final value instead.
2025-02-22 16:04:19 -08:00
Ryan Foster
ba9ac1a9a8 cmake: Replace COMPILE_FLAGS with COMPILE_OPTIONS
COMPILE_OPTIONS was added and superseded COMPILE_FLAGS in CMake 3.11.

https://cmake.org/cmake/help/v3.30/prop_sf/COMPILE_FLAGS.html
https://cmake.org/cmake/help/v3.30/prop_sf/COMPILE_OPTIONS.html
2025-02-10 12:57:38 -05:00
Bleuzen
05c2f56853 obs-nvenc: Correct max target quality for AV1 2025-02-07 15:30:00 -05:00
Ryan Foster
e471d3109b cmake: Specify NOMINMAX all the time on Windows
This prevents the Windows headers from defining min/max macros.

Use std::min and std::max.

Modifies deps, frontend, libobs-d3d11, libobs-winrt, decklink, obs-vst,
and win-dshow.
2025-02-07 14:52:24 -05:00
Doğukan Korkmaztürk
c2b4823075 linux-pipewire: Add explicit sync support
It is possible for OBS to receive incomplete frames from the compositor
if the graphics drivers in use do not support implicit synchronization.
The compositors usually try to workaround this issue by waiting all
render operations to complete before sharing frames with OBS. However,
this has performance implications for the compositors. Similarly, OBS
should also make sure that all the rendering operations sourcing the
received buffer are complete before returning the respective pw_buffer
back to the compositor, or it would risk the image it is working on
getting overwritten without some type of synchronization.

This change leverages PipeWire's ability to share DRM syncobj fds to
implement an explicit synchronization solution to solve the problem
described above. The usage of these DRM syncobjs is negotiated with the
compositor that OBS is running on. So OBS can still work even if the
compositor does not support explicit synchronization.

Signed-off-by: Doğukan Korkmaztürk <dkorkmazturk@nvidia.com>
2025-02-05 16:20:15 -05:00
pkv
d1249cd993 nv-filters: Remove CUDA RT functions
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>
2025-02-05 11:56:51 -05:00
pkv
417eddfc9d nv-filters: Update SDK version targeted
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>
2025-02-05 11:56:51 -05:00
Ryan Foster
6f115df3af rtmp-services: Remove unresponsive servers
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.
2025-01-31 17:25:33 -05:00
Sean DuBois
4162ca7169 obs-webrtc: Enable PacingHandler 2025-01-29 17:41:49 -05:00
Dennis Sädtler
86c2094a1e mac-videotoolbox: Add Spatial AQ option (macOS 15) 2025-01-29 17:01:55 -05:00
Dennis Sädtler
3f281fef23 obs-qsv11: Migrate to obs_encoder_video_tex_active() 2025-01-29 15:01:19 -05:00
Alex Luccisano
e8c0e35fb4 obs-ffmpeg: Use obs_encoder_video_tex_active() for AMF
Use the recently added `obs_encoder_video_tex_active()` API
for AMD AMF-based encoders, similar to the recent commit for
obs-nvenc. This allows the OBS canvas to use non-NV12 pixel
formats (such as I444) while the multitrack video encoders will
use NV12 or P010 textures converted using the GPU.
2025-01-29 15:01:19 -05:00
Dennis Sädtler
e6edfe5229 obs-nvenc: Migrate to obs_encoder_video_tex_active()
Unlike obs_nv12/p010_tex_active() this accurately reflects the texture
availability in the mix associated with the encoder.
2025-01-29 15:01:19 -05:00
jpark37
689c0094b8 libobs: plugins: Use MAD for sRGB functions
Also fix stray comment about pow behavior.
2025-01-29 14:11:34 -05:00
Norihiro Kamae
34615760ac aja: Remove holding source settings
The API `obs_source_update` accept NULL for the argument `settings` and
it will just call the `update` callback without changing the settings.
2025-01-29 13:39:58 -05:00
derrod
fb56e06edd obs-outputs: Make MP4 output buffer/chunk size configurable 2025-01-28 14:37:28 -05:00
tt2468
9f4e0c52e1 obs-outputs: Attempt to generate path if one is not specified
Changes the MP4 muxer to attempt to use the path generation logic if
a path is not explicitly specified. This allows MP4 muxer outputs to
be configured with file splitting, without requiring both the `path`
and `directory`+`format` fields to be specified (saving effort on
the side of developers of custom plugins).
2025-01-27 16:02:53 -05:00
tytan652
ecb0381b8e obs-ffmpeg: Fix deprecation with FFmpeg 7.1 2025-01-24 17:38:24 -05:00
David Rosca
173487afaf obs-ffmpeg: Add QVBR rate control for VA-API 2025-01-24 15:04:50 -05:00
derrod
41a38f742c image-source: Fix slideshow stopping on last file in random mode 2025-01-16 15:13:50 -05:00
derrod
223015bd54 obs-nvenc: Abort encoder init if custom options are invalid 2025-01-16 14:50:54 -05:00
derrod
7a04980213 obs-nvenc: Fix translation string for 4:4:4 unsupported error 2025-01-16 14:27:46 -05:00
pkv
69a825b71b obs-filters: Maintain order of migrated NVAFX filters
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>
2024-12-10 14:34:48 -05:00
Chris
e3b518d08f win-capture: Add The Bazaar to compatibility list (#11601) 2024-12-09 02:12:54 -06:00
Gol-D-Ace
fbf2ea1a82 win-capture: Add Marvel Rivals to compatibility list (#11594) 2024-12-08 12:25:11 -06:00
Translation Updater
0b2c85845e Update translations from Crowdin 2024-12-06 23:21:55 +00:00
tytan652
dfc3a69c52 obs-ffmpeg: Avoid setting negative bitrate for lossless audio codec
Since FFmpeg 7.1 a check was added to disallow pre-initializing encoder
with a negative bitrate.

74385dd496
2024-11-20 13:27:38 -05:00
Marco
7722698c7c decklink: Fix string handling causing plugin to not function 2024-11-18 15:58:57 -05:00
confusionattack
4652daf748 win-capture: Avoid NULL deref when capture not initialized 2024-11-16 11:32:10 -08:00
jcm
7979421cbf mac-capture: Don't read channels for disconnected audio device
Co-authored-by: PatTheMav <patthemav+github@gmail.com>
2024-11-08 13:14:34 -05:00
Ryan Foster
b854f61a1d obs-qsv11: Remove checks for DX11
Since we currently only support DX11_D3D surfaces on Windows, we can
remove the checks for that flag and the flag itself.
2024-11-07 17:33:59 -05:00
Ryan Foster
bce98b607a obs-qsv11: Remove old DX9 code
This code was left over from a previous cleanup. We currently only use
DX11_D3D surfaces on Windows.
2024-11-07 17:33:59 -05:00
Ryan Foster
110efc0125 obs-qsv11: Remove unused debug variable 2024-11-07 16:47:06 -05:00
Ryan Foster
3bcc40ab4c obs-qsv11: Move debug code into debug sections
The code that checked frame types was used by both the MSDK < 1.7 code
and by the debug code afterward that was conditionally enabled with a
preprocessor check. Since the frame type checks are no longer used by
user code, move it to the debug/dev code.
2024-11-07 16:47:06 -05:00
Ryan Foster
d67f971756 obs-qsv11: Remove old MSDK 1.6 code
The old MSDK 1.6 code paths were for older devices which we no longer
support. Typically, version 1.0 is reported when QSV fails to
initialize. The lowest version that should be supported is 1.35, so we
should not need code that covers versions 1.0 to 1.6.
2024-11-07 16:47:06 -05:00
Exeldro
f08c9523e4 obs-filters: Move nvafx migration to queued task 2024-11-07 16:07:13 -05:00
Ryan Foster
24ea557087 obs-websocket: Update version to 5.5.4 2024-11-01 16:29:37 -04:00
Charlese2
0b87f533b2 graphics-hook: Fix null pointer dereference
Multiple APIs may be set up to capture without being initialized in
graphics-hook when multiple threads are sending present calls. This just
prevents those invalid captures from completing.
2024-10-31 12:46:04 -04:00
Ed Maste
038c91d823 librtmp: Use /etc/ssl/certs/ path on FreeBSD
All supported FreeBSD releases include a root certificate bundle in the
base system.  The path is the same as on Linux.
2024-10-30 15:01:46 -04:00
dimtpap
7c523c495c linux-pipewire: Fix memory leaks 2024-10-29 15:47:19 -04:00
tytan652
52a0486c4c cmake/plugins: Enable -Wswitch on GCC
This warning is already enabled for Clang which causes issue for things
that are usually built with MSVC or GCC (e.g. non-macOS plugins).

obs-nvenc switch warning is also fixed in this commit.
obs-qsv11 has switch warning set to not become errors.
2024-10-25 13:01:33 -04:00
derrod
e8968ba715 obs-nvenc: Force at least 4 b-frames when using UHQ tune 2024-10-21 12:18:05 -04:00
Ryan Foster
b18b1346a0 obs-browser: Update version to 2.24.4
910617b - Wait for CEF close event for docks
a76b4d8 - Update version to 2.24.4
2024-10-18 17:44:01 -04:00