Deleting the cefWidget in the panel's destructor can result in a crash
on macOS because the underlying NSView might have been destroyed in
memory between Qt closing the QDialog and the destructor call.
Moving the browser destruction into the accept and reject calls ensures
that CEF can clean up its state _before_ Qt tears down the view
hierarchy.
This is actually a MainConcept redistributable and not related to Adobe.
Unfortunately Elgato Game Capture HD software relies on this dependency
when presenting the DirectShow device to OBS, so we unintentionally
blocked it from loading.
Instead of outright blocking, we now block only older versions than the
version shipped by Elgato, which has hopefully been patched to fix the
random crashes.
The `done` event does not emit a `closeEvent`, but saving is only
implemented in that event handler. Changing this to `close` correctly
triggers the default QWidget event and thus settings are saved.
Xcode 14.3 and the macOS 13.3 platform SDK introduced a few breaking
changes:
* Updated AppleClang emits warnings about unqualified std cast calls
when using C++ - as `move` is too broad a word, developers are to use
`std::move` to make this explicit. Alas this is exactly what `json11`
uses and because that library is archived, there is no possibility
of an upstream update.
* Apple guarded calls to old screen capture APIs as "available but
deprecated", but seems to have chosen the wrong lower version
boundary: The calls are flagged as being available for macOS 13 and
macOS 14 only.
To fix this, the existing macOS platform SDK header is replaced by a
local copy that uses macOS 11 as the lower boundary (the oldest macOS
version supported by obs-studio anyway)
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.