10265 Commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
e1f01554f7 libobs-opengl: Swap order of out parameters
The usual pattern of function signature is "array / n_elements",
but query_dmabuf_formats() does not follow it. Apply this order
to query_dmabuf_formats().
2021-12-30 18:41:04 -03:00
Georges Basile Stavracas Neto
efb3220494 libobs-opengl: Remove unused function argument
The 'display' variable is unused, and the function is static,
so we don't need to carry the parameter.
2021-12-30 18:41:04 -03:00
Georges Basile Stavracas Neto
36f06e07c6 CI: Split Flatpak beta and stable branches
We currently publish the same build from the same branch
to Flathub. However, soon we'll need to build the Flatpak
manifest in different branches, and publish them in different
repositories.

Prepare for that by splitting the publish step in two: one
for Flathub, and another for Flathub Beta. Do that using
a matrix strategy.

Skip building and publishing stable releases when it's a beta
or RC release by setting an output variable in the first job.
2021-12-30 17:05:58 -03:00
Georges Basile Stavracas Neto
2c7bc286e6 CI: Trivial cleanup
Remove quotes from the step name.
2021-12-30 17:05:58 -03:00
tytan652
bce1d6970a UI: Fix build with YT integration without browser 2021-12-30 11:36:33 +01:00
Matt Gajownik
7c50621e15 obs-browser: Update version to 2.17.4 2021-12-29 16:55:23 +11:00
tt2468
47397ce527 UI: Add obs_frontend_open_source_interaction()
Adds a frontend api call to open the interact dialog of a source,
just like the `_properties` and `_filters` functions.
2021-12-28 21:44:35 -08:00
tt2468
466ba5ae29 docs: Fix names of filter/properties functions 2021-12-28 16:49:00 -08:00
jp9000
213712dfe5 UI: Fix Copy/Paste not including blend mode 2021-12-28 09:12:51 -08:00
jp9000
2364dfd0ef UI: Remove unnecessary shared_ptr allocations
Not sure why these were separate allocations -- the data will be
preserved just fine when copying the structure without being separate
allocations
2021-12-28 08:34:40 -08:00
jp9000
0c4b3816de UI: Add alt-key support to Docks menu 2021-12-28 06:42:11 -08:00
Richard Stanway
af6844f5c2 obs-outputs: Only log SO_SNDBUF on RTMP socket
From Windows 7 onwards, dynamic send buffering is enabled. By setting
SO_SNDBUF explicitly, we actually disabled the dynamic send buffering
feature which results in reduced throughput. Thankfully this did not
affect the majority of users since the default send buffer is usually
already 64k.

This commit replaces the setting of SO_SNDBUF with log output showing
the current value of SO_SNDBUF at stream start and end. This will aid in
debugging throughput issues caused by a buffer that isn't big enough,
perhaps as a result of the user disabling dynamic send buffering
system-wide.
2021-12-27 14:29:43 -08:00
jp9000
1655ebf18f libobs, UI: Add support for beta builds
Allows the ability to specify beta builds in addition to release
candidate builds
2021-12-27 10:01:07 -08:00
Richard Stanway
5be6681687 libobs: Check memory allocation in Windows crash handler
If we're crashing due to a low memory condition, it's dangerous to
try to allocate more memory without checking for success.
2021-12-26 17:48:54 +01:00
Richard Stanway
7d64e9d598 libobs: Use size_t for obs_encoder_get_frame_size 2021-12-26 17:32:00 +01:00
jp9000
8212cedf03 Revert "libobs, docs: Add function to get source version"
This reverts commit 1a7a10048c1a22ea969545e385a456b240baad5e.
2021-12-25 17:10:45 -08:00
jp9000
006fdd2be5 Revert "obs-filters: Remove duplicate color correction code"
This reverts commit 6940495e79d6313f61e9c73a0bb75b078810f118.
2021-12-25 17:10:44 -08:00
jp9000
c16f27d269 Revert "obs-filters: Remove duplicate code from color key filter"
This reverts commit a4045ed31aee67649e71d10e2793b39677ce2c04.
2021-12-25 17:10:43 -08:00
jp9000
f4317888de Revert "obs-filters: Remove duplicate code from chroma key filter"
This reverts commit 311330628d2eb197b5bff88c05bedcc21a47ca55.
2021-12-25 17:10:41 -08:00
Matt Gajownik
babc07fa5c obs-browser: Include atomic for browser source destroy
Fixes build issues on older CEF versions (especially on Linux)
2021-12-25 08:52:20 +11:00
gxalpha
a92b671ed1 UI: Hold refs to existing sources during remove scene undo 2021-12-24 09:45:02 -08:00
gxalpha
3a67fe5944 UI: Hold refs to old sources during remove source undo
Fixes an issue where sources could get released and destroyed when
undoing the removal of a nested scene.
2021-12-24 06:02:02 -08:00
jp9000
8629d6a028 obs-vst: Fix race condition and prevent double invoke
1dde4c37a obs-vst: Fix VSTPlugin::effect race condition
e33e8ee62 obs-vst: Modify VSTPlugin::closeEditor()
2021-12-23 10:58:44 -08:00
Norihiro Kamae
685f8297e4 obs-ffmpeg: Set frame_size for audio codec parameter
This commit fixes an issue that the last audio packet is sometimes not
written into mp4 format. Since libavformat internally calculates the
packet duration from the frame_size specified in the codec parameter, it
is necessary to set frame_size.
2021-12-23 10:48:37 -08:00
Norihiro Kamae
d1b87e1642 libobs: Add API to get encoder frame size
When muxing to some format, duration of the packet is used. We need an
API for encoder to return the frame size.
2021-12-23 10:48:37 -08:00
gxalpha
29b8df97a6 UI: Remove unneeded call when removing scene 2021-12-23 06:37:10 -08:00
Clayton Groeneveld
f52c05081a UI: Add grayscale meters when volume is muted
This allows the user to see audio levels, even when
muted.
2021-12-23 06:35:29 -08:00
Clayton Groeneveld
5878856ce4 UI: Display grayscale volume meter if muted
Currently, the volume meters don't show volume levels when
muted. This shows the levels and makes it grayscale when
the source is muted.
2021-12-23 06:35:29 -08:00
gxalpha
343ffc98ed docs: Document obs_get_scene_by_name 2021-12-23 06:31:45 -08:00
Matt Gajownik
845e056551 UI: Filter out incompatible audio filters in A/V list
Fixes #5136
2021-12-23 06:30:02 -08:00
Matt Gajownik
e695bf674e obs-browser: Correct set function names to match README 2021-12-23 18:16:14 +11:00
Matt Gajownik
b154006c9b cmake: Add libRIST to copied Windows libs
Required for #5467 and https://github.com/obsproject/obs-deps/pull/86
2021-12-23 18:14:16 +11:00
tytan652
b04626f72d flatpak: Deduplicate CEF from the bundle
CEF is installed in /app/cef. After OBS is built, it no longer needs
/app/cef because everything that OBS needs is copied elsewhere.

So removing /app/cef at the cleanup stage will not cause issue
and will also reduce bundle size.
2021-12-22 15:10:15 -03:00
tytan652
6ad54f5252 flatpak: Add AJA NTV2 library
This enable AJA plugins on flatpak builds
2021-12-22 15:10:15 -03:00
columbarius
0532a5c1f0 linux-capture: Fix Ubuntu 21.10 builds
Ubuntu 21.10 provides PipeWire 0.3.32 which is missing the
`SPA_POD_PROP_FLAG_DONT_FIXATE` required for proper DMA-BUF negotiation.
Since this isn't implemented in the DE's of this Ubuntu version just
defining this flag won't have any impact.

Revert after support for Ubuntu 21.10 ended.
2021-12-22 14:27:53 -03:00
columbarius
13693bd199 linux-capture: Add fallback for PipeWire < 0.3.40
Proper DMA-BUF format and modifier negotiation is possible with PipeWire
0.3.40. This commit adds checks for older versions and allows to build
against them.

These are classified as follows:
* PipeWire server older than 0.3.24: Restrict to SHM only
* PipeWire server between 0.3.24 (incl.) and 0.3.40: Announce modifiers
  along with the old method. On failed import drop all modifiers.
* PipeWire server 0.3.40 and newer: Announce modifiers along with the
  old method. On failed import drop only a single modifier.
2021-12-22 14:27:53 -03:00
columbarius
abbec90e7e linux-pipewire: Handle DMA-BUF import failure
Importing a DMA-BUF can fail even if the renderer announces support for
the used format modifier pair. This can be caused by a number of reasons
specific to the underlying hardware and api [1]. In that case we want to
remove that modifier from our list of supported ones and renegotiate.

This feature was added in PipeWire 0.3.40. On previous versions the best
we can do is drop all modifiers an fallback to DMA-BUF with another
format or directly to the SHM buffer transport. This mechanism is
demonstrated in [2].

[1] https://xdc2020.x.org/event/9/contributions/615/attachments/704/1301/XDC_2020__Allocation_Constraints.pdf
[2] https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/examples/video-play-fixate.c
2021-12-22 14:27:53 -03:00
columbarius
01ac816a33 CI: Add PipeWire 0.3.40 to Flatpak
We require PipeWire 0.3.40 or later in preparation for proper
DMA-BUF handling, which includes negotiation of modifier lists and
dropping of single modifiers.

This commit should be reverted as soon as the Freedesktop Flatpak SDK
contains this or a newer PipeWire version.
2021-12-22 14:27:53 -03:00
columbarius
c31aba9600 linux-capture: Announce supported modifiers via PipeWire
Sharing DMA-BUFs via PipeWire requires the client to announce all
formats together with their supported modifiers. [1]

[1] https://docs.pipewire.org/page_dma_buf.html
2021-12-22 14:27:53 -03:00
columbarius
b57f7f0aed linux-capture: Bump minimal PipeWire version to 0.3.33
We require PipeWire 0.3.33 or later to make use of the introduces flags
`SPA_POD_PROP_FLAG_MANDATORY`  and `SPA_POD_PROP_FLAG_DONT_FIXATE`,
which are required for the negotiation process introduced in the
following commits.
2021-12-22 14:27:53 -03:00
columbarius
b072159703 libobs-opengl: Implement DMA-BUF query functions for EGL renderer
Implement device_query_dmabuf_capabilities and
device_query_dmabuf_modifiers for EGL/Wayland and EGL/X11.
2021-12-22 14:27:53 -03:00
columbarius
4cda05f270 libobs/graphics: Add Linux-only gs_query_dmabuf_* functions
When sharing DMA-BUFs it is required the announce the underlying
hardware capabilities via supported modifiers.

Add new device_query_dmabuf_capabilities vfunc to gs_exports and connect it
to the egl implementation stubs in the supported render platforms. Add a new
public method gs_query_dmabuf_capabilities() that calls the vfunc above.

Add new device_query_dmabuf_modifiers vfunc to gs_exports and connect it
to the egl implementation in the supported render platforms. Add a new
public method gs_query_dmabuf_modifiers() that calls the vfunc above.
2021-12-22 14:27:53 -03:00
Georges Basile Stavracas Neto
e41e845272 linux-pipewire: Use DRM fourcc defines directly
It was naive to add these defines here to avoid a direct include when
the entire platform already depends on the DRM subsystem. Just include
it and let it provide the image formats.
2021-12-22 14:27:53 -03:00
tt2468
167f539416 libobs: Rename obs_audio_monitoring_supported to _available
With the reasonable possibility of monitoring support becoming a
runtime check, the phrase `available` is more fitting.
2021-12-22 02:43:14 -08:00
Matt Gajownik
5646981ce5 CI: Update CEF hash for Flatpak to Release 4638
Tested on Ubuntu 18.04 CI and Ubuntu 20.04 desktop, built with sysroot
and is_official_build. Ensures this build of CEF will run on a variety
of system configurations.
2021-12-22 09:44:00 +11:00
Ryan Foster
919a36ea90 CI: Use Windows obs-deps release
Use the Windows obs-deps release on CI instead of the current
dependencies2019.zip.
2021-12-21 14:14:26 -08:00
jp9000
49f9a055dc libobs: Fix destruction order for destruction task queue
Destruction of the task queue should probably happen after the audio and
video threads have been destroyed and all audio/video processing has
stopped.
2021-12-21 11:48:29 -08:00
jp9000
a593fe6755 obs-outputs: Add support for "RTMP Go Away" feature 2021-12-21 09:44:21 -08:00
jp9000
b4fb1db460 obs-outputs/librtmp: Add custom connect data callback
Allows the ability to add custom connect data to the connect signal
encoding
2021-12-21 09:44:21 -08:00
jp9000
6a72cd64e7 obs-outputs: Add support for reading RTMP packets
Instead of ignoring RTMP packets, allow the ability to read incoming
RTMP packets
2021-12-21 09:44:21 -08:00