14891 Commits

Author SHA1 Message Date
Penwywern
63260148df libobs: Use absolute path for install prefix module load 2025-04-28 15:04:27 -04:00
Tom Haffenden
b8f7c77937 win-capture: Update hooked state before unhooked signal
If the get_hooked procedure is called during the unhooked signal
the source would still report that it's hooked because gc->capturing
hasn't been updated yet.
2025-04-28 14:44:22 -04:00
Norihiro Kamae
220b0ec649 libobs/callback: Catch fail cases with missing error data
In `parse_decl_string`, it jumps to `fail` label if an error occurs.
However, if the lexer encountered an error for example, `cfp.error_list`
may be empty.
2025-04-28 14:26:07 -04:00
Ilya Melamed
a19945b53a libobs: Fix setting non-0 order on only scene item 2025-04-28 13:50:01 -04:00
tytan652
1bf84a6901 cmake: Replace Xcb CMake finders with ECM 2025-04-28 13:30:26 -04:00
tytan652
190389ec11 cmake: Replace Wayland CMake finder with ECM 2025-04-28 13:30:26 -04:00
tytan652
e53293a785 cmake: Use Extra CMake Modules on Linux 2025-04-28 13:30:26 -04:00
Norihiro Kamae
1643470a85 frontend: Add dedicated translation of remaining time 2025-04-28 13:06:03 -04:00
PatTheMav
9889fcdfcc cmake: Group blake2 targets under same directory for IDEs
The blake2_static target has no specific FOLDER property set and thus
would appear ungrouped in Visual Studio's Solution Explorer.

With this change both the default blake2 target as well as
blake2_static appear in their own "blake2" subdirectory.
2025-04-25 20:06:41 -04:00
PatTheMav
8bfc28f851 frontend: Use default location for user settings as fallback
When a unique path is set up as the location for user settings,
profiles, or scene collections, migrating the files from one computer
to another will lead to confusing error messages as the original paths
might not exist on the new machine.

The default directories for configuration files are already created by
this point, so using those paths as a fallback should enable OBS Studio
to also create the corresponding fallback settings files.
2025-04-25 19:40:24 -04:00
Norihiro Kamae
5c448452cf libobs/util: Prevent locking mutex in child process when checking Qt5
The frontend has set a log handler which locks the mutex in `LogString`.
If `os_dlopen` fails in the child process, it calls `blog` and attempted
to lock the mutex that may have already been locked by another thread
before `fork()`. This change prevents the child process from locking the
mutex, resolving the potential deadlock.
2025-04-25 19:10:34 -04:00
Alex Luccisano
4efc6bf0d8 build-aux: Fix incorrect HEVC vertical resolution on AMD VCN
AMD VCN uses a different surface alignment compared to other GPUs for
encoding, which required an upstream fix in Mesa, libva, FFmpeg, and
the VCN firmware.

This commit adds the FFmpeg patches to the flatpak build of OBS which
is currently using FFmpeg version n7.1, however the patches were applied
upstream after that release. libva API version 1.21 or higher is also
required, which is satisfied by using KDE runtime 6.8.

The incorrect 1920x1088 HEVC output resolution (instead of 1920x1080)
resulted in streaming disconnects for Twitch Enhanced Broadcsating
Linux users. Local file recording when using AMD VAAPI HEVC also
outputs 1088 instead of 1080. This commit fixes both cases.

Please refer to [1], [2], and [3] for context. The patches are taken
from [2].

Note that the fix is applicable to flatpak builds only. Standalone and
Debian package builds depend on the host library versions and will
still have the problem until a version of FFmpeg with the fix is used.

[1]: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=11222
[2]: https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=13168
[3]: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10985
2025-04-25 18:14:23 -04:00
Alex Luccisano
d31271834f obs-ffmpeg: Query and log the AMF codec level
Log the codec level being used by AMF-based encoders after
ffmpeg_opts have been parsed. Users could have manually changed the
codec level so query the level via AMF then determine the string for
logging.
2025-04-25 16:48:18 -04:00
Alex Luccisano
2217eb4d95 obs-ffmpeg: Set AMF codec level properly
The default "level" setting was being used for each codec (AVC, HEVC,
AV1) supported by AMF. For example, all HEVC encoders were using
level 6.2 and this caused some playback devices to reject the
bitstream for decode because the device reported a maximum decode
level lower than 6.2.

Add functionality to determine the best match for the codec level
instead of relying on the defaults.
2025-04-25 16:48:18 -04:00
Warchamp7
f62b13957c frontend: Remove unused item delegate parameters 2025-04-25 14:01:23 -04:00
Warchamp7
36e3489d86 frontend: Adjust missing files dialog 2025-04-25 14:01:23 -04:00
jcm
506281e3f6 mac-capture: Fix incorrect enum comparison 2025-04-25 13:24:41 -04:00
gxalpha
28960a48a7 frontend/components: Remove NonCheckableButton
The NonCheckableButton class was previously used for situations where a
*checkable* button was meant to not be checkable by the *user*, but only
through code. This was useful mostly as a styling tool (and to confuse
developers like me as to what it actually did).

The disadvantage is that such a button - a button that is actually
checkable (has the checkable attribute) but ignores the user - still
gets recognized by QAccessible as a checkable button, which has
accessibility issues when used like a normal button (see QTBUG-110737).

We can still get the styling effect on *actually* uncheckable buttons by
giving them a class, so this widget should not be necessary.
2025-04-24 15:37:50 -04:00
gxalpha
76e1818866 frontend: Highlight control dock buttons using style class
Checkable buttons are troublesome because QAccessible interprets them as
checkboxes, and doesn't pass the "clicked" signal to them (see
QTBUG-110737). Instead, we only get the "toggled" signal, which also
gets triggered by things other than user input (i.e., the button getting
changed by the program).

Making them uncheckable means that they behave like normal buttons
again. To style them, we can just add a class and address them that way.
Note that uncheckable here means *actually* not checkable - unlike the
cursed NonCheckableButton class previously used that makes a button
that *is* checkable ignore the user input (and only allow check state
changes via code, effectively making it solely a styling tool).
2025-04-24 15:37:50 -04:00
stephematician
12c6febae2 linux-v4l2: Fix virtual camera start failure
Add function that tries to reset v4l2loopback output for module versions
from 0.12.5 to 0.12.7. If successful, then set flag that STREAMON and
STREAMOFF are necessary each time the device is opened/closed.
2025-04-23 20:26:49 -04:00
Ryan Foster
7cae57d3b7 media-playback: 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-04-23 19:26:54 -04:00
Malcolm Bechard
343ae6015a graphics-hook: Fix crash with Vulkan DirectDisplay
Vulkan Direct Display uses extensions:
VK_KHR_display/VK_EXT_direct_mode_display
This workflow allows creating swapchains that arn't active on the
desktop, so they don't have HWNDs.
Avoid trying to create swap_data when a HWND can't be found.

Fixes #11581
2025-04-23 17:24:29 -04:00
Lain
9b0ac7c01c frontend/widgets: Optimize preview primitive rendering
Certain draw calls were creating/destroying vertex buffers. Every call.
That's kind of not a great thing to do, so instead use the new
gs_draw_quadf() function to optimize rendering and reduce the need for
swapping vertex buffers.

Also uses a shader for DrawStripedLine so it does not have to split it
up into separate draw calls.
2025-04-23 15:23:29 -04:00
Lain
775ac56bc8 libobs/graphics: Add gs_draw_quadf()
Adds a function to draw a sprite or quad using floating point sizes
rather than integer sizes. Also named it more appropriately.
2025-04-23 15:23:29 -04:00
Lain
7b8b51b29f libobs/graphics: Improve sprite drawing perf
Sprites were unnecessarily updating a dynamic vertex buffer every single
draw call. This creates static vertex buffers for common vertex buffer
dimensions/uvs and only uses a dynamic vertex buffer when the texture
coordinates actually change.

Porbably not a significant perf change considering the very few number
of traingles we draw per frame but still nice to do.
2025-04-23 15:23:29 -04:00
Lain
d25e2c18e4 libobs/graphics: Optimize certain matrix4 functions
Optimizes certain 4x4 matrix functions by minimizing unnecessary math
operations. This ends up optimizing gs_matrix_transform() and
gs_matrix_rotate() functions and makes positional/rotational operations
a bit more optimal and requiring much less math than they would
otherwise.
2025-04-23 15:23:29 -04:00
Lain
9fa3b045a3 libobs/graphics: Remove some unnecessary checks
These checks are redundant because the base function they all lead to
does the same check.
2025-04-23 15:23:29 -04:00
Lain
40f0543488 libobs/graphics: Separate some sections via comments 2025-04-23 15:23:29 -04:00
Warchamp7
13b3c8d033 frontend: Clean up various strings 2025-04-23 14:46:51 -04:00
Lain
7f09344989 frontend/widgets: Fix integer overflow
If the crop values combined are larger than the width or height of the
source, an integer overflow will occur.

This fix converts the width/height values to int, and then clamps
any negative values to 0.
2025-04-23 14:07:09 -04:00
DeeDeeG
22c2ccfa2a obs-qsv11: Remove non-functional CQM-related code
The encoder option this function would show/hide doesn't exist in the
codebase anymore. (It was removed some time ago.)
2025-04-23 13:35:10 -04:00
tytan652
a368f05d01 CI: Use Flatpak action upstream
The fork has been merge with upstream.

https://github.com/flathub-infra/flatpak-github-actions/issues/17
2025-04-22 18:11:27 -04:00
Warchamp7
c0c77071b5 frontend: Add new appearance options 2025-04-22 15:04:49 -04:00
PatTheMav
cce189011e frontend: Migrate scene collection usage to new SceneCollection class 2025-04-21 15:17:11 -04:00
PatTheMav
ca44e3037d frontend: Add SceneCollection class as data model for Scene Collections 2025-04-21 15:17:11 -04:00
Akihiko Koizuka
665a8fea74 rtmp-services: Update niconico ingests
- Update ingest URLs to restore streaming functionality
- Consolidate free and premium member entries into a single entry
- Add more_info_link and stream_key_link
2025-04-21 14:25:50 -04:00
xlbljz
f8d2bfef7d rtmp-services: Add HEVC to supported video codecs for Bilibili 2025-04-18 16:47:41 -04:00
Ryan Foster
48660e9e2d
Merge pull request #11966 from PatTheMav/clang-format-update
CI: Update clang-format scripts and actions to version 19.1.1
2025-04-18 15:25:11 -04:00
PatTheMav
96e4d67242
clang-format: Update source code files with clang-format 19.1.1 2025-04-17 18:16:33 +02:00
PatTheMav
b3ab792916
clang-format: Enable skipping of macro definitions for clang-format 19
Without this setting many multi-line macro definitions in the code-base
would have been reformatted. As many of those definitions are formatted
in a bespoke way to ensure legibility, changing their format would be
detrimental to that specific goal.
2025-04-17 18:16:33 +02:00
PatTheMav
6282384977
CI: Update clang-format version to 19.1.1 2025-04-17 18:16:33 +02:00
Ryan Foster
cfb23a51ff build-aux: Use GitHub repo for LuaJIT
Curl reports that the luajit.org git repo is using a self-signed cert.
This is causing git operations to fail. Let's just use the GitHub
mirror.
2025-04-16 12:24:58 -04:00
Warchamp7
69ecfcd9f6 frontend: Reorganize Preview/Source context menu 2025-04-15 15:00:43 -07:00
Matt Gajownik
5b87ced7cd frontend: Increase MAX_CRASH_REPORT_SIZE to 200 KB
With CEF and NDI, logs can exceed 150KB, cutting off symbol addresses.
2025-04-15 12:33:42 -07:00
Ryan Foster
3dbb2f1cd5
Merge pull request #11747 from derrod/dual-sign-sigh
CI: Add ARM and Game Capture Dual-Signing
2025-04-15 11:56:14 -07:00
derrod
395da055da CI: Update signing action commit 2025-04-15 14:34:44 -04:00
derrod
65f417d65c CI: Support signed ARM builds 2025-04-15 14:31:30 -04:00
derrod
9fdb5cd0bc CI: Fix Windows signing workflow name 2025-04-15 14:31:30 -04:00
derrod
5b3a8dee4b CI: Sign game capture with RSA cert first 2025-04-15 14:31:30 -04:00
Sebastian Beckmann
33cec16f56 frontend/themes: Re-add transparent border
It appears that in conjunction with other changes that happened around
the time the removal of the transparent border got merged, it became
necessary again due to those other changes. Without it, only the
selected and focussed changes have a border, making the content jump
around when selected and focussed.

Reverts part of 5fa4ea44d0b364bf9be18816c2d9b35b96bab939.
2025-04-09 16:09:26 -07:00