Commit f1223ca566
(UI: Set fragmented MP4/MOV as default for beta/rc)
changed RecFormat to RecFormat2.
This conflicts with the use of RecFormat introduced in
d18b38e784
(UI: Enable multiple audio tracks in Simple Output recording).
This fixes the issue.
An unused var is also removed.
Signed-off-by: pkv <pkv@obsproject.com>
Per request of our UI design chief, the tracks from Standard Recording
(Advanced Output) are moved below the audio encoder field.
Additionally, for consistency with Simple output, the video encoder
field is moved above the audio encoder (suggestion from Rodney).
Signed-off-by: pkv <pkv@obsproject.com>
This adds support for multiple audio tracks in Simple Output for
recordings.
This is enabled for all quality presets (including "Lossless") except
"Same as Stream".
This is also enabled for the Replay Buffer.
An exception is made for flv recording format since it only allows a
single audio track.
The recorded track (and streaming track) is then Track 1 as before.
Signed-off-by: pkv <pkv@obsproject.com>
If the user clicked away from the source, while the transform dialog is open,
the whole dialog would be disabled. The user then couldn't click close or
press escape to close the dialog. The only way for them to close it was to
click on another source to re-enable it.
In advanced mode codecs that are incompatible are disabled.
In simple mode codecs are disabled if recording encoders are used,
but containers are disabled when stream encoders are used.
5a40934 refactored slots around services but a
on_service_currentIndexChanged() was not replaced by ServiceChanged().
The latter contains the code that was in the former before the refactor.
5a409347d5
Use the render path that preview uses for non-preview rendering, which
uses the GPU to rescale rather than the CPU and pulls the image from the
GPU before pixel format conversion happens. This means it's no longer
necessary to select BGRA to use the keyer anymore.
The tooltip string describing the filename format had many lines. It
made difficult for translators to update newly added format strings.
This commit separates the string so that each format string has each
translation.
Also construct HTML so that the column aligns.
The play, pause and restart shortcuts were being called as global
shortcuts, being triggered no matter what. This fixes this by calling
the shortcut actions only when the media controls widget has focus.
When creating a group, a newly allocated group `sub_scene` is released
just after calling `obs_scene_add_internal`.
If another thread released the scene-item, which is the sub_scene,
use-after-free might happen.
"New Socket Loop" and "Low Latency Mode" RTMP options are only available
on Windows.
Those options should be ignored and forced-disabled on non-Windows
builds.
Use the QAction provided by QDockWidget with new Qt connection rather
than creating a new one for each dock.
Separate extra browser docks from extra docks, the latter is meant for
plugin/integration docks.
Expands the filter_compatible check to return false if the source isn't
async and the filter is not an audio filter, filtering out e.g. the
"Video Delay (Async)" filter from browser sources (which have audio but
don't have async video).
Amends 845e056551.
Passing the parent of a QLayout sets it directly as the top-level layout
(as per the QLayout docs). This is obviously not what is intended here.
Luckily it doesn't even work since the main window of course already has
a layout which would need to be explicitly removed before, but it makes
Qt yell at us for trying.
Currently, the manifest URL on Flathub Beta website points to the
deprecated manifest hosted on Flathub. The flathub::manifest key
is undocumented attribute that will update the website to use the
proper location.
This key will not affect appstream other than providing enough
information to the Flathub website.
Adds a NtMapViewOfSection hook which we can use before DLLs are loaded
to decide whether to abort the process. This is useful for blocking
known problematic DLLs that cause crashes. In addition, the PE timestamp
can be checked to block only older DLLs such as older versions of Vtuber
virtual cameras with known deadlock bugs.
A simple counter of each DLL is used for logging purposes. Since DLLs
can be blocked at any time, the output is only logged on exit of OBS.
When not using binary mode (i.e. text mode) CRLF will be converted to
LF, which means that the size provided by tellg() is no longer correct,
and reading prematurely hits an EOF and sets the fail bit.
If OBS is set to minimize to system tray on startup and studio mode is
enabled, the preview would be disabled when showing OBS, if the preview
in non studio mode was disabled.
If the scene item was rotated greater than 45 degrees, and flipped
vertically or horizontally, the spacing helpers would be drawn
incorrectly. This fixes the issue by checking the scale before
the rotation, instead of after.
fstream is not thread-safe and the act of writing the string and the
newline are two separate operations which could execute concurrently in
multiple threads, resulting in lines joining together followed by two
newlines. Due to the presence of a static mutex, this also removes
inline on the function.
Portable mode is meant to be separated from the rest of the system, and
as such it doesn't make sense to load globally installed plugins there.
On Windows, there currently are only two major plugins that install
themselves there. Plugins installing themselves there is good, but it
currently also means that even portable instances load them which can
make testing and debugging in a clean environment annoying.
Previously, all the functions of portable mode wouldn't work if compiled
without it, but the log still show it as enabled if the argument was
set. This could lead to confusion.
Additionally, we don't even show the option in the help string (--help),
so it should just be a no-op.
The sliderMoved signal doesn't trigger when clicking on the slider, only
the valueChanged signal. According to QTBUG-72995 this is intentional,
since the documentation states that sliderDown also needs to be true for
the sliderMoved signal to be triggered. As for why sliderDown isn't true
when clicking, or why that would even be necessary for a signal that
should trigger when the slider is moved (and it very clearly moves)
remains a mystery.
Also gets rid of the wrong usage of the on_foo_bar slot declaration,
which should only be used for signals where the sender is part of a UI
file and it gets connected automatically. While it of course is possible
to connect it manually, this is against convention and can cause
confusion. In this case it was particularly wrong since even if tBar was
part of a UI file (which it isn't), the method should have been called
on_tBar_valueChanged instead of on_tbar_position_valueChanged.
These widgets are all children of updateSettingsGroupBox, meaning they
get deleted when updateSettingsGroupBox gets deleted. This means that
the first two calls are unnecessary and the third one segfaults as
updateChannelLabel is gone already.
Just delete the parent widget instead.
Before calling the button callback, two values are null-checked but when
the property is created with an id (const char*). Those values are null
which prevent the callback from being called.
When adding to the queue, this triggers rowCountChanged which then
calls canClearFinished, reading undefined memory for state if this is
not set. The correct state is set immediately after by checkInputPath.
Detected by UBSan.
The crash reporter made with Qt was introduced in 824c7b0, but then was
quickly replaced by a native OS implementation in d42a7ce. This code has
been lying around ever since.
If an user exits the source tree edit mode, without changing the name,
the scene item would become undraggable until the scene is refreshed.
We were setting the focus to just the label, not the whole widget.
Qt 6.2 introduced an issue where SingleSelection item views would
deselect the current item if the user clicked on empty area in the
widget.
This was very confusing in the scene tree as it was now possible to
unselect the current scene. A workaround for this in OBS was added in
08e4ee6 and expanded on in dc30cf0, but being quite hacky it never was
the perfect solution.
I since dug into Qt and fixed the issue upstream in qt/qtbase@f11e5435c7
for Qt 6.4.3 and newer, so we can remove the workaround when using those
versions (with the long term goal of removing the code altogether).
In some cases, `QToolbar::widgetForAction` may return `nullptr`. This
causes a crash on affected system.
To mitigate this, we check for `widgetForAction` result and skip
operating on a NULL widget.
If a scene or group is selected, disable the properties button in the
source toolbar. This also does a refactor of the function to enable/disable
the toolbar buttons.
Makes macOS aware that we're using either light or dark theme to adjust
native dialog colors accordingly.
Co-Authored-By: Patrick Heyer <PatTheMav@users.noreply.github.com>
Hides the following items if source is only audio:
- Transform menu
- Resize output (size of source)
- Scale filter menu
- Blending mode menus
- Projector menus
- Screenshots
- Interact
Previously, an output that does not implement `info.get_output_type`
would result in these log messages saying `(null)`. This uses the actual
ID directly from the output itself instead.
Also removes two extra calls to `obs_encoder_set_video()` as they are
redundant and unnecessary.
If the output is paused the average bitrate will be zero, resulting in
infinite time until disk is full and int overflows. Similarly, if no data
has been collected yet, the result will be NaN and undefined behavior.
Qt is not smart enough to disable qt5 platform plugins when users
blindly ask for them, which causes users to be unable to start OBS.
Instead lets kindly disable broken platforms on their behalf.
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.