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

4465 Commits

Author SHA1 Message Date
derrod
859321b767 obs-ffmpeg: Add missing header to CMakeLists 2023-12-02 17:48:12 -06:00
Stephen Seo
758b47d4ed obs-ffmpeg: Use new side-data FFmpeg 6.1 API
Fixes for using FFmpeg 6.1 due to deprecations. Uses `#if` macros to
allow builds for using older versions of FFmpeg.

This commit replaces usage of `av_stream_add_side_data(...)` with
`av_packet_side_data_add(...)`, as the former was deprecated in favor of
the latter.

The FFmpeg commit that deprecated `av_stream_add_side_data(...)` is [1].

The FFmpeg commit that introduced `av_packet_side_data_add(...)` is [2].

Note that the deprecation commit is after the new API function. The
commit in between [3] appears to be changes that migrates to the usage
of the new API function.

[1]: avformat/avformat: use the side data from AVStream.codecpar
5432d2aaca

[2]: avcodec/packet: add generic side data helpers
74279227dd

[3]: avcodec/codec_par: add side data to AVCodecParameters
21d7cc6fa9
2023-12-02 17:43:18 -06:00
Ryan Foster
87c88ef983 obs-ffmpeg: Initialize stopping member variable to false
If an output has already stopped, but its StopRecording function was
called again, then ffmpeg_mux_stop would be called and set stopping to
true. On the next output start, OBS would output 1 frame, see that
stopping is true, and then stop the output.

This was most easily observed using an Output Timer to record prior to
93f5b45be8.

Initialize stopping to false with the other state flags to ensure that
the output has a clean starting state.
2023-11-25 21:07:56 -06:00
PatTheMav
7ae1c35fcb obs-filters: Remove LTCG linker flag for SpeexDSP builds on Windows
Flag was added in CMake 2.0 update and is incompatible with incremental
linking enabled by default for Debug configuration (MSVC default).

The original error that necessitates adding LTCG is not present with
current obs-deps anymore, so remove it instead and disable the
hard-coded default library directive in Debug configuration.
2023-11-16 23:24:41 +01:00
Kurt Kartaltepe
ea1d022c20 linux-pipewire: Ensure number of dmabufs is zero initialized
We use a size_t that can be 64bit while EGL uses 32bit for the
underlying value. Writes from our graphics function can leave high bits
uninitialized and cause iteration of the format list to overlfow.

fixes #9844
2023-11-12 13:32:24 -03:00
jpark37
35f8481498 obs-filters: Add maxRGB tonemapper for SDR
Preserves saturation better than our Reinhard.
2023-11-11 17:50:34 -06:00
tt2468
54d692ada0 rtmp-services: Update IRLToolkit service
- Adds Dallas and Miami ingests
- Rotterdam PoP was moved to Amsterdam
- Use RTMPS for all servers
2023-11-12 00:36:00 +01:00
jcm
a89719a2d2 mac-capture: Add handling for nil target window 2023-11-11 17:06:25 -06:00
Lain
6b5404899a win-capture: Update graphics hook version
Ensures that the newer hook version is copied when installed
2023-11-09 00:13:25 -06:00
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