0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00
Commit Graph

4456 Commits

Author SHA1 Message Date
Seth Williams
aa1f2dea84 win-capture: Fix Vulkan race condition
This race condition is caused when one thread creates a swap chain,
which calls OBS_CreateSwapchainKHR, at the same time another thread
calls OBS_CreateImageView.

OBS_CreateSwapchainKHR allocates swap data, publishes this into the
data->swaps linked list, then initializes it. Meanwhile,
OBS_CreateImageView is iterating the swaps linked list, to see if the
image matches any swap chain images. Due to the order in
OBS_CreateSwapchainKHR, there's no guarantee this data is initialized
so it often ends up running out of bounds on the swap_images array.

The fix is simply to defer the swap data publish to after init.
2023-11-07 23:48:34 -06:00
Kevin Wang
1a86ff5511 obs-browser: Add support for more events 2023-11-07 01:49:51 -06:00
tt2468
1d5d4b29e7 win-wasapi: Handle changes to the default monitoring device
Splits the WASAPINotify class out of win-wasapi.cpp and makes it a
shared object in the plugin, then also creates a callback to reset
audio monitoring if the default output device changes.
2023-11-07 01:32:12 -06:00
gxalpha
6ed2e13974 mac-videotoolbox: Remove CRF 0 second keyint override
The previous commit sets the default configuration to 2 seconds, meaning
that the 0 second default interval no longer happens per default. If
someone explicitly sets the interval to 0 seconds ("auto"), we should
allow them to do that.
2023-11-04 18:47:52 -05:00
gxalpha
5cd30d6a86 mac-videotoolbox: Set default keyframe interval to 2 seconds
0 seconds means "auto" according to the documentation, but this appears
to be broken in many configurations (more than just CRF mode on Apple
Silicon). With some encoders it means that the encoder sets a keyframes
every 31st frame, other times it just doesn't set any keyframes at all
after the first one, only rarely does the "auto" interval actually
appear to work.
Lets just set the default to 2 seconds and be happy. In theory this is
the maximum keyframe interval and encoders are allowed to set more if
they so wish, but they never appear to do so.
2023-11-04 18:47:52 -05:00
tytan652
122a5db0b3 obs-ffmpeg: Remove unused variable in VA-API utils 2023-11-04 18:17:43 -05:00
jpark37
e79e28598b libobs,obs-filters: Use common straight alpha math
This pattern uses fewer instructions and also avoids using max, which
does not work on infinity.

Also remove unreferenced techniques from scale filters.
2023-11-04 18:12:22 -05:00
TDV Alinsa
e6b3ae738f obs-webrtc: Allow non-CBR rate control with WHIP
Nothing about WHIP requires CBR (and many things that use it use VBR),
and there's no specific upstream service to care about it (WHIP is a
protocol, not a service, despite being exposed as a "service" in OBS),
so let's stop forcing it to be CBR and allow the user to choose other
rate control methods.
2023-10-28 18:15:03 -05:00
David Rosca
83e7cfb9c3 obs-ffmpeg: Add B-frames option for VA-API
The option is already there, but it wasn't available from UI.
Only show it when B-frames are supported.
2023-10-28 18:08:29 -05:00
Kurt Kartaltepe
658657de35 linux-pipwire: Pass obs_pw_stream to renegotiation callback
We were passing the core pipewire pointer where renegotiation expected
the stream pointer. Somehow this worked, probably because the two are
very close.

fixes #9733
2023-10-28 18:26:29 -03:00
Ryan Foster
ed2ade250f Revert "win-wasapi: Remove 'BETA' from Application Audio Capture name"
This reverts commit 36ea03dfa6.
2023-10-28 16:41:47 -04:00
Ryan Foster
20ffdda89a obs-qsv11: Migrate target usage settings
Calling update_targetusage in update_params only updates the setting
when an encoder session is initialized. Calling update_targetusage in
rate_control_modified, like update_latency and update_enhancements, will
update the setting when the Settings window is loaded. This will cause
the updated setting to be reflected in the UI.
2023-10-28 15:45:53 -04:00
gxalpha
ba4467199c plugins: Remove old macOS version ifdefs
8dd20dfd33 introduced an explicit check
for the available macOS SDK, meaning that we can be sure that the macOS
13.1 SDK is available. As such, we do not require ifdef guards for the
availability of functions that are older than 13.1.
2023-10-27 16:00:42 -04:00
prgmitchell
d017cb6718 win-wasapi: Log source name on initialization
Log the source name when a WASAPI device is initialized.
2023-10-27 14:37:46 -04:00
jcm
311fb69175 mac-virtualcam: Correct device timer firing rate 2023-10-27 10:08:19 -04:00
Service Checker
48e239b74d rtmp-services: Remove defunct servers/services 2023-10-26 17:48:23 -07:00
Kurt Kartaltepe
5cf0f06669 linux-pipewire: Load glad symbols on start
After the cmake 3.0 rebuild glad was transitioned to a static library.
This lead to the glad symbols being uninitialized and crashes when they
are used in some cases.
2023-10-24 09:34:38 -03:00
Kurt Kartaltepe
454fc559a2 linux-pipewire: Use the format properties for swap r/b
We refactored this data to be part of the format properties instead of
an out parameter. But forgot to start using this field instead.
2023-10-22 11:16:03 -03:00
Kurt Kartaltepe
f0697980c3 linux-pipewire: Add locks to unsafe pipewire functions
These functions log that they should be used with the thread lock held,
so lets hold the lock before calling them.
2023-10-22 11:15:04 -03:00
Ryan Foster
b29a44a67d obs-qsv11: Log more QSV settings
QSV logging was missing many of its settings. Let's fix that.
2023-10-17 22:36:22 -04:00
gxalpha
856059b37c mac-avcapture: Replace kCMIOObjectPropertyElementMaster with Main 2023-10-17 16:45:36 -04:00
gxalpha
3d2df1c6d7 mac-capture: Replace kAudioObjectPropertyElementMaster with Main 2023-10-17 16:45:36 -04:00
Ryan Foster
8fbd61f775 obs-websocket: Update version to 5.3.3 2023-10-16 13:02:06 -04:00
Sludge
1cd8b6aaba input-v4l2: always use linear alpha blending 2023-10-14 20:22:22 -03:00
gxalpha
c41633d998 mac-virtualcam: Log when extension replacement is requested 2023-10-11 13:07:04 -04:00
Service Checker
c96111ab04 rtmp-services: Remove defunct servers/services 2023-10-11 03:54:52 +02:00
Translation Updater
0d450a34a0 Update translations from Crowdin 2023-10-10 13:34:41 +00:00
gxalpha
e85b257562 mac-virtualcam: Check result of finished extension installation
Adds a switch to distinguish between the possible results that could
occur. While we expect to received RequestCompleted for our camera
extension (RequestWillCompleteAfterReboot is usually more of a network
extension thing), we can't be sure that this always is what we receive
unless we check it.
2023-10-09 18:28:02 -06:00
gxalpha
1781289f22 mac-virtualcam: Treat extension installation cancellation as error
OSSystemExtensionErrorRequestCanceled is called when the activation
delegate returns OSSystemExtensionReplacementActionCancel on request
actionForReplacingExtension withExtension. As per the previous (parent)
commit we no longer request cancellation, so we can be sure that
receiving a "cancelled" error is an actual error and not something that
is supposed to happen.
This commit also removes the "error" from the log prefix, as the message
sent may also be a warning instead, and the LOG_LEVEL conveys the
severity of the log line anyways.
2023-10-09 17:24:38 -06:00
gxalpha
61a4922364 mac-virtualcam: Always replace camera extension when requested
Current code assumes that a newer version of the extension is always
better. However that's not true - when the user installs an old version
of OBS, we should also install the old version of the camera extension
to have a version compatible with the installed OBS.
For normal users this method is only called when the versions in the
Info.plist do not match. In system extensions developer mode it's called
every time an installation is requested (meaning on every start), which
is probably desired as well; and by never returning
"ReplacementActionCancel" we can now always treat "ErrorRequestCanceled"
as an error and not something that we requested to happen.
2023-10-09 17:24:38 -06:00
田七不甜
c56017beb0 win-capture: Add 9 window class auto switch to WGC mode
Add "GAMINGSERVICESUI_HOSTING_WINDOW_CLASS", "screenClass",
"PodiumParent", "OMain", "Framework::CFrame", "rctrl_renwnd32",
"MSWinPub", "OfficeApp-Frame" and "SDL_app".
2023-10-09 14:50:05 -04:00
田七不甜
3a1a0ebeba win-capture: Add and tweak apps in compatibility.json
Add:
Counter-Strike 2, UWP applications, Gaming Services applications,
Microsoft 365(Excel, PowerPoint, Word, Access, OneNote, Outlook,
Publisher and 365 software), Adobe After Effects,
Adobe Character Animator, Adobe Photoshop, Adobe Premiere Pro, Steam,
Epic Games Launcher, Ubisoft Connect, Tencent GUI applications, WeChat
and YY.

Tweak:
Change "Electron" name to "Chromium";
Change "%name% cannot be captured via Game Capture." to
"%name% cannot be captured using Game Capture.".

Remove:
Chrome and Edge (reason is based on Chromium).
2023-10-09 14:50:05 -04:00
derrod
36ea03dfa6 win-wasapi: Remove 'BETA' from Application Audio Capture name 2023-10-08 10:49:43 -06:00
derrod
c2ec1fb49e win-wasapi: Handle flags set by GetBuffer 2023-10-08 02:00:58 +02:00
derrod
82f51f24ea win-wasapi: Use provided timestamp for application audio capture 2023-10-08 02:00:58 +02:00
Kurt Kartaltepe
728cd56583 linux-v4l2: Expand packed values to 4 bytes
These days you might capture card a 175Hz monitor with a framerate
defined as 10000000/57143 that doesnt fit in a short. And reporting a
negative FPS in that case isnt very helpful.
2023-10-08 02:00:28 +02:00
artemmdev
5f8eff7ec1 rtmp-services: Update OnlyFans streaming service 2023-10-08 02:00:01 +02:00
derrod
5dde70ccff obs-ffmpeg: Readd OBS_ENCODER_CAP_DYN_BITRATE to AMF texture encoders 2023-10-05 16:55:21 -04:00
jpark37
e11e2133e2 libobs,obs-filters: Fix NAN when tonemapping
Can happen when colors are wider than Rec. 2020.
2023-10-04 19:33:54 -04:00
Ryan Foster
0866688953 obs-qsv11: Use translatable strings for target usage
For Target Usage, instead of doing string comparisons against long
descriptive strings, use translatable strings for descriptive UI text
and simple designations for values used for comparisons and storage.
This is similar to what we do for NVENC Presets.
2023-10-04 16:22:24 -04:00
Ryan Foster
9b1d6032e3 obs-qsv11: Remove D3D9 fallback
On Windows 10 and up, D3D11 should never fail, so the D3D9 code should
no longer be possible to hit. As far as I can tell, this code was mostly
for Windows 7/8/8.1 and it was part of the initial implementation. It
should no longer be needed.
2023-10-04 15:24:56 -04:00
Ryan Foster
53dee8f990 obs-qsv11: Remove D3D9 allocator
On Windows 10 and up, D3D11 should never fail, so the D3D9 code should
no longer be possible to hit and should no longer be needed.

Revert "obs-qsv11: Use d3d9 allocator on Win7"

This reverts commit b276b1633e.
2023-10-04 15:24:56 -04:00
Kurt Kartaltepe
9d4b916248 obs-qsv11: Redo session data releasing for Linux
This reverts the changes to Windows where Release() was called every
time, since we need share a single DX context across multiple encoders.

Instead introduce a ReleaseSessionData() function and some platform
specific session data that will be passed to it. We use this to track
the VA-API display and fd to release them at the right time. Leaking
displays will also lead to cache pollution in the intel-media-driver
crashing users so we cannot do that.

fixes #9611
2023-09-29 11:56:53 -04:00
gxalpha
23bfb625ce mac-capture: Don't crash when migrating unknown display IDs
The current code assumes that a display UUID can be created with the
stored ID, but that's not always the case, e.g. when the user doesn't
have the display connected. As such, we need to null check this, and
fall back to the invalid ID (0) when the ID cannot be migrated.

The current code also only migrates on source creation, which yields
weird behaviour where if the user opens properties and then cancels it
would still show the first display, but only for the session. This is
why the code was factored out of the creation function and now is always
used when an ID needs to be acquired from OBS Data settings, including
when the source is updated.
2023-09-28 14:25:55 -04:00
Matt Gajownik
857c42aaba obs-browser: Fix invalid comparison of integer types 2023-09-28 23:00:48 +10:00
Matt Gajownik
22cef2b8c4 obs-browser: Update version to 2.22.1
fc57db4 - More consistently return JSON types in browser client
8407dcc - Use CefParseJSON instead of V8 context for JS responses
2023-09-28 21:04:29 +10:00
PatTheMav
b3949e6aef cmake: Update qrcodegen finder to match target names of CMake package
qrcodegen is built on obs-deps for macOS and Windows, with the
generated CMake package calling the dependency qrcodegen (not
libqrcoden) and associated target qrcodegen::qrcodegen.

This change updates the finder (required for Linux) to create the same
targets so consumers do not need to differentiate between different
variations of the same dependency on Linux.

Also updates obs-websocket to 5.3.1 to bring in associated CMake
changes.
2023-09-27 18:05:02 -04:00
Sean DuBois
2308414bcc obs-webrtc: Move libdatachannel code to C++ from C
libdatachannel is now built with MSVC instead of MinGW so we are able to
use C++ API instead.

The C++ is preferred by upstream and what the project is written in. The
C API provides a subset of features and has a performance penalty.
2023-09-19 15:03:11 -04:00
Neal Gompa
63f3b0d46c obs-qsv11: Add license declaration file 2023-09-19 13:35:49 -04:00
Neal Gompa
dc50e11bc6 decklink: Add license declaration files 2023-09-19 13:35:49 -04:00