Commit graph

13099 commits

Author SHA1 Message Date
cg2121 04629afe68 UI: Adjust size policy for properties view
Now the properties won't be squished when making the properties
dialog smaller.
2023-07-17 17:46:46 -03:00
Ryan Foster e70e4934ef
Merge pull request #8881 from PatTheMav/ci-update
CI: Update GitHub Actions workflows with repository actions and updated build scripts
2023-07-17 15:35:51 -04:00
PatTheMav 0993147954
CI: Delete legacy build and formatting check scripts 2023-07-17 20:10:12 +02:00
PatTheMav 0838b74060
CI: Delete legacy workflows for GitHub Actions 2023-07-17 20:09:53 +02:00
PatTheMav 96a48e86c3
CI: Add new reusable workflows for GitHub Actions 2023-07-17 20:09:53 +02:00
PatTheMav d6b98def22
CI: Add new repository actions for GitHub 2023-07-17 20:09:52 +02:00
PatTheMav ae897c2764
CI: Add new build and packaging scripts for Linux 2023-07-17 19:49:18 +02:00
PatTheMav 902843634c
CI: Add new build and packaging scripts for macOS 2023-07-17 19:49:18 +02:00
PatTheMav 1cfa06a2aa
CI: Add zsh-based build framework files for macOS 2023-07-17 19:49:18 +02:00
cg2121 c33fa8bfa2 UI: Fix transform shortcuts for audio only sources
The edit, copy, paste and reset transform shortcuts would still work
for audio only sources, even though the menu was hidden for these.
2023-07-17 10:22:04 -07: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
PatTheMav c23bd7e05e cmake: Fix missing libobs subdirectories in MSVC code navigator 2023-07-17 10:36:50 -04:00
gxalpha f1ad451a04 .git-blame-ignore-revs: Add recent clang-format changes 2023-07-16 10:02:55 +10:00
gxalpha 8f4848a2b0 mac-capture: Set correct default type for application data 2023-07-16 02:00:39 +02:00
Richard Stanway d997a56fb6 UI: Destroy the frontend API after OBS_FRONTEND_EVENT_EXIT
The frontend API was never explicitly cleaned up which has lead to
several crashes from plugins continuing to call it even after OBS itself
has been destroyed. We now destroy the API after the exit event, so
further calls by plugins will be no-ops instead of potentially accessing
destroyed OBS state.

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

Unlike Windows, this check takes ~1ms so we have no need to spin out
another thread to perform the work. This also fixes up some of the CPP/C
mixing going on in common_utils."h" to allow us to call common functions
from C files.
2023-07-14 12:19:33 -04:00