Commit Graph

14571 Commits

Author SHA1 Message Date
Lain
5a1fca9347 linux-capture: Fix potential null pointer dereference
Use dstr_cmp() instead of strcmp() to prevent null pointer dereferences.

This code for this source has way too many pointers.
2024-10-05 16:49:23 -07:00
Lain
089ba29961 libobs/util: Prevent null pointer deref with dstr_cmp
This makes it prevent any null pointer dereferences, and makes it
consistent with the other dstr compare functions.
2024-10-05 16:49:23 -07:00
Kurt Kartaltepe
cc36ccd07d cmake: Use fixed SOVERSION everywhere
We missed a spot when freezing the SOVERSION to 30 after we flipped to
31 causing builds to break.
2024-10-05 14:03:14 -07:00
Translation Updater
e6d9f73736 Update translations from Crowdin 2024-10-05 05:02:27 +00:00
Matt Gajownik
5cd5e736c6 CI: Fix translation download script bugs
- download: Perform download tasks in the correct order
 - download: Don't attempt to commit empty submodule changes
2024-10-05 14:58:30 +10:00
Matt Gajownik
2e6d0d0a52 plugins: Update translations from Crowdin 2024-10-05 14:56:41 +10:00
Matt Gajownik
67b952310c CI: Use correct commit hash for translation download
Previous hash was for the source changes, needed the built action.
2024-10-05 12:39:57 +10:00
Matt Gajownik
91fdbefafb CI: Bump Crowdin Sync to fix translation download 2024-10-05 12:20:16 +10:00
Ryan Foster
5fdc6d216f libobs: Update version to 31.0.0 2024-10-04 18:39:41 -04:00
Ryan Foster
b723736ec9 .git-blame-ignore-revs: Add change from column limit increase 2024-10-04 18:30:06 -04:00
Ryan Foster
a1fbf1015f clang-format: Increase column limit from 80 to 120 2024-10-04 18:19:27 -04:00
Ryan Foster
109f64c446 shared/obs-hook-config: Update graphics hook to 1.8.4 2024-10-04 17:53:45 -04:00
Ryan Foster
5aaac2f0f9 libobs: Update version to 30.2.3 2024-10-04 16:38:29 -04:00
tytan652
f4c4f09075 libobs/util: Improve inhibit functions on Linux
Avoid creating the screensaver inhibitor thread when another method has
been applied.

Make inhibition unavailable in a Flatpak if portal is not available.
2024-10-04 16:38:03 -04:00
Suman Manjunath
9b8fa0f0ca UI: Enable first-party YouTube Chat features in OBS
Unlock the full feature set of the YouTube Chat dock in OBS by removing
custom scripting/CSS logic. Enable the signed-in experience for live
streaming content creators while also sharing login credentials with the
YouTube Control panel dock.

This will allow OBS users to utilize features _already_ supported in the
YouTube Chat plugin, such as

* creating polls
* managing Q&A sessions
* a rich emoji set in the input panel
* emoji fountains
* moderation tools

and many more. These features are available to users who are logged-in
to YouTube Chat and/or the YouTube Control panel.
2024-10-04 16:14:38 -04:00
Suman Manjunath
492309c504 UI: Use shared cookie manager for YT Control Panel
Use the cookie manager shared by service integration browser docks for
YouTube Control Panel.

This will enable users of the YouTube Chat panel have a better (creator
facing) experience for observed chat message latency, for those users
who sign-in to the YouTube Control Panel or YouTube Live Chat.

NOTE: This commit does not have any migration logic for existing
logged-in users of YTCP, they will need to sign-in again. Based on usage
stats, this is not going to affect a large fraction of OBS users.
2024-10-04 16:14:38 -04:00
Alex Luccisano
39f0ed6e75 shared/bpm: Fixed crash when using Stream Delay
BPM initialization occurs with the first call to the
`bpm_inject()` callback function. When Stream Delay is
active, there is a case where the first call might never
happen, specifically if a user stops the stream with the
discard delay option before streaming begins. In such a
case OBS will crash due to an uninitialized mutex being
referenced in `bpm_destroy()`.

Use `pthread_once()` in both the `bpm_inject()` callback
and `bpm_destroy()` to ensure BPM initialization has occurred.
2024-10-04 15:49:44 -04:00
Warchamp7
cb026964b0 UI: Replace themeID and style hints with class property 2024-10-04 15:20:49 -04:00
gxalpha
71775e3619 libobs: Assure large enough buffer in dstr_from_cfstring
Per the documentation of CFStringGetCString, the buffer provided must be
large enough not just for the string itself, but also for a NUL
terminator. This space for the NUL terminator is currently ignored, and
we just get lucky that CFStringGetMaximumSizeForEncoding often
dramatically overestimates the space required. However, it is possible
to actually hit the maximum with the string itself (for example by using
strings that contain exclusively Chinese characters such as "我"), in
which case the conversion fails. Adding the extra byte for the NUL
terminator fixes this.
At this point, we can also safely assert that our max_size is larger
than zero, silencing a clang analyzer warning that now is no longer
valid.
2024-10-04 13:36:09 -04:00
tytan652
42670ab4e3 plugins/test: Remove legacy CMake remnants
Some legacy files were missed in 72428ccd97
2024-10-03 17:32:08 -04:00
gxalpha
4420594729 libobs: Remove unused is_in_bundle() method 2024-10-03 17:09:54 -04:00
Dennis Sädtler
37ab500f93 UI: Set NV12 as preferred format for multitrack video encoders 2024-10-03 16:47:32 -04:00
Dennis Sädtler
a4bda61015 libobs: Do not attempt to reconnect if stop event is set 2024-10-03 16:11:20 -04:00
gxalpha
ad5040cfd2 UI: Fix What's New increment settings mismatch
The InfoIncrement key in the application config everywhere else. This
mismatch caused the "What's New" menu entry to stop functioning.
2024-10-03 10:44:46 -04:00
gxalpha
4dd3cf6758 libobs: Deprecate obs_scene_sceneitem_from_source
obs_scene_sceneitem_from_source is problematic because there can be
multiple items of the same source in a scene, which the function doesn't
account for. In such a case, it would return the first item it finds,
which often might not be what a developer expects.

It was originally added for the undo/redo-operation of "Add New Source"
where the UI guarantees that the item is unique, but for a general case
it's not suitable.
2024-09-27 17:22:44 -04:00
gxalpha
e3435f8dee UI: Replace usage of obs_scene_sceneitem_from_source
Instead of first creating the scene item and then finding it again using
a method that's generally problematic (and only works here because we
know that there is only one instance of a source), let's just remember
the scene item in AddNew after we create it, similar to the source
itself.
2024-09-27 17:22:44 -04:00
PatTheMav
b4137fa65a UI: Fix crash when creating scene collections with "unsafe" names
Scene collection names that are not considered "safe" by OBS Studio
get a changed JSON file name with incompatible characters replaced.

The refactored scene collection implementation uses the Load function to
either activate an existing scene collection or create a new one if it
does not exist.

The Load function however overwrote the scene collection name set in
the profile with its own variant based off the "safe" file name, which
created a mismatch with the code that created the collection data
model.

As the Load function is only called by ActivateSceneCollection (which
itself already sets the name and filename for the collection), removal
of this superfluous code in the Load function also fixes the issue.
2024-09-27 14:01:38 -04:00
Norihiro Kamae
6fed2c2bdd UI: Fix error color at clipping is not displayed on horizontal meter 2024-09-27 13:30:10 -04:00
Norihiro Kamae
1dc87caea4 libobs: Fix sending unclamped audio to output handler
The variable `input.conversion.allow_clipping` was left uninitialized.
This could result in randomly sending unclamped audio to the output
handlers that did not request the conversion.
2024-09-26 19:12:34 -04:00
Exeldro
de2f1fc3a3 libobs: Fix source profiling inactive sources 2024-09-26 18:09:14 -04:00
derrod
92a38bcd40 libobs: Disable transform debug logging by default 2024-09-26 17:46:47 -04:00
derrod
5fea7d325e libobs: Fix crop values for new nested scene sources being incorrect 2024-09-26 16:08:42 -04:00
Dennis Sädtler
a0edc5e8bc libobs: Do not allow reconnect if stop code is OBS_OUTPUT_INVALID_STREAM 2024-09-26 15:14:26 -04:00
PatTheMav
32cfa1626f UI: Fix missing support for portable configuration files
Windows and Linux allow the storage of configuration files relative
to the binary location, which is enabled by default on Windows and has
to be explicitly enabled on Linux.

This was originally conflated with the LINUX_PORTABLE build setting
which also allowed the application itself to be run from non-default
locations on a Linux system.

This change reintroduces the functionality behind the
ENABLE_PORTABLE_CONFIG build setting on Linux.

It also adds necessary code to make this setting compatible with the
recently introduced relocatable settings code changes:

When portable mode is enabled, user configuration, scene collections,
and profiles are stored in the config directory created for portable
mode.
2024-09-26 14:39:44 -04:00
PatTheMav
51d66dcedf cmake: Change library discovery order in LuaJIT find module
To ensure that the find module prefers the variant of LuaJIT shipped
as part of obs-deps, it's necessary to give the name as shipped in
obs-deps the highest precedence.

This ensures that the "find_library" call will discover the less
version-specific variant of the library possibly installed via
Homebrew.
2024-09-26 14:14:55 -04:00
PatTheMav
ace60a655c cmake: Disable discovery of Homebrew libraries for dependencies
macOS builds should only use dependencies built via the obs-deps
build scripts. Default variants of the same dependencies are not
compatible with our app packaging requirements and thus will create
issues when creating the app bundle.

This is specifically an issue when MbedTLS is installed via Homebrew
which ships a CMake package config by default and is picked up
by our code ever since we switched to prefer CMake packages.
2024-09-26 14:14:55 -04:00
Service Checker
8cacec92f5 rtmp-services: Remove defunct servers/services 2024-09-26 13:52:42 -04:00
Ryan Foster
f75a6dd247 CI: Update deps to 2024-09-12 release
Notable changes:
 * deps.qt: Revert Qt from 6.7.2 to 6.6.3 on macOS
 * deps.qt: Revert Qt from 6.7.2 to 6.6.3 on Windows
2024-09-26 13:14:53 -04:00
Norihiro Kamae
06642fdee4 UI: Fix low value of std::clamp gets greater than high value
`std::clamp` was introduced at 60a45d3aa3 but it caused a runtime
assertion failure on Windows that checks the low value of `std::clamp`
is not greater than the high value.
2024-09-18 17:15:02 -04:00
gxalpha
612ef65726 CI: Set default values for have* outputs in macos-codesigning action
The "provisioning" and "notarization" steps that set the
"haveProvisioningProfile" and "haveNotarizationUser" outputs
respectively only run if "haveCodesignIdent" has evaluated to true in
the prior "codesign" step.
This means that if "haveCodesignIdent" is false, the other two outputs
are left unset, evaluating their "value" expressions (and as such the
output of the action) to empty instead of false.

This issue was found in the equivalent action in obs-plugintemplate. As
that action is basically a mirror from the obs-studio action, let's fix
it here too.
2024-09-18 16:49:54 -04:00
PatTheMav
5779b52d92 UI: Fix config class mismatch in OBSApp class 2024-09-18 16:29:01 -04:00
PatTheMav
aa10a7b46a CI: Extend condition check for language file upload 2024-09-18 16:08:38 -04:00
PatTheMav
c2ea78c31f CI: Update build script for Ubuntu to require Ubuntu 24.04
Also defaults to Qt6 and x86_64 builds, thus no toolchain file is
needed and no additional data in buildspec is needed either.
2024-09-18 16:08:38 -04:00
PatTheMav
51f24cb82a CI: Remove experimental aarch64 support in build script 2024-09-18 16:08:38 -04:00
PatTheMav
fd63da92ee CI: Update build and package scripts to require Zsh 5.9 2024-09-18 16:08:38 -04:00
PatTheMav
5243783d1b CI: Update qt-xml-validator action to use check-changes action 2024-09-18 16:08:38 -04:00
PatTheMav
2bffc6b1ff CI: Update build-project workflow to use Xcode 15.4 for macOS builds 2024-09-18 16:08:38 -04:00
PatTheMav
df75840fdb CI: Update wrangler-action action 2024-09-18 16:08:38 -04:00
PatTheMav
731be3ef44 CI: Update sphinx-publish-actions action 2024-09-18 16:08:38 -04:00
PatTheMav
27417d3698 CI: Add documentation to XSLT files for Sparkle Appcast action 2024-09-18 16:08:38 -04:00