Commit graph

4320 commits

Author SHA1 Message Date
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