Switch to Visual Studio 2022 and clang-format 13.
The Ubuntu 22.04 image currently has clang-format 12.0.1, 13.0.1, and
14.0.0. VS2022 17.2 ships clang-format 13.0.1, so let's use that for now
until VS2022 17.3 is available with clang-format 14.
This commit also makes the necessary changes to allow the clang-format
check to pass.
This commit also updates the obs-browser submodules with the necessary
changes.
With https://github.com/obsproject/obs-studio/pull/5148, it was
brought up that the loading of the missing files was not thread
safe, as the missing files were being loaded late in the loading
process. This PR tries to fix that problem, while still simplifying
the original missing files code.
If the path to clang-format has spaces, as might occur when testing
locally with a version not covered in this script, it will fail. Enclose
the call to clang-format in quotes to prevent this failure.
Please visit the submodule repo for blame history:
https://github.com/obsproject/obs-vst
This also replaces the obs-vst .clang-format with obs-studio's.
This commit depends on the previous commit, which removes the submodule
separately as Git complains otherwise.
Co-authored-by: Alex Anderson <anderson.john.alexander@gmail.com>
Co-authored-by: Anton <camotank12345@gmail.com>
Co-authored-by: Blue Cat Audio <support@bluecataudio.com>
Co-authored-by: Cephas Reis <c3r1c3@nevermindonline.com>
Co-authored-by: Colin Edwards <colin@recursivepenguin.com>
Co-authored-by: Florian Zwoch <fzwoch@gmail.com>
Co-authored-by: Fogmoon <i@fogmoon.com>
Co-authored-by: Gol-D-Ace <Gol-D-Ace@users.noreply.github.com>
Co-authored-by: Igor Bochkariov <ujifgc@gmail.com>
Co-authored-by: Jesse Chappell <jesse@sonosaurus.com>
Co-authored-by: Keen <523059842@qq.com>
Co-authored-by: Kurt Kartaltepe <kkartaltepe@gmail.com>
Co-authored-by: Matt Gajownik <matt@obsproject.com>
Co-authored-by: Matt Gajownik <matt@wizardcm.com>
Co-authored-by: Richard Stanway <notr1ch@users.noreply.github.com>
Co-authored-by: Ryan Foster <RytoEX@gmail.com>
Co-authored-by: follower <github@rancidbacon.com>
Co-authored-by: gxalpha <beckmann.sebastian@outlook.de>
Co-authored-by: jp9000 <obs.jim@gmail.com>
Co-authored-by: jpark37 <jpark37@users.noreply.github.com>
Co-authored-by: mntone <sd8@live.jp>
Co-authored-by: tytan652 <tytan652@tytanium.xyz>
Co-authored-by: wangshaohui <97082645@qq.com>
Co-authored-by: wangshaohui <wang.shaohui@navercorp.com>
Please visit the submodule repo for blame history:
https://github.com/obsproject/obs-vst
NOTE: You may need to manually delete plugins/obs-vst to pull this diff.
When the ScreenCaptureKit-based source is generated, the window ID
read from the settings will be empty and interpreted as window ID "0".
This window ID doesn't represent a valid window, but the capture stream
is nevertheless successfully initialized with that value, but will not
generate any output.
Worse, the activated stream should be destroyed when a new stream is
created, but creation will throw an error.
This commit ensures that a valid window ID is used if no good default
value is available, ensuring a working (and destroyable) stream.
Also removes any remaining usage of the old window-utils.
Initializing a display stream with a content filter which excludes an
empty list of windows leads to a broken stream. Initializing with a list
of all available windows as a workaround re-enables functionality.
Reduces the amount of calls to the update callback (also reduces amount
of calls to check for available capture content).
Also moves some code to only update data for currently selected capture
type.
Whereas the `availability` checks will correctly detect macOS 12.5,
the `__MAC_OS_X_VERSION_MAX_ALLOWED` macro is dependent on the platform
SDK. The most current platform SDK is 12.3, hence why this version
needs to be checked for.
This change makes it so that if you select a service, it will check to
see what codecs that service supports, and only list encoders of those
codecs.
If the service doesn't support a codec and you currently have an
unsupported codec selected in output settings, then it'll prompt you
with a dialog telling the user it will switch to a supported codec, and
if they click yes, then it'll change the codec for the user. If they
click no, then it'll switch back to the previously selected service.
If QT_VERSION is not defined, it gets define with the AUTO value. And
its definition is moved to the helper file.
find_qt now:
- Check quietly for Qt5 and Qt6
- If QT_VERSION is set to AUTO. It checks firstly if Qt5 was found it
will use it. If not it do the same for Qt6
- If QT_VERSION is set to 5 or 6, it checks if the choice was found and
use it. And if not, it falls back to the other if found.
- If neither Qt5 or Qt6 are found, a fatal error is emitted.
- The macro saved the _QT_VERSION in the cache to replace QT_VERSION,
so the process is not repeated each time that find_qt is used.
- When Qt::Gui is in the Linux component list, Qt::GuiPrivate is added.
So using the versioned one is no longer required.
Uses a separate version entry for the "what's new" version check to
ensure that it properly resets whenever a "what's new" entry is ready to
be displayed.
This is more of a safety precaution to ensure that the "what's new"
thread only executes its result function in the UI thread when emitted,
because the result function can read/write config files.
Adds functions to check and/or request specific macOS permissions
(audio device access, video device access, accessibility access, and
screen capture access).
By default only audio capture, video capture, and accessibility are
requested on launch - the first two have straight-forward "Yes/No"
prompts, the latter requires people to enable OBS in the settings
application (but is required for hotkey functionality, independent
of scene setups).
Instead of lettings the hotkey thread handle bindings triggered by Qt,
call the callback directly.
By this point, Qt has resolved the modifier state (so no need for the
hotkey thread to do the same), the pressed state is set as well,
the branch takes care of matching the pressed keys.
This also fixes the issue with the hotkey changes introduced by #3914,
which only inject key events when OBS is _not_ in focus (and as such
modifier states are never updated).
If the API to query the maximum throughput isn't available, it was
intended to fall back to balanced. This code caused it to vall back to
speed instead because if the API isn't available, max_throughput will be
0. This fixes it to make it only fall back to balanced instead.