This limits the length of the name label in the advanced audio
dialog to 80 characters, so the dialog doesn't get too wide. If the
name is truncated, "..." are added at the end of the label, and the
label's tooltip is set to the full name of the source.
This hooks the platform specific events in order to close the obs
display more accurately. Earlier attempts on hooking visiblity, but Qt
does not ensure that visibility is changed before the surface is
destroyed. So we ended up racing with the EGL driver and on some
drivers if you lose the race they hang.
Also only force display creation if the display is actually visible.
When a source type is not video/drawable (or is missing) this would
force the display to be created for the blank window and also hang.
Finally force closure of the preview displays during scene cleanup to
avoid similar ordering issues in Qt. Qt has even less order guarentees
during close and we are sure that displays are no longer needed at this
point in the UI.
Adds %s which replaces the keyword with the current unix epoch time.
The %s keyword is common in languages like PHP and Python, and even
some C implementations, but it is not standard so this is a fallback.
This option regularly confuses users, who accidentally select it and
then ask why they have hundreds of 2-4 second video clips in their
output folder. HLS output format to file is a pretty niche use case,
so let's keep it in advanced mode only.
Fixes an issue where when "Duplicate Scenes" and "Switch Preview/Program
after Transitioning" were disabled and preview and program were the same
scene, pressing "Transition" would just disable the menus without
anything happening. This is because a transition is initiated, but never
actually starts transitioning (since both scenes are the same). The
check for this already exists, but was only triggered in swapScenesMode.
Also renames the newScene variable to lastScene to make it more obvious
what it actually is (especially since now, it's not only the new scene
anymore).
Removing the first call to `video_output_stop` prevents the `data_mutex`
field in `struct video_output` from being destroyed while still in use.
The `render_preview_source` function will call `video_output_lock_frame`
upon that mutex and encounter a NULL pointer exception.
Co-authored-by: Paul Hindt <paulh@aja.com>
When OBS has been connected to a YouTube account, the Manage Broadcast
dialog becomes available. Opening and closing this dialog leaks about
2-3 MB of memory each time. This happens because the dialog is never
deleted, and a new object is created every time the dialog opens.
If we set Qt::WA_DeleteOnClose on the dialog, then the dialog->exec()
call would call delete this. However, if the dialog->Valid() call
returned false (this should currently be impossible), then exec is never
called, so it would not clean up.
To fix this, make the dialog stack-allocated instead of using new and
delete.
Detected by clang-analyzer.
For Keyboard shortcuts with Ctrl as the primary modifier, the secondary
modifier should be Shift, not Alt. Alt could be used as a tertiary in
the future if really necessary, but generally it should be avoided.
The old names were simple_h264_recording, simple_h264_stream,
recording_h264, and streaming_h264.
The new names are simple_video_recording, simple_video_stream,
advanced_video_recording, and advanced_video_stream.
Original code uses simple `ifdef` pattern as well using the preprocessor
definition in a conditional check. With the rework, the definition was
set to an empty string (if the build flag is not enabled), which leads
to it being evaluated as "true" all the time.
This change uses simpler definition check and fences off code relying
on the flag being enabled.
Due to the way the frontend works, the logic for inserting the row for
the group in the UI was dropped since the new item_add message will
insert one automatically since it forces a refresh of the scene items.
The reliance on that implicit row insertion when grouping items is a
bit of a code smell, although the alternative would be to add logic to
disable handling the signal for that instant, which is probably a
worse choice.
This removes the min and max size properties from the YouTube "Manage
Broadcast" dialog. Such values depend on the actual content or very
precise layout management, making hardcoded values prone to being
incorrect. To avoid incorrect values we should avoid these settings on
top level widgets/windows.
This pattern can lead to crashes on Wayland compositors like
GNOME which are strict about these values being correct.
Adds the ability to move a selected item 10 pixels in the preview when
holding shift while using the arrow keys, instead of going just 1 pixel
per step.
HLG output uses MovieLabs-recommended procedure.
- If peak luminance is greater than 1000, use maxRGB EETF to 1000.
- Otherwise, don't tonemap.
- Then use normal HLG conversion procedure with gamma 1.2 (1000 nits).
This commit accomplishes three different things:
- Makes it much less difficult to communicate service settings
between the UI and the plugin.
- Refactors some code and makes it cleaner and easier to modify to our
needs (although there is still a lot of work to do on that front
because of heavy code duplication issues between auto-config and the
stream settings pane).
- Significantly reatly reduces the number of times the json file has to
be opened and parsed.
This also kind of denotes a bit of a failure on the plugin communication
aspect. The properties system is too limited and jank for a lot of
things we would like to do at times.
If the user would minimize to tray instead of taskbar, the
window would flash when clicking show in the tray menu, and
the preview would be disabled. This would only happen on Linux.
The original PR was made with time specified in seconds because it was
useful to debug the behavior. For production, assuming most users want
to specify 10 minutes or more, the time should be specified in minutes.
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.
window-basic-properties was written in the earliest days of OBS. To
make it easier to navigate & adjust, this moves all the structural
code into a new .ui file and out of the C++ code.
This also modifies the ButtonBox in Filters to use matching buttons.
Verbosity of stdout was previously hardcoded to INFO, while log viewer
and log files had correct verbosity. This makes the behavior of
--verbose make sense in all places.