Commit graph

4682 commits

Author SHA1 Message Date
Georges Basile Stavracas Neto a1db8e5bde linux-pipewire: Factor out connection props in a struct
So that we can expand the number of construct-time connection
properties without changing the function signature every time.
This is mostly an ergonomic change for now, but it'll be very
useful when introducing the Camera portal code.
2023-12-14 10:20:55 -03:00
Georges Basile Stavracas Neto afab71aa80 linux-pipewire: Standardize argument names
Always name obs_pipewire_stream pointers 'obs_pw_stream', so as not
to confuse with obs_pipewire pointers which are called 'obs_pw'.
2023-12-14 10:20:55 -03:00
derrod ebd6eec7f6 win-wasapi: Make reroute target a weak reference 2023-12-13 22:10:53 +01:00
Norihiro Kamae 70aa1e903f win-wasapi: Initialize a pointer reroute_target
The pointer `reroute_target` was never initialized if the reroute was
not set but read during processing audio.
2023-12-13 16:15:09 +01:00
derrod 4b28631a95 win-capture: Add audio capture option to window/game capture 2023-12-12 00:05:47 +01:00
derrod 48f9969df3 win-wasapi: Add procedure to reroute audio output 2023-12-12 00:05:47 +01:00
jpark37 263e027938 graphics-hook: Remove unused member variables 2023-12-10 04:45:33 -06:00
jpark37 395ab0fbf5 graphics-hook: Use ID3DDestructionNotifier
Cleaner and more correct than hooking IUnknown::Release.
2023-12-10 04:45:33 -06:00
Richard Stanway 87c536ebe0 image-source: Use mutex when accessing slideshow
While adding or updating files locked this mutex, the graphics thread
did not. As the update operation is not atomic, the graphics thread
might access the darray in the middle of an update, resulting in access
to freed memory (crash) if the files were updated at the same time.
2023-12-10 01:39:58 +01:00
PatTheMav be7ac828de mac-capture: Fix ScreenCaptureKit deadlock when using nil display ID
In some scenarios ScreenCaptureKit will not call our completion handler
when an internal ReplayKit error occurred. This seems to be more common
when a <nil> display id is provided as the content filter for
ScreenCaptureKit.

The issue was reported to Apple as FB13455947, but it is good practice
for us to check for an invalid display ID before even attempting to start
a capture stream.
2023-12-09 17:34:33 -06:00
xlinshan 542cb876dc obs-vst: Fix incorrect VST window size on HiDPI display
On Windows, the VST plugins' window sizes are rendered larger than the
actual content on displays that have UI scale factor. The sizes are
larger by the scale factor, for example, 100x100 content will have a
200x200 window on a 200% scaled screen, and 150x150 on a 150% scaled
screen. This change adjust the window size to fit the content size.
2023-12-09 11:30:39 +11:00
PatTheMav e27b013d47 aja: Disable deprecated declarations warnings on macOS and Linux
Deprecation warnings have been investigated and have been deemed
non-malicious for the time being.
2023-12-06 17:27:12 +01:00
Translation Updater f674d17168 Update translations from Crowdin 2023-12-05 22:04:31 +00:00
Ryan Foster 689daf57dc obs-websocket: Update version to 5.3.4
Fix a crash on shutdown.
2023-12-05 14:20:29 -05:00
Ryan Foster eca9cd2bc4 obs-browser: Update version to 2.23.1
36508a9 - Don't allow browser docks to arbitrarily close OBS
f877e55 - Fix handling OBS_FRONTEND_EVENT_TRANSITION_CHANGED
2d374a3 - Fix handling frontend JS events
2023-12-05 14:18:42 -05:00
prgmitchell 0f498133a4 win-wasapi: Ignore timestamp errors
Only log packets with timestamp errors rather than resetting the device.
2023-12-04 02:25:43 -06:00
PatTheMav 63a131ce22 mac-videotoolbox: Fix handling of unsuccessful encoder creation
When an encoder was not created in create_encoder, the appropriate
OSStatus value is returned but the calling code expects a boolean
return value.

The negative OSStatus code sent on error is thus interpreted as a
truthy value and the error is not detected. Changing the call signature
to correctly return an OSStatus (and change the caller to detect
error situations) fixes this.
2023-12-02 17:49:24 -06:00
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
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
Ryan Foster 03b70f0672 obs-qsv11: Fix unusual CBR bitrate issues
For some reason, using MFX_SCENARIO_GAME_STREAMING causes the keyframe
quants to be higher than other frames, which is not desirable. In turn,
this causes bitrate to be higher than the target bitrate for a sustained
period of time after each keyframe.

Not setting the scenario removes this behavior and returns CBR to
somewhat reasonable levels of consistency.

Co-authored by: Chris (Flaeri) <flaeri@otterbro.com>
2023-09-18 13:04:04 -04:00
gxalpha e46c68726e obs-qsv11: Fix target usage migration string comparisons
Fixes problems with the astrcmpi logic, as well as a typo that said
"vertfast" instead "veryfast".
Also makes the method a void because it always returns true and isn't
checked anyways.
2023-09-16 14:33:09 -07:00
Lain 107416193c win-wasapi: Fix arithmetic for WAVEFORMATEX::cbSize
This arithmetic used the incorrect size for WAVEFORMATEX::cbSize, which
is supposed to be sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX).
2023-09-15 10:14:10 -07:00
Laurin Müller 3ac08303b5 rtmp-services: Rebranding Utreon to Playeur 2023-09-07 15:58:43 -07:00
derrod 0b75b433cd image-source: Fix slideshow audio rendering buffer overrun 2023-09-06 21:46:47 -07:00
Norihiro Kamae e5fe27a167 win-dshow: Log source name at error
When a user has multiple win-dshow inputs, it's hard to identify the
input outputting errors in a log file.
2023-09-06 11:46:19 -04:00
Service Checker 5ad60809a8 rtmp-services: Remove defunct servers/services 2023-09-06 06:57:54 +02:00
gxalpha 49ab01c898 obs-websocket: Update version to 5.3.0 2023-09-05 17:03:29 -04:00
Kurt Kartaltepe 543be8cf29 obs-qsv11: Ensure default devices are Intel devices 2023-09-05 15:34:37 -04:00
PatTheMav f8f2c6d989 mac-virtualcam: Switch pixel format of camera extension to BGRA
BGRA was used by default in Apple's example code and is also already
supported by OBS.
2023-09-05 10:41:41 -04:00
PatTheMav d0a8bbcc34 obs-outputs: Silence all warnings generated by the FTL SDK
The FTL SDK is vendored, outdated, and abandoned, so all these issues
will not be fixed anyway.
2023-08-31 17:52:08 -04:00
PatTheMav 4e488e2f1a text-freetype2: Fix warning about implicit integer downcast
Use Freetype2-specific types which match the types used internally and
returned by Freetype2 functions anyway.
2023-08-31 17:52:08 -04:00
PatTheMav 13a23f6471 plugins: Suppress warnings about implicit integer downcasts
Returned values are usually 64-bit in length but commonly stored in
16-bit integers anyway.
2023-08-31 17:52:08 -04:00
gxalpha 321829d932 mac-avcapture: Log if portrait or studio light effects are active
These effects can remain enabled between devices (so enabling it on one
device can mean it's later also enabled on another device), leading to
cases of capture cards getting blurred.
Logging that the effects are enabled should make it easier to spot this
in support.
2023-08-30 15:24:31 -04:00
pkv 78a33c7771 obs-ffmpeg: Fix broken mpegts output
This recent commit [1] broke SRT & RIST streaming because
obs_output_video now returns a NULL pointer for encoded outputs.
This fixes it by retrieving the pointer from the encoder.

[1] fb57eff212

Co-authored-by: tt2468 <tt2468@gmail.com>
Signed-off-by: pkv <pkv@obsproject.com>
2023-08-29 14:44:54 -04:00
PatTheMav 121fb8b2fd obs-outputs: Fix provision of CA certificates to mbedTLS on macOS 2023-08-28 10:39:21 -04:00
Norihiro Kamae e6d007b378 obs-ffmpeg: Do not include sys/timeb.h on non-Windows system
The struct timeb is used on Windows only.
2023-08-26 16:52:52 -07:00
Norihiro Kamae 2aa0e03bf0 obs-ffmpeg: Remove an unused static function 2023-08-26 16:52:35 -07:00
Norihiro Kamae 57170ba378 obs-outputs: Remove unused static functions 2023-08-26 16:52:35 -07:00
Norihiro Kamae 220bf8aeaa rtmp-services: Remove an unused static function 2023-08-26 16:52:35 -07:00
Norihiro Kamae f7b37b0832 mac-avcapture: Remove an unused static function 2023-08-26 16:52:35 -07:00
Norihiro Kamae d35583dcc8 linux-capture: Remove an unused static function 2023-08-26 16:52:35 -07:00
Richard Stanway d3ab68c5ca plugins: Quote program paths used in os_process_pipe_create
These end up being passed to CreateProcessW, so paths with spaces in the
name may be open to misinterpretation by the OS.
2023-08-26 16:44:53 -07:00
Kurt Kartaltepe 8e7b697447 obs-qsv11: Fixup session releasing for Linux 2023-08-26 16:40:46 -07:00
Kurt Kartaltepe 368082d6c0 obs-qsv11: Use device enumeration for choosing DRM device
Trying to use the display server as the QSV device was found to be
generally wrong in beta, so instead lets save defaults from the earlier
device enumeration similar to obs-ffmpeg-vaapi which is known to work
well.
2023-08-26 16:40:46 -07:00
Kurt Kartaltepe fc6a15e13a obs-qsv11: Mark internal functions static 2023-08-26 16:40:46 -07:00
Zhao Zhili 075f3c4020 obs-x264: refactor log callback
1. Remove limitation of message length.
2. Improve performance by remove the local copy.
3. Map x264 log level to obs.
2023-08-24 13:54:48 -07:00
Zhao Zhili 5c0a018628 obs-x264: Remove unused getparam() function 2023-08-24 13:54:48 -07:00
pkv 737b21230d obs-filters: Add a mutex when running NVIDIA Audio FX
This fixes a bug when swapping NVIDIA effects.
The update signal triggers a destruction of the previous effect, but the
effect would still run, potentially causing a crash.
The mutex added in the NVIDIA processing function prevents that.

Signed-off-by: pkv <pkv@obsproject.com>
2023-08-19 16:44:11 -07:00
Richard Stanway 609b1ab011 obs-qsv11: Fix crash in QSV test process
The code assumed MFXCreateSession would always succeed, but it fails on
systems with no QSV implementations, causing a crash when we call
MFXClose later. Additional success checks for the other API calls were
also added.
2023-08-18 17:55:00 -07:00
Service Checker 6640d973b3 rtmp-services: Remove defunct servers/services 2023-08-18 12:33:34 +02:00
Kurt Kartaltepe 32c07929b0 obs-qsv11: Drop Windows guards on LowPower settings
Setting AdaptiveCQM to ON when LowPower is OFF crashes the
intel-oneapi-gpu implementation on Linux when using the AV1 encoder.
But using the same LowPower settings as Windows works so lets drop the
current guards.
2023-08-17 10:27:16 -04:00
pkv 79232c3cec obs-filters: Update NVIDIA Effects SDK versions
We need to check for new versions of the NVIDIA Effects redistributables
because mismatched versions of the AUDIO and VIDEO sdk can have
different CUDA versions of the deps, which has caused crashes in obs.
It'd be way better that NVIDIA either ships a single installer with both
audio and video effects or that they auto-install with the drivers.
But meanwhile, we provide a warning to users which requires us to keep
in sync with what's released.

Signed-off-by: pkv <pkv@obsproject.com>
2023-08-17 03:37:30 -07:00
Kurt Kartaltepe b6b8f5b80a obs-qsv11: Fix VPL initialization on intel-mediaSDK
VPL does not have a consistent initialization process for the various
backends it dispatches to. So this resolves the new VPL dispatcher
failing to initialize the video session when it dispatches to
intel-mediaSDK backend. On the oneVPL-intel-gpu backend VA-API sessions
are correctly initialized so this wasnt noticed when tested on newer
hardware.
2023-08-16 15:40:02 -04:00
Kurt Kartaltepe 4d3f9323b5 obs-qsv11: Fix InitParams low power fallback 2023-08-16 15:40:02 -04:00
jpark37 4fd595efe9 decklink: Reset video capture on format change
Fixes black screen when toggling between 4K SDR and HDR on PS5.
2023-08-15 13:15:45 -07:00
jpark37 bb12fe9db5 decklink: Add HDR playback support 2023-08-15 13:15:45 -07:00
Penwywern 95e36878af image-source: Fix slideshow proc decl strings
Changes the decl strings of the slideshow source procedures to match
pre-existing conventions.
2023-08-14 13:17:46 -04:00
Translation Updater ecf914dd67 Update translations from Crowdin 2023-08-13 14:09:15 +00:00
tytan652 43ae532d2a sndio: Remove variable-length array usage 2023-08-12 16:18:32 -07:00
Jack Karamanian 21f2a7718e obs-ffmpeg: Set avg_frame_rate for AVStream outputs
This sets the framerate on container files when
recording using "Custom Output (FFmpeg)".
2023-08-11 18:15:46 -04:00
tytan652 7f4fd99f91 linux-pipewire: Replace dynamic arrays with allocations
Replace dynamic arrays added by 27630a8c0e
by allocations
2023-08-11 14:56:36 -03:00
PatTheMav 914392fcc0 mac-virtualcam: Fix crash on macOS when starting virtualcam output 2023-08-10 17:53:59 -04:00
PatTheMav 7628265099 Update .clang-format rules for ObjC files for version 16 2023-08-10 17:12:30 -04:00
Ryan Foster 64139a6bbd CI: Update to clang-format 16
This commit also modifies UI, libobs, and plugins.
2023-08-10 16:07:25 -04:00
aggresss c81f531edb obs-webrtc: Improve WHIP compliance
Location header is now required. Support relative and absolute URLs
2023-08-10 12:04:18 -05:00
aggresss 34e57a0496 obs-webrtc: Follow HTTP redirects 2023-08-10 12:04:18 -05:00
Ryan Foster 046560eadc obs-qsv11: Fix adapter enumeration in test app
MFXEnumImplementations expects the adapter index to be within a range of
valid Intel adapters produced by MFXLoad and the config filter. If a
system has one non-Intel high performance GPU and one Intel iGPU, OBS
and the test app will see the Intel iGPU as index 1 due to high
performance hints, but MFXEnumImplementations will expect only one valid
index, 0. In this scenario, passing a value of 1 to
MFXEnumImplementations will cause it to abort and return
MFX_ERR_NOT_FOUND (Provided index is out of possible range). This causes
subsequent capabilities testing to fail.

To avoid this, let's track how many non-Intel adapters we see and
subtract that number from adapterIdx to only pass valid index to
MFXEnumImplementations.
2023-08-10 11:47:15 -04:00
Ryan Foster 8b85ecbec1 Revert "obs-outputs: Enable HDR for HEVC over RTMP"
This reverts commit 8137eb5f56.
2023-08-09 21:47:30 -04:00
Amin Mahmoudi e77fc96cfa
rtmp-services: Add MasterStream.iR to ingest list (#9330) 2023-08-09 20:26:13 -05:00
Gale 550ccc63f2 obs-qsv11: Fix RepeatPPS bug 2023-08-09 18:12:47 -04:00
Gale 5bfc2e5150 obs-qsv11: Remove AVBR, QVBR, and VCM 2023-08-09 18:12:47 -04:00
Gale a790302dbd obs-qsv11: Refactor and tune Look-ahead settings
Enable Low Power Look-ahead (VDENC LA) after Intel Arc Graphics. Change
LA_DEPTH defaults (60 frames for normal latency and 30 frames for low
latency). Keep VME Look-ahead only for certain Intel platforms (ICL,
TGL, ADL, and RPL). Disable VME LA for HEVC
2023-08-09 18:12:47 -04:00
Gale 1d95575088 obs-qsv11: Update Target Usage options
Update target usage setting names from legacy names to VPL names.
2023-08-09 18:12:47 -04:00
Gale c9fd128d74 obs-qsv11: Fix bitstream bug
Fix InitBufferSize and BufferSize bug: change Bit to Byte.
2023-08-09 18:12:47 -04:00
Gale 6533b3e138 obs-qsv11: Adjust Gop and keyint_sec parameters
* Change GopPicSize default to 240
 * Remove GopOptFlag
 * Change keyint_sec default from 3 to 0
 * Reduce keyint_sec minimum value from 1 to 0 (for auto)
2023-08-09 18:12:47 -04:00
Gale 6dada921c9 obs-qsv11: Adjust Subjective Video Enhancements
Disable MBBRC (macro block level bitrate control) because it can reduce
objective quality metrics like VMAF.

Use AdaptiveCQM for CBR and VBR.
2023-08-09 18:12:47 -04:00
Gale 99c456b777 obs-qsv11: Add AV1 meta data
Enable content light meta data over the AV1 stream.
2023-08-09 18:12:47 -04:00
Gale 5b6967c359 obs-qsv11: Improve AV1 quality parameters
Enable B-frames for AV1 for Intel Arc Graphics and Meteor Lake Platform.
2023-08-09 18:12:47 -04:00
gxalpha 57cda30bd3 obs-browser: Disable Bluetooth support 2023-08-08 21:36:10 -04:00
Gale 61a3e4365b obs-qsv11: Remove MSDK headers 2023-08-07 13:23:26 -04:00
Gale dbbbcd8c57 obs-qsv11: Add VPL changes 2023-08-07 13:23:26 -04:00
Lain 796e2d5815
Merge pull request #9339 from tytan652/prevent_simde_contamination
Contain simde diagnostic pragmas and replace variable-length arrays
2023-08-05 17:10:33 -07:00
Ryan Foster d00068cb6c plugins: Update CMake minimum to 3.22
Since Ubuntu 22.04 is now our minimum supported Ubuntu version, and it
has CMake 3.22, let's make CMake 3.22 the minimum CMake version.
2023-08-05 16:45:46 -07:00
PatTheMav 57849bb0e7 obs-outputs: Refine certificate selection on macOS
Query for trusted and valid (based on datetime) certificates only.
2023-08-05 16:41:41 -07:00
tytan652 63a9d372bb mac-virtualcam: Replace variable-length arrays with NSMutableData
Co-authored-by: Patrick Heyer <PatTheMav@users.noreply.github.com>
2023-08-06 01:31:02 +02:00
tytan652 27630a8c0e linux-pipewire: Replace variable-length arrays with dynamic arrays
The in-tree simde is actually adding a pragma that makes -Wvla ignored
2023-08-06 01:31:02 +02:00
Lain 78cb2aa361 UI: Fix case where cef func may not be present
Due to a particular... plugin we all know and love, the new
QCefWidget::executeJavascript() function may not actually be present as
it should be. So, we have to verify that it's available, and only use it
in that case.
2023-08-05 04:35:31 -07:00
Lain 4af00587a6 obs-transitions: Fix stingers lingering on last frame
(This commit also modifies obs-ffmpeg)

This change was meant for track matte stingers to prevent the last frame
from having risk of flashing due to their transparent nature, but this
code had a negative side effect on normal stingers as well.

Fixes obsproject/obs-studio#8981
2023-08-04 11:13:31 -07:00
jpark37 b5c5f71cee graphics-hook: Handle VkImageViewUsageCreateInfo
Our solution for adding TRANSFER_SRC usage for imageless framebuffers
was triggering validation errors when combined with image view usage
overrides. Add TRANSFER_SRC onto usage overrides for swap chain image
views to fix mismatches.
2023-08-04 03:35:10 -07:00
Penwywern 182468b373 win-wasapi: Add hook signal and proc for process output capture 2023-07-30 14:06:53 -07:00
Penwywern 82beae249a win-capture: Add hook signal and proc for window capture 2023-07-30 14:06:53 -07:00
Penwywern 9d7a963386 win-capture: Add hook signal and proc for game capture 2023-07-30 14:06:53 -07:00
Penwywern e9c12b7d9d linux-capture: Add hook signal and proc for Xcomposite window capture 2023-07-30 14:06:53 -07:00
jpark37 f5f7ae3e7f decklink: Support 10-bit RGB capture
Don't drop to YUV if a pure RGB signal is available.
2023-07-29 16:41:31 -07:00
tytan652 c6ce50c9a3 deps,libobs,plugins: Remove in-tree Jansson
Jansson is provided by other means on any supported platform.
2023-07-29 16:37:14 -07:00
Norihiro Kamae 9ca55eea43 obs-qsv11: Downgrade minimum required CMake version 2023-07-29 16:07:54 -07:00
Norihiro Kamae df70743385 aja: Ignore return value from aja-common functions
The functions `aja::lower` and `aja::replace` overwrite the 1st argument
and just return the reference to the 1st argument. It is not necessary
to use the return value.
2023-07-29 16:04:16 -07:00
derrod 38d10934ee obs-outputs: Set videocodecid to HEVC/AV1 FourCC in E-RTMP 2023-07-26 05:13:43 -07:00
tytan652 cb5f65b529 obs-qsv11: Link against Libva on Linux 2023-07-25 15:29:52 -07:00
Carl Pédimina b12ed3008b win-capture: Fix leaking framebuffers data
The wrong linked list was used when removing framebuffer data.
Furthermore, a pointer referenced an object on the stack that
was no more valid.
2023-07-25 10:48:10 -07:00
James Hurley cca1cbf11b obs-outputs: Add log message on successful connection 2023-07-24 16:55:42 -07:00
James Hurley ba41613ab8 obs-outputs: Adopt Happy Eyeballs in RTMP
This commit adopts the happy eyeballs utility in the RTMP
output module, replacing the existing TCP connection logic.
2023-07-24 16:55:13 -07:00
Lain 93609e3e72 rtmp-services: Fix package.json not using correct ver.
Also bump the services.json version
2023-07-24 13:07:58 -07:00
E Jikan 6255267a4d
rtmp-services: Add "VStream" RTMP service (#9274) 2023-07-24 14:35:00 -05:00
derrod edf2c8210c cmake,plugins,build-aux: Remove enc-amf 2023-07-22 18:06:26 -07:00
Ryan Foster f7e6a5c8e7 obs-browser: Update version to 2.22.0
5292ff3 - Send events to all frames
5d74047 - Fix compilation on Windows and macOS
fbb9e84 - Remove obsolete translation RestartCEF
5e22a61 - Remove Qt 5 ifdef guards and code
72635d5 - Add JS interaction function, Fix "setStartupScript"
0f1ff75 - Replace json11 by Nlohmann JSON
2023-07-20 12:27:27 -04:00
gxalpha 9d611a064f cmake: Remove Qt version selection and Qt 5 support 2023-07-19 11:56:54 -04:00
pkv b15fc60d63 obs-ffmpeg: Fix rendezvous mode with SRT
Rendezvous mode with SRT protocol is used to punch through firewalls.
Although caller or listener mode are much more widespread, it is
sometimes in use. The rendezvous mode was broken in obs because we
would bind to the remote IP, instead of a local IP. This fixes the bug.
Note that there is also a bug in libsrt preventing our code to work.
But Version 1.5.2+ of libsrt fixes that.

Signed-off-by: pkv <pkv@obsproject.com>
2023-07-18 15:55:22 -04:00
nquah 8137eb5f56 obs-outputs: Enable HDR for HEVC over RTMP
Removes flag guard to enable HDR streaming for HEVC over Enhanced RTMP.
This functionality is currently only supported by YouTube.
See github.com/veovera/enhanced-rtmp for the Enhanced RTMP spec.
2023-07-18 14:43:32 -04:00
Paul Gregoire fc2f6e707f obs-webrtc: Add custom User-Agent and randomize SSRCs
Adds a custom User-Agent header to REST requests identifying OBS as the
client.

Randomizes SSRCs to avoid potential issues with servers that do not
rewrite them before forwarding.
2023-07-18 12:33:00 -04:00
CodeYan01 56b93c7601 obs-ffmpeg: Fix media source always STATE_ENDED
Previously would always end up with OBS_MEDIA_STATE_ENDED whether the
video reaches the end or the user stops the source (state is set to
STOPPED, but becomes ENDED right after). This fixes it so that if the
user stops the source, it will remain stopped.
2023-07-17 10:20:11 -07:00
gxalpha 8f4848a2b0 mac-capture: Set correct default type for application data 2023-07-16 02:00:39 +02:00
Georges Basile Stavracas Neto bdfead801e linux-pipewire: Explicitly handle NULL format strings
This is a workaround to the compiler complaining about directive
arguments being null.
2023-07-15 20:46:51 -03:00
Georges Basile Stavracas Neto 549c0f5850 linux-pipewire: Move portal signal subcription to portal.c
The D-Bus signal subscription is a very boring aspect of the
portals infrastructure that shouldn't really matter when reading
the code of pipewire.c.

Move it out to its natural place, portal.c.
2023-07-15 20:46:51 -03:00
columbarius 15b8c5b743 linux-pipewire: Add support for YUY2 2023-07-15 20:46:51 -03:00
columbarius 67f01c7a44 linux-pipewire: Add support for async sources
Cameras and audio streams will use the async output routines, but
not screencasting. This needs to be handled differently in the
processing callback.

As it is, the code is starting to get a bit messy, as we're now
dealing with two different frame processing approaches. Later on,
this code will be cleaned up and split in more logical pieces.

Co-authored-by: Georges Basile Stavracas Neto
<georges.stavracas@gmail.com>
2023-07-15 20:46:51 -03:00
Georges Basile Stavracas Neto c7e355e89c linux-pipewire: Store source when creating streams
We'll need to peek information about the source to determine how
to process frames, so store it for later usage.
2023-07-15 20:46:51 -03:00
columbarius 53ce8d5b65 linux-pipewire: Extend format_data
The media API requires it's own format (enum video_format) and
bytes per pixel (bpp).
2023-07-15 20:46:51 -03:00
Georges Basile Stavracas Neto 37fd856e91 linux-pipewire: Factor out format data in a struct
And use it instead of exhaustively open coding each field of
the anonymous struct into the arguments of the lookup function.
2023-07-15 20:46:51 -03:00
Georges Basile Stavracas Neto d40f5808f4 linux-pipewire: Move format info to streams
So far we've been treating format info on a per-connection basis,
but now that a single connection is capable of hosting multiple
streams, and each stream might negotiate a different format, it
is necessary to move format info to each stream individually.
2023-07-15 20:46:51 -03:00
Georges Basile Stavracas Neto 2f5c40b05b linux-pipewire: Track streams
Make obs_pipewire hold a list of streams created by itself, and
destroy these streams when closing the connection.
2023-07-15 20:46:51 -03:00
Georges Basile Stavracas Neto 330d54fada linux-pipewire: Separate PipeWire core and streams
Sorry, this is a painful commit to review :(

Until now, the only consumer of the PipeWire code is the screen
cast portal code. This portal code only ever has one PipeWire
connection, and one PipeWire stream, every time a monitor or a
window is selected. This is reflected on obs_pipewire, which only
handles a single stream for any given connection.

For cameras and audio, however, a single PipeWire connection can
and most likely always will provide multiple streams. For example,
computers with multiple webcams will have one PipeWire connection
reporting multiple PipeWire nodes, one node for each camera.

This commit breaks this one-stream-per-connection assumption, and
makes obs_pipewire_connect_stream() return an independent object
(obs_pipewire_stream) that represents a single stream.

The screencast portal code continues to only ever have one connection
and one stream.
2023-07-15 20:46:51 -03:00
Chensiyy 54568cb3bd win-wasapi: Fix PROPVARIANT variable has not be freed 2023-07-15 16:38:24 -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 8fa84e874b mac-capture: Remove internal display settings from SCK Audio Capture 2023-07-15 16:19:02 -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
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
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
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
Norihiro Kamae 021826175b obs-ffmpeg: Remove outdated comment 2023-07-12 13:54:50 -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
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
Kurt Kartaltepe dc2f2f157b obs-qsv11: Remove Windows references from common files
This cleans up the fairly arbitrary Windows includes and types and
unused functions from the common code and replaces them with platform
independent equivalents, or platform specific implementations in
common_utils.

This removes the Windows 8 support to avoid adding an additional
platform function to query this. OBS only supports Windows 10
officially, so it's about time we removed it.
2023-07-05 19:52:10 -04:00
Kurt Kartaltepe 6acb16840d obs-qsv11: Simplify tracking of which allocator is used
Replace the checks based on D3D11 and D3D9 to check a more informative
variable aptly named UseTexAlloc for which memory allocator should be
used within the encoder.
2023-07-05 19:52:10 -04:00
Kurt Kartaltepe f473f45e03 obs-qsv11: Avoid overwriting encoding parameters
The query being done will ovewrite ALL invalid parameters. This results
in invalid parameters that are not LowPower settings being overwritten
with 0 either introducing different errors or possibly different
behavior.
2023-07-05 19:52:10 -04:00
PatTheMav 914951a28d mac-virtualcam: Fix use of collection without explicit type
Swift 5.0 requires empty collections to carry explicit type definitions.
2023-07-04 15:41:12 +02:00
gxalpha 290570b819 mac-capture: Use error code constant instead of magic number 2023-07-03 16:52:50 +02:00
gxalpha e8602897d7 mac-capture: Add button to reactivate stopped capture 2023-07-03 15:35:04 +02:00
gxalpha 89124e223e mac-capture: Remove unneeded debug log
This log line was introduced in 239e9273d and looks like it was for
debugging purposes. It always prints an error message when an SCK audio
capture source was successfully created.
2023-07-02 23:57:48 +02:00
gxalpha 38f63473fc mac-capture: Mark CoreAudio output capture source as deprecated 2023-07-01 16:51:28 +02:00
Luke Strickland aedc3aa64b rtmp-services: Remove Glimesh service 2023-07-01 12:26:43 +02:00
Norihiro Kamae 97356de0e8 vlc-video: Define media file array type for function parameter lists
To avoid passing `struct darray *` type, which cannot hold the type
information, this commit defines array types and uses that types on the
function parameters.
2023-07-01 00:39:13 -07:00
Norihiro Kamae 4359489f81 image-source: Define image file array type for function parameter lists
To avoid passing `struct darray *` type, which cannot hold the type
information, this commit defines array types and uses that types on the
function parameters.
2023-07-01 00:39:13 -07:00
Norihiro Kamae 097e011194 obs-ffmpeg: Define DARRAY macro type
Passing struct darray type will loose the actual type of the contents.
Uses a defined type of `DARRAY(struct encoder_packet)` to carry the
type when crossing functions.
2023-07-01 00:39:13 -07:00
jcm 239e9273dc mac-capture: Add macOS Audio Capture 2023-06-30 23:59:20 +02:00
jcm 1152173742 mac-capture: Rename 'mac-screen-capture.m' 2023-06-30 23:59:20 +02:00
jcm ce5f391c73 mac-capture: Refactor macOS Screen Capture 2023-06-30 23:59:20 +02:00
PatTheMav 89625715fc cmake: Fix configuration errors with Windows legacy path
By default Windows builds use the legacy CMake code paths, which ideally
work as-is with existing build directories.
2023-06-30 11:56:57 -04:00
PatTheMav db895092ed cmake: Add changes for CMake build framework 3.0
New code path only taken if OBS_CMAKE_VERSION is set to 3.0.0 or
greater, old functionality remains unchanged.
2023-06-29 10:11:32 -04:00
PatTheMav 0a56e6f357 enc-amf: Update submodule to 2.8.0.1 2023-06-29 10:11:32 -04:00
Ruwen Hahn 526990d37c obs-ffmpeg: Enable GPU scaling for AMF texture encoder 2023-06-26 13:32:25 +02:00
Ruwen Hahn eb260cddc2 obs-qsv11: Allow GPU scaling for texture QSV encoder 2023-06-26 13:32:25 +02:00
Ruwen Hahn 4a5a2d1111 obs-ffmpeg: Allow GPU scaling for obs-nvenc 2023-06-26 13:32:25 +02:00
pkv ba92140f2b rtmp-services: Enforce encoder settings per protocol
For mpegts output, used in rtmp-custom service, encoder settings
require:
- ADTS with fdk-aac.
For all non-rtmp protocols, one also requires:
- video encoder header repetition;
This future proofs the code against protocol addition.

Additionally, I've added a check against NULL audio settings, which was
in my fork but that I forgot to add in the PR [1].

[1] https://github.com/obsproject/obs-studio/pull/6163

Signed-off-by: pkv <pkv@obsproject.com>
2023-06-24 17:11:33 -07:00
Yoshimasa Niwa 00c67e59e6 mac-capture: Improve various Objective-C code
Improve complicated Objective-C implementations in
mac-screen-capture implementation.

- Use `for` instead of overuse of block based iteration code.
- Use `YES` and `NO` for `BOOL` type instead of wrong `TRUE`, `FALSE`,
  `true`, `false`.
- Use `length` to check empty string, omit unnecessary `nil` checks.
2023-06-24 16:58:09 -07:00
Yoshimasa Niwa 36abf04afa mac-capture: Fix show hidden windows option
`screen_capture_build_content_list` or similar calls uses updated
`sc->show_hidden_windows` or similar flags, but these are not set
before calling these functions.
2023-06-24 16:56:40 -07:00
CodeYan01 69e8b73684 obs-ffmpeg: Fix media source playing when inactive 2023-06-24 16:55:41 -07:00
Mattias Landin b9dcbfb953 rtmp-services: Update Vindral servers 2023-06-24 16:11:03 -07:00
CodeYan01 d1a7070d10 obs-ffmpeg: Prevent media source restart
Some options do not require a media source restart. Saving source
unchanged source settings should also not trigger a restart.

I tried to also make it so speed changes do not require a restart by
manipulating the elapsed timestamp  for the source, but it sometimes
causes the first few milliseconds after saving settings to be rough or
slightly distorted. I am also unsure whether a/v frame buffers should be
cleared on a speed change (and how to) so I made it so restarts are
required for speed changes. Chiyo also mentioned that successive quick
speed changes will cause maximum audio buffering (which I was able to
reproduce once).

Nonlocal file playback is unaffected, and will cause the media source to
restart because I am not aware of the possible consequences and because
there's no restart button for it.

Changing "Apply alpha in linear space" is only visible after a few
milliseconds (when mp_media_next_video is called for new frames).

If `is_stinger` and `full_decode` are toggled during runtime, even
though it shouldn't be possible as they are not accessible in the UI,
a media restart will be triggered.
2023-06-23 04:39:52 -07:00
Norihiro Kamae dcb5b0785b linux-capture: Remove obsolete property swap_redblue
The implementation to swap red and blue by the property was removed by
9b6d39299e but the property was left.
2023-06-22 09:26:27 -03:00
Norihiro Kamae 43f7c8c928 text-freetype2: Fix not updating chat log mode property 2023-06-17 16:35:47 -07:00
田七不甜 038109fb1b rtmp-services: Update Bilibili Live 2023-06-17 16:28:04 -07:00
Norihiro Kamae 68cb7a31f1 obs-filters: Don't compile audio delay code in async-delay-filter 2023-06-17 16:15:33 -07:00
PatTheMav 0b325c0e34 cmake: Add separate function to set Xcode-based target properties 2023-06-17 12:23:33 -04:00
PatTheMav 59904a66a3 cmake: Update Framework link definition for macOS builds 2023-06-17 12:23:33 -04:00
PatTheMav 9805b706d1 cmake: Remove legacy files for macOS builds 2023-06-17 12:23:33 -04:00
PatTheMav 50a4e83251 cmake: Remove Info.plist template files for macOS builds
Creation of Info.plist files through Xcode is more canonical and
future-proof, as it will automatically pick up changes/updates
introduced by Apple. Non-standard keys can still be added via a
template file, which will then be extended by Xcode with the default
keys.
2023-06-17 12:23:33 -04:00
PatTheMav eb3d9963a0 cmake: Update macOS compiler configuration
Compiler extensions are disabled before the first `project` call to
force CMake into considering compilers to not support GNU extensions
(even though clang and gcc do).

Also sets common clang compiler options so they can be used across all
supported platforms.

`openmp-simd` support is enabled by default as there is no performance
penalty on x86_64 systems and intrinsics are enabled on arm64.

Also implements CMake's `CMAKE_COMPILE_WARNING_AS_ERROR` flag to
enable the desired behavior and configuration time.
2023-06-17 12:23:33 -04:00
gxalpha 1edd997c49 mac-syphon: Remove unused OBSSyphonKVObserver 2023-06-17 16:36:08 +02:00
gxalpha fc6bbb73f2 mac-capture: Fix wrong CFString to NSNumber cast 2023-06-17 16:35:13 +02:00
gxalpha 59b5b07400 mac-capture: Add SCStreamDelegate to stream to log capture errors 2023-06-17 16:33:52 +02:00
Huts, Roman 94d0b654f0 obs-ffmpeg: Fix logic in one of the AMF preset fallback checks 2023-06-16 18:37:07 -04:00
PatTheMav 3d78c23db8 obs-outputs: Silence all ftl-sdk warnings
The FTL SDK is outdated and not actively maintained - the warnings are
known and acknowledged, so there is no need to further pollute the
build output with them.
2023-06-16 14:12:58 -04:00
PatTheMav fffbf6c801 obs-outputs: Fix clang warnings about unreachable code 2023-06-16 14:12:58 -04:00
PatTheMav 0235ac2fb2 mac-virtualcam: Use explicit access to object members in async block 2023-06-16 14:12:58 -04:00
PatTheMav 53cfe5cb7f mac-videotoolbox: Remove unreachable code to fix clang warning 2023-06-16 14:12:58 -04:00
PatTheMav 4c4a4f9d9f mac-capture: Fix clang warning about unreachable code 2023-06-16 14:12:58 -04:00
PatTheMav 5a7b95cd8c obs-outputs: Silence clang warning about questionable use of comma 2023-06-16 14:12:58 -04:00
PatTheMav 3ca56fee84 libobs: Silence clang warnings for empty prototypes without void
clang expects an empty prototype to explicitly use `void`.

Also silences the warning in `libobs-opengl`, `obsglad`, `caption`,
`mac-syphon` and `obs-x264-test`.
2023-06-16 14:12:58 -04:00
Ryan Foster ced135a68e obs-websocket: Update version to 5.2.3 2023-06-15 21:01:09 -04:00
gxalpha 83be21a60d mac-syphon: Remove syphon-framework submodule 2023-06-15 13:08:41 -04:00
gxalpha 6e7e4acb93 mac-syphon: Update Syphon, use obs-deps framework
Updates the syphon to use the Syphon.framework from obs-deps instead of
the submodule.
The submodule however was not updated in 9 years and additionally had
custom patches, compared to the obs-deps release that's built on the
current git commit of Syphon, meaning that some code changes are
necessary. It would be nice to split the code and cmake changes into
multiple commits (where the first would update the submodule and contain
the plugin code changes, and the second switch the cmake away from the
submodule to the obs-deps release), but it really doesn't make sense to
update the submodule first if it gets removed anyways.

Adds a subclass for SyphonClientBase that is responsible for receiving
the frames. This has the advantage that it doesn't need an OpenGL
context like the existing SyphonOpenGLClient, and can just return an
IOSurface directly (without some kind of middleman).
2023-06-15 13:08:41 -04:00
PatTheMav f8e00d6071 clang-format: Update formatting of all ObjC and ObjC++ files 2023-06-11 14:56:45 +02:00