Some wayland compositors exclusively use xwayland such as gamescope.
This allows us to fallback to the platform determined by Qt, which will
detect these exotic compositors and handle them correctly when not
overidden by this envvar.
Qt preserves this undesired behavior until 6.3. With ubuntu 22 on 6.2
this workaround needs to be preserved.
fixes#6386
Currently, Qt's User Interface Compiler (UIC) emits a warning about the
tabstop assignment for horizontalLayout_sdrPaperWhite, which is a
QLayout rather than a QWidget. Remove the tabstop assignment to fix the
warning.
From Qt 6.4 release notes:
QScreen::name() now returns the user friendly name instead of the GDI
device name on Windows. This is consistent with other platforms and also
obeys the documentation.
--
Additionally, this scraps the visual indexing on monitors as the
numbering is not guaranteed to match any other GUI or API. A similar
change was recently made in the Display Capture source on Windows.
These use printf for some reason. Instead of always printing them and
having them clutter the log, blog them with debug level. They don't
appear in log files anyway.
Starting with macOS 13 the VT hardware encoder has all the capabilities
it needs for both streaming and recording, so we can start recommending
it in AutoConfig.
To avoid the user having lookahead enabled with no way to disable it,
change the Simple Output Mode NVENC Preset from P6 to P5.
Follow up to 8806738a04.
The index is not reliable. The id persists better, so use that.
Also remove matching against the first monitor if the expected monitor
is not available. That feature seems like a good way to get doxxed by
accident.
Also modifies UI.
This allows the direct use of passphrase (SRT & RIST) used for
encryption, user + password (RIST) as well as streamid (SRT).
Previously, these parameters had to be set in the URL in the form:
URL?option1=value1&option2=value2.
They still can but there is also the option to set them in the stream
key and username/password fields.
SRT:
- the stream_id is set in the stream key (more info on it: [1]);
- the encryption passphrase is set in the password auth field.
RIST:
- the encryption passphrase is set in the stream key;
- the srp_username and srp_password are set in the user/password auth
fields [2].
Additionally, some error logging has been added when there's a
disconnect caused by a wrong password.
Lastly, this solves a bug when auto-reconnect is set and a wrong
passphrase is provided for srt; the output would keep trying to
reconnect. With this commit, an OBS_OUTPUT_INVALID_STREAM signal is
emitted and the stream is immediately stopped.
[1] https://github.com/Haivision/srt/blob/master/docs/features/access-control.md
[2] https://code.videolan.org/rist/librist/-/wikis/Authentication-and-the-ristsrppasswd-Utility
Signed-off-by: pkv <pkv@obsproject.com>
Mapping a GPU resource for CPU read immediately after GPU write creates
a large stall on the graphics thread. Use a small circular buffer, and
read the oldest frame instead.
The old NVENC preset "Default", labeled in OBS as "Performance", maps to
the new P3 preset when not using multipass. Since we previously only
enabled multipass/two-pass on "Max Quality", we can map this to P3 in
all cases.
This commit also modifies UI.
8dda8d3500 added a few functions to get the last
recording/replay/screenshot path, but it should return allocations
because it's possible for the data to be modified at a later point.
- QSS changes fix background color on the stats dialog.
- Making OBSBasicStats derive from QFrame fixes the background color
and round bottom corners on the stats dock.
Another call to getenv, as well as a call to the POSIX functions
setenv(), unsetenv(), and putenv() may invalidate the pointer
returned by a previous call or modify the string obtained from a
previous call.
https://en.cppreference.com/w/c/program/getenv
Selection state can change by main thread while UI thread (which
calls DrawSpacingHelpers) tries to evaluate the amount of selected
items. Get amount of selected items by enumerating over the scene data
instead (which stays within the graphics thread).
The old preset "mq" was "Max Quality", which used the old HQ preset with
two-pass enabled. The old preset "hq" was "Quality", which used the old
HQ preset without two-pass. Of the two, "mq" would have been considered
"slower" or "higher quality" than "hq", so let's swap these entries.
Casting a floating point type to an integer type has undefined behaviour
if the value does not fit into the destination type.
As the volume meter is initialized with floats values representing +inf
(as makes sense for a dB meter), values should be explicitly clamped
to integer boundaries.
When the Advanced Output configuration is set to use custom FFmpeg
output, automatic remuxing is disabled. Unfortunately this check will
also take place even if Simple Output is used (as the value is set in
the configuration data, but is not "active").
This check ensures that the check for custom FFmpeg output is only
applied when Advanced Output is enabled.
In the scene tree, we currently prevent deselecting items by
automatically reselecting a new one to workaround a regression in Qt 6.2
that would let users unselect items even in SingleSelection QItemViews.
When clearing however, we explicitly want to unselect the currently
selected item, so we should avoid reselecting it in the SceneTree.
The icons had the wrong name in the qss files. The docks were missing
the icons on at least Linux. I have no idea why the dock icons still
worked on Windows though.
Deleting a filter will trigger a visibility change, which will also
trigger a focus change if the focus has not been on the list itself
(e.g. after interacting with the property view).
When an async filter list is available in the view, it will be the first
candidate to receive focus. If this list is empty, we hide the property
view by default and set the view to a `nullptr`.
When the call for the visibility change returns, we need to check for
this possibility, as another event might have hidden (and deleted) the
view already.
Without this change the decay rate would only be updated when an audio
source is added or when the volume meter itself is changed (e.g. from
horizontal to vertical layout).
- Make the settings a scroll area. This makes it work on smaller screens and
if more items are added in the future, the dialog doesn't get bigger.
- Made the additional settings label bold to distinguish better.
Also removed the colon, as I felt it wasn't needed because it is
now bold.
- Made the margins consistent between the settings and events pages
- Made the scrollbar show only when needed in the events page
- Moved the remember settings checkbox to the top of the settings because
it just seems better to be there.
The Enter key is connected to the `Edit` function and is handled by
Qt with the highest priority in its key event handler. Alas the boolean
return value is not propagated to the shortcut handling system, so
the key event will always be consumed and as such the user will be stuck
in editing state.
To fix this, `Edit` needs to behave like a toggle, saving the current
state of the input at a repeat press of Enter while in editing state.
By default Qt will hand off key events to platform-native input methods
on macOS because the OS or additional software can intercept key input
and transform it (e.g. the international variations popping up when
holding down the key for certain letters).
This functionality can lead to certain key combinations being ignored
because they don't call the delegate methods implemented by Qt to
handle the input after it's been interpreted by the Input Method.
Disabling Input Methods for hotkey input fields fixes this issue, as the
native input methods are bypassed entirely and the key events are
handled by the widget and its keyboard events directly.