Commit Graph

14557 Commits

Author SHA1 Message Date
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
PatTheMav
2084ac0a17 CI: Add documentation to complex shell script constructs 2024-09-18 16:08:38 -04:00
PatTheMav
2d95d8b98c CI: Remove Ccache restoration for Windows builds
Once upon a time there was the idea to enable use of Ccache for
Windows builds on CI as well, but to achieve this the project would
need to switch to clang-cl.exe as its compiler and use an additional
post-build step to generate PDBs from binaries.

Using a different compiler for continuous integration than for building
release builds defeats the purpose of CI however, so the idea was
dropped.
2024-09-18 16:08:38 -04:00
PatTheMav
ae90534e2e CI: Update flatpak-builder-lint 2024-09-18 16:08:38 -04:00
Exeldro
a289581579 docs: Add obs_frontend_get_user_config 2024-09-17 12:10:22 -04:00
gxalpha
16b8e9c3fe libobs: Deselect scene item before removing
Makes sure that a scene item that gets removed is in the "not selected"
state, no matter whether it was selected before. This causes the
"item_deselect" signal to be sent if the item is selected while being
removed.
2024-09-16 18:10:12 -04:00
Norihiro Kamae
61d74fb4ab libobs: Remove obs_output_signal_delay
The function is never called, documented or exported.
2024-09-16 16:29:27 -04:00
PatTheMav
b9808eaca8 UI: Fix outdated scene collection and profile method names 2024-09-16 15:53:51 -04:00
Ryan Foster
d7c798c60d CI: Use Windows 11 SDK 10.0.22621.0
Before 6c590805e8, builds on Windows would
automatically select a Windows SDK using CMake's rules:

https://cmake.org/cmake/help/v3.25/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.html
https://cmake.org/cmake/help/v3.30/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.html
https://cmake.org/cmake/help/v3.30/policy/CMP0149.html

This meant that CI Windows builds would end up using SDK 10.0.20348.0
because that matched the runner's OS version exactly. Locally, if a
Windows SDK version that exactly matched the host system version was not
installed, CMake would select the latest Windows SDK available. This
caused some observed differences in build success between CI and local
builds if a newer SDK was used locally.

The Windows runners have the 10.0.22621.0 SDK installed, so let's
specifically select that.
2024-09-13 19:08:22 -04:00
PatTheMav
f9f974fe7b cmake: Update use of MbedTLS to support update to version 3.6.0
MbedTLS changed a lot of internals with their LTS version 3.6.0, which
are incompatible with the find module currently shipped with
OBS Studio.

The solution requires several changes to be applied at once:

* Rename the generated target name to MbedTLS::mbedtls to match the
  name used by MbedTLS' own CMake package
* Update find module to use the updated target name(s)
* Set CMAKE_FIND_PACKAGE_PREFER_CONFIG to TRUE before trying to find
  MbedTLS to ensure that CMake package files are used with priority
  (Those are shipped only with MbedTLS 3.6.0 in obs-deps).
* A deprecation warning is emitted if the find module is used with
  MbedTLS 3.6.0 available
2024-09-13 18:30:42 -04:00
Ryan Foster
f036b0dc3f CI: Update softprops/action-gh-release to v2.0.8 2024-09-13 17:40:42 -04:00
Ryan Foster
232e40f41e CI: Update peter-evans/create-pull-request to v7.0.2
We're currently using peter-evans/create-pull-request v6.0.0 which has a
known issue that affects our services-validator action when attempting
to update an existing PR. This issue was fixed in v6.0.1, but we can
update to v7.0.2.
2024-09-13 17:40:42 -04:00
Etaash Mathamsetty
2a0e614228 build-aux: Use fallback-x11 instead of x11 2024-09-13 16:48:56 -04:00
Kurt Kartaltepe
2ecf2c802c obs-qsv11: Initialize allocator response
We check that mids is a nullptr which may not be the case if this
remains uninitialized. Earlier attempt to fix this assumed we faulted on
the response itself.

fixes #11221
2024-09-13 16:27:02 -04:00
Gale, Thy-Lan
53853df33a obs-qsv11: Add AV1 Screen Content Tools 2024-09-13 15:23:35 -04:00