The surround audio was introduced by bbac3280c1 but 7.1 channel audio
was disabled since libfdk-aac >= 0.1.3 is required.
Now the minimum Ubuntu version is 18.04, which provide libfdk-aac 0.1.5.
This fixes a bug where the RTMP send thread can deadlock upon the
underlying TCP connection being broken. By introducing a send timeout,
this allows the thread to unblock and give up, triggering a reconnect
as normal. The correct solution to this problem would be to rewrite
librtmp with asynchronous IO, but that seems like something unlikely
to happen.
**Before**:
- Start stream in OBS
- Use tool (pfSense) to invalidate connection state
- OBS bitrate drops to 0
- Output does not respond to stop signals, and hangs for an undefined
amount of time (usually multiple minutes) before finally giving up
**After**:
- Start stream in OBS
- Use tool (pfSense) to invalidate connection state
- OBS bitrate drops to 0
- Output sits in blocked state for maximum of 8 seconds, then cleans
up and triggers the reconnect logic
Details in #6226, basically this fixes an issue where OBS links
to the system-installed librtmp1, which is incompatible with our
librtmp.
Co-authored-by: ewhac <ewhac@ewhac.org>
Want to avoid receiver gamut remapping from Rec. 2100 to P3.
Fix min luminance appearing as NaN by switching from 0/0 to 0/1.
Also set max luminance for HLG because why not.
stdout on Windows from a subprocess requires that something read the
stdout buffer, and currently we don't do that. Due to newly introduced
printf/fprintf calls, the stdout buffer eventually fills up because
nothing is emptying it, thus the muxer locks up on an fprintf/printf
call and causes OBS itself to hang.
Rec. 2020 is really an SDR spec, but I think HDR10 made it okay to slap
PQ on it, call it an HDR spec. Rec. 2100 came along after and formally
allowed the use of PQ/HLG, so we should use 2100 instead.
This is very much like previous commit, but there's a catch: there
already was an enumeration in place, which is replaced in this
commit. The obs_pw_capture_type enum was introduced before splitting
the portal code into a separate file, and the enum itself is specific
to the screencast portal, so the appropriate place to enumerate it
is in portal.h.
For completude, PORTAL_CAPTURE_TYPE_VIRTUAL was added to the enum,
even though we never used, and probably never will.
The values are still the same, since both the old and this new enum
were extracted from the screencast portal [1].
https://github.com/flatpak/xdg-desktop-portal/blob/main/data/org.freedesktop.portal.ScreenCast.xml#L290-300
The ScreenCast portal defines 3 cursor modes [1]:
* Hidden: no visible cursor (value: 1)
* Embedded: cursor is drawn in the frames (value: 2)
* Metadata: cursor is sent as stream metadata (value: 4)
The values are power-of-two due to be used as flags.
Explicitly listing these values in an enum improves legibility
of the code, so do that instead of hardcoding 1, 2, and 4.
[1] https://github.com/flatpak/xdg-desktop-portal/blob/main/data/org.freedesktop.portal.ScreenCast.xml#L302-L316
The portal.c file was introduced after the PipeWire code landed, and
handles acquiring a D-Bus connection to the portal interface, and also
has helpers to get properties from portals. The available cursor modes
property fits nicely in portal.c.
Move fetching the cursor mode to portal.c.
Ellipses in log messages bring a tone of vagueness and insecurity
that does not match the geist of the OBS Studio community. We're
a bold, industry-leading community producing software that is at
the heart of the biggest services of today's world. When it comes
to PipeWire and Wayland adoption, we're quite literally the app
that protocols and portals are designed for.
Therefore, it is unacceptable that the log messages in the PipeWire
capture don't communicate how strong of a community we are. Not
only that, these ellipses bring harm on the long run. After all,
who on their right mind would design protocols, portals, and user
interactions for an app that doesn't even log their messages in
accordance to its community values?
Our logs must shout strength. They must reflect that OBS Studio
is here to stay. Readers of such logs must fasten their seatbelts
before opening these files. Competition tremble with dread and
fear when presented with these logs. Only extreme metal singers
should be able to read these logs out loud.
No compromise.
Remove ellipses from PipeWire log messages.
They are inconsistently capitalized, some with sentence capitalization,
some completely lower-cased.
Capitalize all log messages using sentence capitalization.
The information that we currently log is not enough to give proper
support, and at best allows us to know that the first few steps of
negotiation worked.
Transform a few key debug messages into infos.