Commit graph

13073 commits

Author SHA1 Message Date
deadmeu 17f2b9aadb cmake: Fix missing space between sentences
This whitespace character between two sentences in a cmake error message
was accidentally removed in 349372b3b3
2023-07-15 16:44:30 -07:00
Ryan Foster 9967322834 libobs-d3d11: Left-pad device PCI ID to 4 characters with zeroes 2023-07-15 16:41:45 -07:00
Chensiyy 41e2791f27 libobs: Fix PROPVARIANT variable has not be freed
The PropVariantClear function frees all elements that can be freed in a given PROPVARIANT structure.
2023-07-15 16:38:24 -07:00
Chensiyy 54568cb3bd win-wasapi: Fix PROPVARIANT variable has not be freed 2023-07-15 16:38:24 -07:00
gxalpha 32713eb95e docs: Add obs_properties_add_button2 2023-07-15 16:37:14 -07:00
gxalpha 84f1e962a1 UI: Don't set fragmentation movflags in lossless mode 2023-07-15 16:36:35 -07:00
Richard Stanway 4118fa7ac1 libobs: Don't defer encoder updates if not necessary
When #5169 implemented deferred encoder updates, it did not account for
the case when the encoder hadn't started yet. This means the encoder would
start and then immediately call update with the same settings it was
started with, which in the case of some hardware encoders would trigger
a reconfiguration request to the driver.
2023-07-15 16:31:19 -07:00
Chris (Flaeri) e0293add61 obs-ffmpeg: Fix NVENC VBR maxBitRate set to avgBitrate
MaxBitrate gets correctly set during encoder init, and then promptly
overwritten by nvenc_update, which set max = (avg)bitrate
2023-07-15 16:31:19 -07:00
gxalpha f7d5d80b04 UI: Localize font picker window title 2023-07-15 16:20:04 -07:00
gxalpha 8fa84e874b mac-capture: Remove internal display settings from SCK Audio Capture 2023-07-15 16:19:02 -07:00
gxalpha 55237ab2ef libobs: Export more libobs/util headers 2023-07-15 16:17:42 -07:00
derrod 076b14ec70 CI: Remove syphon-framework exclude from format script 2023-07-15 16:14:55 -07:00
derrod 593664dcdb clang-format: Set AllowShortLambdasOnASingleLine to Inline 2023-07-15 16:14:55 -07:00
derrod dcc07cfe4e clang-format: Set AllowAllConstructorInitializersOnNextLine to false 2023-07-15 16:14:55 -07:00
derrod 1739272c44 clang-format: Set AllowAllArgumentsOnNextLine to false 2023-07-15 16:14:55 -07:00
derrod b1cbdec87b .clang-format: Update and cleanup configuration file
- Set standard to c++17 (Cpp11 is an alias for "Latest")
- Update comments to clang-format 13
- Uncomment options that have previously been commented out due to not
  being available at the time the file was written.
2023-07-15 16:14:55 -07:00
Benjamin Schubert 2fbc0dabda UI: Don't call activateWindow() when hidden 2023-07-15 16:11:27 -07:00
Staacks 22ea121f7c win-dshow: Add support for grayscale MJPEG 2023-07-15 16:09:32 -07:00
Staacks 79d77ddf90 linux-v4l2: Add support for grayscale MJPEG 2023-07-15 16:09:32 -07:00
Clayton Groeneveld e121ac1587 UI, libobs: Add RAII wrappers for faders/volume meters
They can now be automatically deleted.
2023-07-15 16:06:36 -07:00
tytan652 ad243f2355 CI,build-aux: Add Libqrcodegencpp on Linux 2023-07-14 15:32:04 -04:00
tytan652 d76de77abb cmake: Add finder for Libqrcodengencpp 2023-07-14 15:32:04 -04:00
Kurt Kartaltepe 425be04014 UI: Disable QSV for simple mode on Linux
Linux QSV drivers have varying capabilities depending on if the
free/non-free Intel drivers are installed. This means we cannot safely
expose QSV in simple mode as users may be unable stream without changing
to advanced mode.
2023-07-14 12:19:33 -04:00
Kurt Kartaltepe b8ccaf5649 obs-qsv11: Add adapter checks for Linux
This moves the existing adapter checking into the platform layer and
moves the Windows implementation to its platform implementation and adds
a Linux implementation based on directly querying VA-API.

Unlike Windows, this check takes ~1ms so we have no need to spin out
another thread to perform the work. This also fixes up some of the CPP/C
mixing going on in common_utils."h" to allow us to call common functions
from C files.
2023-07-14 12:19:33 -04:00
Kurt Kartaltepe c6b470de9a obs-qsv11: Add a Linux implementation
This adds a CMake module for finding the QSV SDK (libmfx/onevpl) and an
the required platform components to initialize QSV with the VA-API
platform.
2023-07-14 12:19:33 -04:00
Ryan Foster 80864197fb libobs: Fix back-to-back GPU encoder sessions breaking
Reset frame_rate_divisor_counter to 0 on encoder shutdown.

After starting and stopping a GPU encoder session, obs_encoder_shutdown
would set frame_rate_divisor_counter to 1. When the next GPU encoder
session was started, in libobs/obs-video-gpu-encode.c, gpu_encode_thread
would set skip to this value (1), and increment
frame_rate_divisor_counter to 2. This causes the next check to fail, as
frame_rate_divisor is 1 by default (2 == 1 is false), so
frame_rate_divisor_counter retains its value. Since skip is non-zero,
the next check, if(skip), passes, and skip to the next loop iteration.

This will continue forever, because frame_rate_divisor_counter will
continue to increment, so it will never hold the same value as
frame_rate_divisor. This means that send_off_encoder_packet is never
called, so the muxer never receives encoded packets.

To the end-user, this manifests as their second encoder session being
impossible to stop. They then have to force quit OBS and the
obs-ffmpeg-mux process. This change prevents that from occurring and
allows multiple back-to-back GPU encoder sessions to be completed.
2023-07-14 11:56:28 -04:00
derrod 578dc46a79 obs-ffmpeg: Remove legacy FFmpeg compatibility 2023-07-12 15:57:43 -04:00
derrod 46aea3fc70 win-dshow: Remove legacy FFmpeg compatibility 2023-07-12 15:57:43 -04:00
derrod c939525f77 libobs: Remove legacy FFmpeg compatibility 2023-07-12 15:57:43 -04:00
derrod 7731f98d87 deps/media-playback: Remove legacy FFmpeg compatibility 2023-07-12 15:57:43 -04:00
derrod aeaf720247 deps/libff: Remove legacy FFmpeg compatibility 2023-07-12 15:57:43 -04:00
Norihiro Kamae 021826175b obs-ffmpeg: Remove outdated comment 2023-07-12 13:54:50 -04:00
Norihiro Kamae bc6cfab615 libobs/util: Remove outdated comment 2023-07-12 13:54:50 -04:00
gxalpha a4834efde9 UI: Remove Qt 5 ifdef guards and code 2023-07-12 13:22:13 -04:00
PatTheMav a44d1b2dce obs-qsv11: Fix missing ENABLE_HEVC definition for test executable 2023-07-12 12:56:51 -04:00
Ryan Foster a167d7f916 obs-filters: Fix legacy CMake obs_status for RNNoise
Setting ENABLE_RNNOISE to OFF would result in SpeexDSP being logged as
disabled. Correct the CMake logging.
2023-07-12 12:10:20 -04:00
Ryan Foster b2405e465a obs-webrtc: Fix CMake 3.0 module disabled path
The CMake 3.0 path used the old syntax for logging if the module was
disabled. Update this to use target_disable to match the syntax in other
CMake 3.0 paths.
2023-07-12 11:42:17 -04:00
Ryan Foster 7cf7fd0117 obs-webrtc: Fix legacy CMake obs_status call
An additional stray comma resulted in an incorrectly formatted status
message in the CMake log.
2023-07-12 11:42:17 -04:00
Norihiro Kamae 39d4b53f6b UI: Fix preprocessor directives for platform integrations
The macros `YOUTUBE_ENABLED`, `RESTREAM_ENABLED`, and `TWITCH_ENABLED`
are not defined when the associated features are not enabled.
When the code was originally implemented, there were definitions to set
`0` if the feature is disabled. However a later commit 349372b removes
the definition. Now, the use of `#ifdef` is better than just `#if`.
2023-07-12 11:09:36 -04:00
Penwywern 8789c43959 libobs: Fix flip not working with stretch to bounds 2023-07-08 16:42:15 -07:00
derrod ad5f04e53d UI: Soft-delete scene collections
Instead of actually removing the file, simply rename it to the .bak
version which OBS ignores in most cases. That allows users to recover
accidentally deleted collections more easily, while only taking up a
few kilobytes of disk space at most.
2023-07-08 16:39:03 -07:00
Service Checker 7166115cde rtmp-services: Remove defunct servers/services 2023-07-09 01:21:10 +02:00
David Rosca 5fdda179ed obs-ffmpeg: Increase initial buffer fullness for VAAPI
Default ffmpeg initial buffer fullness (75%) is too low
and results in significantly lower video quality on AMD cards.

Changing it to 100% fixes the quality and also matches what
AMF encoder is doing.
2023-07-08 16:19:43 -07:00
derrod 046719f65a win-capture: Enable compatibility data updates by default 2023-07-09 09:14:31 +10:00
CodeYan01 34a9ea09e8 docs: Fix macro definitions 2023-07-08 16:09:09 -07:00
Yoshimasa Niwa 9ab5271d69 UI: Fix crash radio list without items
Check items count before accessing first item,
or it will crash due to out-of-bound access.
2023-07-08 16:08:21 -07:00
Norihiro Kamae 65e35bec7d UI: Fix scenes only multiview label position 2023-07-07 16:38:52 -07:00
derrod 46525f5175 updater: Fix updating without patch files 2023-07-07 12:50:02 -04:00
Lain cececf4e55 UI: Wait for full vcam deactivation to destroy its view
A bug which was technically introduced in df446c3f6e: the author
assigned video mixes to the virtual camera and did not realize you have
to wait for full capture stop with the "deactivate" signal rather than
the "stop" signal. This situation is understandable because these
signals are likely confusing and need more documentation.

The way an output works when it stops is it has three stages:
- "stopping", which is the moment the user themselves stop the output
- "stop", when the output's implementation has stopped and returns
  success or an error code
- "deactivate", when the output inself (not the implementation) has
  fully stopped capturing encoded or raw frame data after the
  implementation has stopped. This is done in a separate thread,
  end_data_capture_thread(), for performance and data race reasons, and
  is when it's "actually fully stopped for real this time"

(Lain note: I sincerely apologize for this confusing signal design)

The author of df446c3f6e was likely confused as to why they could not
destroy the video mix in the "stop" signal without triggering a race
condition in end_data_capture_thread(), and instead decided to make a
workaround to clear the video mix set to the output before destroying
the video mix. Unsetting the video mix I'm guessing *seemed* to fix the
problem for them at the time, and destroying the video mix separately
after that automatically stops capture, so it *technically* worked
because the deactivate thread cannot be called until the
implementation's stop signal has executed. However, it was still the
incorrect way to handle the problem, because it circumvents the output's
mechanism for deactivating the frame data capture by destroying the view
instead.

The reason this was the incorrect way to handle the problem became
exposed in 7cd7ca80f8, when tytan made it so it uses the main video mix
under certain circumstances. The main view is special and cannot be
destroyed, so the mechanism to stop frame data capture that the
virtualcam was using before failed, and raw frame data capture continued
perpetually until the end of the program erroneously.

This fix solves the bug by using the "deactivate" signal rather than the
"stop" signal, thus allowing the output to fully end its data capture
and *then* destroy the video mix.

Fixes obsproject/obs-studio#9153
2023-07-06 15:37:28 -07:00
PatTheMav 9712b33417 CI: Update macOS and Windows build scripts for OAuth configs via preset
Also sets GPU_PRIORITY_VAL via preset on Windows.
2023-07-06 20:20:05 +02:00