The previous monitor recovery logic touches the source monitoring type,
resets the monitor even if the output device hasn't been invalidated,
and was susceptible to races. Monitor invalidation should live within
the monitor abstraction.
We require libdrm for its header so add the cmake module and header path
to the build. We don't need to link libdrm though so we dont add it to
libraries.
DRM_FORMAT_MOD_INVALID is a token for implicit modifier. When importing
a DMA-BUF with implicit modifier we should call
gs_texture_create_from_dmabuf() without modifier.
g_variant_lookup() obligatorily receives the type of the variant to
lookup. This function is used when retrieving the session handle
from the portal's response, and the variant type passed is "s" (a
string).
However, xdg-desktop-portal had a bug: the documentation explicitly
mentions that the session handle is an object path (of variant type
"o"), but it passed a string (of variant type "s"). This mismatch
was fixed in the xdg-desktop-portal release 1.10 [1], but that broke
the PipeWire capture code, which was passing specifically the "s"
value to the variant lookup.
Fix this by not checking the variant type at all. Object paths ("o")
are simply strings with a few extra checks, and we don't actually need
to perform these checks.
This change probably broke other apps, and that makes me extremely sad :(
[1] https://github.com/flatpak/xdg-desktop-portal/pull/609
Since this is activated after starting the output, it assumes there is
no need to read anything from the connection as RTMP is send-only from
that point on. However with TLS, reading protocol messages is required
for proper operation, causing it to immediately fail on RTMPS
connections. This is a complex fix due to the way it interacts with
librtmp and mbedTLS so let's just disable it for now to avoid breaking
things for users.
The gs_texture_create_from_dmabuf function is able to create textures
from multiplanar DMA-BUF data. However, the only in-tree consumer of
this function - the PipeWire capture - does not use that.
Make PipeWire create textures from multiplanar buffers.
Unfortunately these encoders tend to crash or freeze after after
multiple bitrate changes. Users with dynamic bitrate enabled
experience a random encoder freeze which manifests as OBS dropping to
0kb/sec and disconnecting and it's not at all obvious that dynamic
bitrate is the cause. Disable it for now until we can figure out if
there is any workaround or bug on our end.
Doesn't make sense to grab the oldest frame when not capturing overlays,
because the overlay was already rendered in it. This will grab the
latest frame (before the overlay is rendered).
This commit adds the stream key link URLs to services that have them
from UI/window-basic-auto-config.cpp and
UI/window-basic-settings-stream.cpp. This will enable querying these
values from services.json and remove service-specific code from UI code.
This change is to be consistent with an upcoming commit where
"stream_key_link" is used for the key. While the JSON spec allows spaces
in keys, it isn't widely exercised. Having spaces in keys may introduce
other issues if the JSON data were processed in JavaScript (e.g., dot
notation vs. bracket notation), so let's just replace the spaces with
underscores.