The *AutoRelease helpers should not take references from OBSRef objects.
Instead, make an OBSRefAutoRelease base class, and OBSRef a subclass of
that to allow moves, and then perform moves from those objects.
This fixes an issue where *AutoRelease OBSRef objects would cause an
unintended double release of objects after having been assigned values
from non-*AutoRelease OBSRef objects.
We've been listing the supported formats in place whenever we
needed so far, but now we're doing it in too many different
places, which is getting confusing.
Move all these sparsely written rules into one single table
of formats, and adjust the code to lookup data on it.
Choice pods are built with the first element being the
preferred choice, followed by a list of possible choices.
We add the preferred choice inside the loop, which makes
the code slightly harder to follow.
Factor this out of the loop, into a separate step.
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().
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.
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.
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.
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.
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.
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.
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.