Commit graph

3395 commits

Author SHA1 Message Date
Matt Gajownik 7d9f8e7cac UI: Set browser dock title in constructor
Works around a bug in Qt where setWindowTitle called on a native window
that hasn't been initialised yet causes the title data to be lost,
resulting in the window's title never being set.
2023-08-15 12:27:18 -04:00
Norihiro Kamae dfce9b929a
UI: Fix crash at resizing display followed by destruction on macOS
The resize event was triggered during the shtudown of OBS. A commit
9f330050ef moves the actual resize code in `gl_update` to the main
thread without synchronizing between the main thread and the graphics
thread. When the display context is destroyed just after the resizing,
the delayed resize code can read the destroyed display context.
As a workaround, this commit will destroy the display context at the
earlier timing of the shutdown process.
2023-08-15 14:01:11 +09:00
Norihiro Kamae fd502cbd4d
UI: Fix crash at render_display while shutdown on macOS
The display context was sometimes created again by a resize event after
destruction from `OBSBasic::closeEvent`. That resulted in the display
context alive until reaching the destructor of the `OBSQTDisplay` class
and caused a crash in `render_display` on macOS. To avoid this, destroy
the display context at the event `SurfaceAboutToBeDestroyed` and let not
create the display context again.
2023-08-15 13:40:09 +09:00
Norihiro Kamae fa17168ba2
UI: Removes the workaround of not receiving expose event
The commit e67fdbca79 is a workaround for QtWayland bug that the
`QEvent::Expose` was never received on a certain condition.
The bugfix was introduced to QtWayland 6.1.0 so that the workaround is
not necessary for now.
2023-08-15 13:12:34 +09:00
Translation Updater ecf914dd67 Update translations from Crowdin 2023-08-13 14:09:15 +00:00
prgmitchell 2a9b9c9298 UI/importers: Ignore empty Streamlabs hotkeys
Ignore empty hotkeys when importing a scene collection file from
Streamlabs Desktop.
2023-08-12 22:31:01 -04:00
Matt Gajownik b429d00440 UI: Show link to release notes in Help menu 2023-08-12 16:46:38 -07:00
Friedhelm Birth a599dd50f6 UI: Add high frame rate 119.88 fps to capture device properties 2023-08-12 16:16:24 -07:00
Friedhelm Birth 11ae49da73 UI: Add high frame rates (120, 144, 240) to general video properties 2023-08-12 16:16:24 -07:00
gxalpha 6721154924 UI: Use QCheckBox::toggled signal for checkbox changes
Like in 4f8b17d61, "toggled" is the signal that listens for changes
however they may have happened (including through things like
accessibility software), whereas clicked only is emitted on mouse
clicks. We should react to any kind of change, whatever prompted it.
2023-08-12 13:58:06 -04:00
gxalpha d2ef4d21b3 UI: Don't cap auto-config wizard FPS whole number precision at 2
Capping the precision for whole numbers results in scientific notation
being used for any number that's larger than what can be displayed with
the given precision. In case of 2, that would be anything larger than
99, resulting in 120 for example to be shown as 1.2e+02.
Let's not cap the precision for whole numbers ourselves and just use the
default value (which at the time of writing would be 6).
2023-08-11 21:36:44 -04:00
gxalpha 4f8b17d612 UI: Use QGroupBox::toggled signal for group changes
The QGroupBox::clicked is specifically for mouse clicks. This means that
it's not emitted if the "checked" property is modified through other
means than the mouse, for example programatically or through
accessibility software like VoiceOver.
However, we do want to catch such events, so the QGroupBox::toggle
signal (which as per the Qt documentation is the notified signal for the
"checked" property) is the appropriate one to use.
2023-08-11 21:10:11 -04:00
gxalpha 49ef1d4b98 UI: Set loading to true when loading accessibility settings
When loading a settings pane, "loading" should be set to true to stop
signals being emitted by settings changes to trigger while the settings
are loading. This should have always been set here as well, but wasn't
detected so far because currently there are no settings in accessibility
that have signals connected that track changes.
2023-08-11 21:10:11 -04:00
Lain b79e6d219f UI: Fix YouTube not saving stream key in auto config
Commit 85f9a8661b did not take into account whether YouTube was using a
stream key or not, it would prevent the auto-configuration dialog from
being able to save a YouTube stream key if the user opted to enter in a
stream key instead of connecting their YouTube account.

This simply fixes that by checking to see whether or not the user fully
connected their account or not.

Fixes obsproject/obs-studio#6406
2023-08-11 16:01:37 -07:00
gxalpha b962daa3c8 UI: Use static function instead of macro to set color
Macros can be hard to read and are usually not very friendly to use in a
debugger. Using a static function instead gives the advantage of better
syntax highlighting in IDEs and better debugger support.
2023-08-11 11:42:18 -04:00
derrod 014f7683cf updater: Pass through parameters to restarted OBS instance 2023-08-11 00:34:36 +02:00
derrod 38f41f4f94 UI: Copy OBS command line arguments to updater launch 2023-08-11 00:34:36 +02:00
PatTheMav 7628265099 Update .clang-format rules for ObjC files for version 16 2023-08-10 17:12:30 -04:00
Ryan Foster 64139a6bbd CI: Update to clang-format 16
This commit also modifies UI, libobs, and plugins.
2023-08-10 16:07:25 -04:00
gxalpha 2404036575 UI: Make simple mode settings warnings float at bottom of page 2023-08-09 20:38:59 -04:00
tytan652 db8ae46ca8 UI: Avoid showing YouTubeAppDock each time settings are updated 2023-08-05 18:32:18 -07:00
田七不甜 e8dbeede76 UI: Make title bar "SAFE MODE" translatable 2023-08-05 17:21:22 -07:00
Ryan Foster 2f8ea190b2 UI: Update CMake minimum to 3.22
Since Ubuntu 22.04 is now our minimum supported Ubuntu version, and it
has CMake 3.22, let's make CMake 3.22 the minimum CMake version.
2023-08-05 16:45:46 -07:00
tytan652 049f4454d4 UI: Fix YouTubeAppDock restore dock state 2023-08-05 16:44:16 -07:00
gxalpha 6a42d88ca7 UI: Don't call obs_source_get_output_flags on a NULL source 2023-08-05 16:30:44 -07:00
Lain 78cb2aa361 UI: Fix case where cef func may not be present
Due to a particular... plugin we all know and love, the new
QCefWidget::executeJavascript() function may not actually be present as
it should be. So, we have to verify that it's available, and only use it
in that case.
2023-08-05 04:35:31 -07:00
tytan652 c946090203 UI: Use new add dock path for YouTubeAppDock 2023-08-05 03:46:50 -07:00
Lain e86b2950a2 UI: Fix build error (forgot macro) 2023-08-03 18:43:01 -07:00
Lain 0c6fa0a2ba UI: Fix YouTubeAppDock crash
Apparently the YouTube app dock thing didn't take into consideration the
fact that the user may have the browser source available, but may not
have browser docks available (via the `cef` global). This is because
certain system configurations do not support browser widgets, such as
Wayland on Linux.

(Lain note: There's multiple things I'm unhappy about here. I'm mostly
going to blame myself for multiple reasons.)
2023-08-03 18:25:25 -07:00
Lain 9d2715fe72 frontend-tools: Disable properties deferring in script dialog
Prevents scripts from being able to defer their settings in the
properties view (because there's nothing to really defer to).
2023-08-03 16:28:00 -07:00
Lain 2a2472e326 UI: Add func to disable properties view deferring 2023-08-03 16:27:55 -07:00
Lain d2d3e46e14 Revert "UI: Only defer property updates for input and transition sources"
This reverts commit 58fb63030c.

This is not the ideal fix for the fact that scripts can use a deferred
update flag because it makes it so that filters in general cannot use
flags. We need to disable this via other means.
2023-08-03 16:09:31 -07:00
Yuriy Chumak 81b588137a UI: Add "YouTube Control Panel" dock panel
New dock panel with integrated youtube studio live control room.
This commit also modifies CI files.
2023-08-02 17:49:05 -07:00
derrod c3ac912065 UI: Refactor getting the default encoder for a format 2023-08-01 11:43:38 -07:00
derrod 036f7e8147 UI: Clean up remaining C-isms in FFmpeg utils 2023-08-01 11:43:38 -07:00
derrod 2f78bb7991 UI: Replace FFmpeg encoder alias with long name
The alias is not really helpful and sometimes confusing, e.g. for HEVC
(without libx265) it ends up being "hevc_nvenc (hevc_amf)" since it just
contains the name of the default encoder. So instead of using the name
of the default encoder, show the full name of the encoder instead.
2023-08-01 11:43:38 -07:00
derrod c20bf0271c UI: Refactor FFmpeg utilities codec/format enumeration 2023-08-01 11:43:38 -07:00
derrod c1cd268532 UI: Fix matching FFmpeg formats/codecs 2023-08-01 11:43:38 -07:00
derrod f0407dd1cd UI: Migrate from libff 2023-07-30 15:58:21 -07:00
cg2121 5e198db647 UI: Add new scene at current row
Instead of having a new scene at the bottom of the list, have
it added after the current item.
2023-07-29 17:20:47 -07:00
Exeldro 91f00eac87 UI: Split toggle preview program hotkey into hotkey pair 2023-07-29 16:48:25 -07:00
Lain 346b93c9c4
Merge pull request #8689 from gxalpha/no-more-signal-slot-macro
UI: SIGNAL and SLOT macros begone!
2023-07-29 16:32:56 -07:00
Lain 106e28d60f
Merge pull request #9302 from derrod/ui-update-nlohmann
UI: Migrate WhatsNew, update branches, and Windows update check to nlohmann JSON
2023-07-29 16:06:28 -07:00
Kurt Kartaltepe 6034aa4164 UI: Avoid auto config selecting QSV on linux
Previously we left the QSV -> x264 in the fallback function to deal with
the autoconfig wizard possibly selecting QSV outside of the UI. But this
actually runs for both recording and streaming every time obs starts,
reseting user's config if they selected QSV for recording.

Instead avoid recording from being selected in the UI and by the
auto-config wizard, and revert changes to the fallback function.
2023-07-27 02:34:30 -07:00
Penwywern 6f885770f8 UI: Fix crop on flipped sceneitems in bounding boxes
Same as previous commits, flipped sceneitems in bounding boxes ought
to be treated as not flipped for the purpose of UI interaction in
order to function correctly.
2023-07-25 15:28:16 -07:00
Penwywern a62993d513 UI: Fix drawing of pixel guides on flipped sceneitems in bounding boxes
Flip state of the item should be ignored when drawing guides for items
in bounding boxes, as the UI uses the countour of the bounding box, not
of the flipped item in it.
2023-07-25 15:28:16 -07:00
Penwywern 8d0f043ac6 UI: Fix draw and find of rot handle with bounding box and flip
The preview interaction and decoration of items inside bounding boxes
is based on the bounding box state, not on the item's state. As such,
the flip state of the item should be ignored when drawing and finding
the rotation handle, since the bounding box itself isn't flipped, only
the item inside the bounding box.
2023-07-25 15:28:16 -07:00
Penwywern 28a48c048d UI: Fix rotation handle find angle
The angle at which the rotation handle is drawn is independant from the
sceneitem's flip. As such, this changes `FindHandleAtPos` to use the rotation
angle of the item, free of its flip, instead of doing post-rotation
corrections. This fixes a bug where when the item was horizontally flipped,
the handle was not "found" at its drawn location.
2023-07-25 15:28:16 -07:00
James Hurley 488a96bc4b UI: Add IPv4 / IPv6 selection setting
This commit adds a field in Settings -> Advanced called
'IP Address Family' that allows users to select IPv4 and
IPv6, IPv4 Only, or IPv6 Only.
2023-07-24 17:10:30 -07:00
derrod 8955338624 UI: Migrate WhatsNew to nlohmann JSON 2023-07-23 09:24:33 +02:00
derrod 72284a4837 UI: Migrate branches to nlohmann JSON 2023-07-23 09:24:33 +02:00
derrod 01b21f67ff UI: Migrate Windows update check to nlohmann JSON 2023-07-23 08:54:17 +02:00
derrod 8ec0d7fd1b updater: Update manifest struct for use in UI 2023-07-23 08:54:17 +02:00
derrod 2f5038318e UI: Remove D3D11 shader cache folder creation 2023-07-22 18:04:08 -07:00
derrod d1dd7dd6d3 updater: Migrate to nlohmann JSON 2023-07-23 02:18:53 +02:00
Richard Stanway e7a3ffdb54 libobs-d3d11: Implement shader cache
Co-Authored-By: derrod <dennis@obsproject.com>
2023-07-22 16:59:31 -07:00
Lain 2f9df1372d
Merge pull request #8455 from derrod/safe-mode
Add Safe Mode
2023-07-22 16:56:40 -07:00
derrod bdc2da6e48 updater: Update installed version in registry 2023-07-22 16:33:19 -07:00
gxalpha d25a4ddae1 UI: Fix remaining status bar nits
Amends 1c8407183 to address the remaining points brought up on the Pull
Request that were not changed before merging.
2023-07-22 16:24:30 -07:00
gxalpha 633b9e39f7 UI: Don't clear lastService immediately after setting it
Fixes a bug where when you clicked "Show more..." in the service
settings combobox, the currently selected service would be changed to
the first service in the list.
2023-07-22 16:19:26 -07:00
derrod 396cfdb416 UI: Add Safe Mode 2023-07-21 23:22:07 +02:00
gxalpha a3991f9db8
UI: Replace SIGNAL and SLOT macros for HookWidget methods 2023-07-21 13:19:52 +02:00
gxalpha ef26f14f18
UI: Replace SIGNAL and SLOT macros for AddProjectorMenuMonitors method
A small refactor of AddProjectorMenuMonitors, as template functions need
to be fully defined in header files.
Also makes the function static as there is no point of it being a
non-static member function. In theory it could also be moved out of
OBSBasic but there isn't really a better place for it so let's leave it
where it is for simplicity.
2023-07-21 13:19:52 +02:00
gxalpha 61781d154d
UI: Replace SIGNAL and SLOT macros in aja-/decklink-output-ui 2023-07-21 13:19:52 +02:00
gxalpha 34f871e605
UI: Replace SIGNAL and SLOT macros in frontend-tools 2023-07-21 13:19:52 +02:00
gxalpha 0513e848d9
UI: Replace SIGNAL and SLOT macros in settings 2023-07-21 13:19:52 +02:00
gxalpha a0ef6e1baa
UI: Replace SIGNAL and SLOT macros in importer 2023-07-21 13:19:52 +02:00
gxalpha f7a7c652ab
UI: Replace SIGNAL and SLOT macros in filters 2023-07-21 13:19:52 +02:00
gxalpha d97d3a1871
UI: Replace SIGNAL and SLOT macros in window-basic-main 2023-07-21 13:19:50 +02:00
gxalpha e22ba27f2a
UI: Replace SIGNAL and SLOT macros in auto-config 2023-07-21 13:16:04 +02:00
gxalpha d5447fb2e5
UI: Replace SIGNAL and SLOT macros in transitions 2023-07-21 13:16:04 +02:00
gxalpha 24c97ed31b
UI: Replace SIGNAL and SLOT macros in about dialog 2023-07-21 13:16:04 +02:00
gxalpha e8147a9abb
UI: Replace SIGNAL and SLOT macros in properties-view 2023-07-21 13:16:04 +02:00
gxalpha e467f17501
UI: Replace SIGNAL and SLOT macros in obs-app 2023-07-21 13:16:04 +02:00
gxalpha 7f5fe30e36
UI: Replace SIGNAL and SLOT macros in remux
Also removes a GCC 4.8-workaround that should have been solved using
.data() on the QPointer instead of using a temporary variable.
2023-07-21 13:16:04 +02:00
gxalpha c4d2d98720
UI: Replace SIGNAL and SLOT macros in projectors 2023-07-21 13:16:04 +02:00
gxalpha cddb9dae45
UI: Replace SIGNAL and SLOT macros in missing files 2023-07-21 13:16:04 +02:00
gxalpha 43c692d386
UI: Replace SIGNAL and SLOT macros in media controls 2023-07-21 13:16:04 +02:00
gxalpha ac170a2d83
UI: Replace SIGNAL and SLOT macros in custom widgets 2023-07-21 13:16:04 +02:00
gxalpha fc07e59754
UI: Replace SIGNAL and SLOT macros in auth 2023-07-21 13:16:04 +02:00
gxalpha c1be5827c0
UI: Replace SIGNAL and SLOT macros in adv-audio-control 2023-07-21 13:16:03 +02:00
Richard Stanway b7fddceb67
updater: Treat mapped file errors as a sharing violation
For whatever reason there exists a different error code if the file has
been opened as a mapped file, so we need to handle it.
2023-07-21 03:02:31 +02:00
cg2121 cb8b5ba9cd libobs: Change return type for getting filter index
This changes the return type for getting the filter index from a
size_t to an int. This makes it easier for developers to use,
as an invalid index just returns a -1.
2023-07-20 13:21:14 -07:00
cg2121 1c84071830 UI: Redesign status bar
This redesigns the status bar to look more modern.

Co-authored-by: Warchamp7 <warchamp2003@hotmail.com>
Co-authored-by: Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
2023-07-19 17:53:57 -07:00
gxalpha 9d611a064f cmake: Remove Qt version selection and Qt 5 support 2023-07-19 11:56:54 -04:00
gxalpha 79ab526f03 UI: Remove remaining Qt 6 ifdef 2023-07-19 11:56:54 -04:00
gxalpha 6a6cb3edcd UI: Avoid QT_TO_UTF8(QTStr()) double conversion 2023-07-18 15:07:25 -04:00
cg2121 04629afe68 UI: Adjust size policy for properties view
Now the properties won't be squished when making the properties
dialog smaller.
2023-07-17 17:46:46 -03:00
PatTheMav 902843634c
CI: Add new build and packaging scripts for macOS 2023-07-17 19:49:18 +02:00
cg2121 c33fa8bfa2 UI: Fix transform shortcuts for audio only sources
The edit, copy, paste and reset transform shortcuts would still work
for audio only sources, even though the menu was hidden for these.
2023-07-17 10:22:04 -07:00
Richard Stanway d997a56fb6 UI: Destroy the frontend API after OBS_FRONTEND_EVENT_EXIT
The frontend API was never explicitly cleaned up which has lead to
several crashes from plugins continuing to call it even after OBS itself
has been destroyed. We now destroy the API after the exit event, so
further calls by plugins will be no-ops instead of potentially accessing
destroyed OBS state.

This also required some changes to our own use of the API, as we relied
on the OBSBasic destructor to clean up some callbacks, by which point
the API should have already been destroyed.
2023-07-15 16:54:51 -07:00
gxalpha 84f1e962a1 UI: Don't set fragmentation movflags in lossless mode 2023-07-15 16:36:35 -07:00
gxalpha f7d5d80b04 UI: Localize font picker window title 2023-07-15 16:20:04 -07:00
derrod 593664dcdb clang-format: Set AllowShortLambdasOnASingleLine to Inline 2023-07-15 16:14:55 -07:00
derrod dcc07cfe4e clang-format: Set AllowAllConstructorInitializersOnNextLine to false 2023-07-15 16:14:55 -07:00
Benjamin Schubert 2fbc0dabda UI: Don't call activateWindow() when hidden 2023-07-15 16:11:27 -07:00
Clayton Groeneveld e121ac1587 UI, libobs: Add RAII wrappers for faders/volume meters
They can now be automatically deleted.
2023-07-15 16:06:36 -07:00
Kurt Kartaltepe 425be04014 UI: Disable QSV for simple mode on Linux
Linux QSV drivers have varying capabilities depending on if the
free/non-free Intel drivers are installed. This means we cannot safely
expose QSV in simple mode as users may be unable stream without changing
to advanced mode.
2023-07-14 12:19:33 -04:00
gxalpha a4834efde9 UI: Remove Qt 5 ifdef guards and code 2023-07-12 13:22:13 -04:00
Norihiro Kamae 39d4b53f6b UI: Fix preprocessor directives for platform integrations
The macros `YOUTUBE_ENABLED`, `RESTREAM_ENABLED`, and `TWITCH_ENABLED`
are not defined when the associated features are not enabled.
When the code was originally implemented, there were definitions to set
`0` if the feature is disabled. However a later commit 349372b removes
the definition. Now, the use of `#ifdef` is better than just `#if`.
2023-07-12 11:09:36 -04:00
derrod ad5f04e53d UI: Soft-delete scene collections
Instead of actually removing the file, simply rename it to the .bak
version which OBS ignores in most cases. That allows users to recover
accidentally deleted collections more easily, while only taking up a
few kilobytes of disk space at most.
2023-07-08 16:39:03 -07:00
Yoshimasa Niwa 9ab5271d69 UI: Fix crash radio list without items
Check items count before accessing first item,
or it will crash due to out-of-bound access.
2023-07-08 16:08:21 -07:00
Norihiro Kamae 65e35bec7d UI: Fix scenes only multiview label position 2023-07-07 16:38:52 -07:00
derrod 46525f5175 updater: Fix updating without patch files 2023-07-07 12:50:02 -04:00
Lain cececf4e55 UI: Wait for full vcam deactivation to destroy its view
A bug which was technically introduced in df446c3f6e: the author
assigned video mixes to the virtual camera and did not realize you have
to wait for full capture stop with the "deactivate" signal rather than
the "stop" signal. This situation is understandable because these
signals are likely confusing and need more documentation.

The way an output works when it stops is it has three stages:
- "stopping", which is the moment the user themselves stop the output
- "stop", when the output's implementation has stopped and returns
  success or an error code
- "deactivate", when the output inself (not the implementation) has
  fully stopped capturing encoded or raw frame data after the
  implementation has stopped. This is done in a separate thread,
  end_data_capture_thread(), for performance and data race reasons, and
  is when it's "actually fully stopped for real this time"

(Lain note: I sincerely apologize for this confusing signal design)

The author of df446c3f6e was likely confused as to why they could not
destroy the video mix in the "stop" signal without triggering a race
condition in end_data_capture_thread(), and instead decided to make a
workaround to clear the video mix set to the output before destroying
the video mix. Unsetting the video mix I'm guessing *seemed* to fix the
problem for them at the time, and destroying the video mix separately
after that automatically stops capture, so it *technically* worked
because the deactivate thread cannot be called until the
implementation's stop signal has executed. However, it was still the
incorrect way to handle the problem, because it circumvents the output's
mechanism for deactivating the frame data capture by destroying the view
instead.

The reason this was the incorrect way to handle the problem became
exposed in 7cd7ca80f8, when tytan made it so it uses the main video mix
under certain circumstances. The main view is special and cannot be
destroyed, so the mechanism to stop frame data capture that the
virtualcam was using before failed, and raw frame data capture continued
perpetually until the end of the program erroneously.

This fix solves the bug by using the "deactivate" signal rather than the
"stop" signal, thus allowing the output to fully end its data capture
and *then* destroy the video mix.

Fixes obsproject/obs-studio#9153
2023-07-06 15:37:28 -07:00
derrod 7773ea0180 UI: Fix utf-8 paths in shared updater components 2023-07-02 05:09:17 +02:00
Penwywern 0a610dcc7a UI: Add logging of Program scene changes in studio mode 2023-06-30 14:14:31 -07:00
PatTheMav c586c1d06f cmake: Add support for unobfuscated OAuth secrets
Unobfuscated secrets require the hash values to be set to 0, by default
CMake will treat 0 as a falsy value. This commit adds support for
_either_ 0 _or_ a valid hexadecimal hash.
2023-06-30 12:22:42 -04:00
PatTheMav db895092ed cmake: Add changes for CMake build framework 3.0
New code path only taken if OBS_CMAKE_VERSION is set to 3.0.0 or
greater, old functionality remains unchanged.
2023-06-29 10:11:32 -04:00
derrod 67f7712d83 UI: Migrate undo/redo to using UUIDs 2023-06-28 11:04:56 -07:00
pkv 457c88b138 UI: Change surround sound warning to signal YouTube support
YouTube Live now supports 5.1 surround sound.
The surround sound warning in Settings has been updated to reflect that.

Signed-off-by: pkv <pkv@obsproject.com>
2023-06-24 17:11:01 -07:00
cg2121 80f43998e6 UI: Fix icon paths of transition buttons
In Qt Creator, the transition add/remove buttons had no icons,
as the paths were incorrect.
2023-06-25 09:25:36 +10:00
Clayton Groeneveld f2f4582141 UI: Add ability to reorder filters by drag & drop
This adds the ability for filters to be dragged and dropped
to be reordered, similar to scenes and sources.
2023-06-21 15:33:48 -07:00
cg2121 e863bea7fb UI: Add QDataStream opreators for OBSSource
Allows serializing/deserializing sources in and out of QDataStreams via
their UUID
2023-06-21 15:33:48 -07:00
gxalpha a35e5aae41 UI: Disable Ok button in Add Source dialog if no source is selected 2023-06-17 16:46:05 -07:00
Norihiro Kamae bff468d7ec UI: Reuse StudioMode.Preview translation for virtual camera config 2023-06-17 16:43:44 -07:00
Norihiro Kamae 323f3957cd UI: Translate place holder name for new group 2023-06-17 16:42:53 -07:00
Norihiro Kamae 846cdafbed UI: Fix changed state of audio settings
When changing audio channels, sample rate, or audio buffering settings
multiple times by hitting `Apply` button, the internal `changed` state
got corrupted. To avoid this, set the changed state when changed
something, but do not clear the changed state.
2023-06-17 16:42:14 -07:00
Norihiro Kamae 35463cb464 UI: Fix changing quick transition to/from fade to black 2023-06-17 16:39:27 -07:00
Norihiro Kamae a1c88d58fc UI: Fix checked state of source toolbar menu item
After the source toolbar was hidden or shown by a hotkey, the checked
state of the menu item was not updated.
2023-06-17 16:36:59 -07:00
gxalpha 1933579b9c UI: Capitalize "Full-Height Docks" 2023-06-17 16:28:59 -07:00
PatTheMav 59904a66a3 cmake: Update Framework link definition for macOS builds 2023-06-17 12:23:33 -04:00
PatTheMav 50a4e83251 cmake: Remove Info.plist template files for macOS builds
Creation of Info.plist files through Xcode is more canonical and
future-proof, as it will automatically pick up changes/updates
introduced by Apple. Non-standard keys can still be added via a
template file, which will then be extended by Xcode with the default
keys.
2023-06-17 12:23:33 -04:00
PatTheMav 9f0a2547ac UI: Fix preventing copy elision of a temporary string object 2023-06-16 14:12:58 -04:00
PatTheMav 343055c889 UI: Wrap unreachable code in comment to fix clang warnings
The branch is never taken and the code acts as documentation for a
(possible) future use case. According to YAGNI it could be removed
entirely, wrapping it in a comment is the less destructive approach.
2023-06-16 14:12:58 -04:00
PatTheMav 5ca17aa25f UI: Disable warnings emitted by Qt frameworks
Qt uses quoted includes in Framework headers (which is discouraged
by Apple) and also has some questionable use of the comma operator.
2023-06-16 14:12:58 -04:00
Colin Edwards d31d271b43 UI: Move WHIP service to the bottom of the visible list 2023-06-15 12:38:11 -04:00
PatTheMav f8e00d6071 clang-format: Update formatting of all ObjC and ObjC++ files 2023-06-11 14:56:45 +02:00
cg2121 45e895206d UI: Render preview lines above safe areas
Moves the preview lines around sources to be rendered above the
preview safe area lines.
2023-06-10 17:35:57 -07:00
derrod 66b3a04424 UI: Assume RTMP if service has no protocol
(cherry picked from commit e26a04fa44)
2023-06-11 02:18:17 +02:00
derrod 8983083cec updater: Refactor and cleanup 2023-06-11 02:17:28 +02:00
derrod ef3a67708e UI: Support PCM in MP4 2023-06-10 17:10:30 -07:00
Colin Edwards 353a4c860d UI: Don't show WHIP in stream settings if the protocol isn't registered 2023-06-10 16:50:55 -07:00
Exeldro e830043851 UI: Don't update text source when nothing changed 2023-06-10 16:45:42 -07:00
gxalpha fe2eee951b UI: Don't create combobox for radio buttons in properties view 2023-06-10 16:13:57 -07:00
cg2121 5cc319d97f UI: Change name of ResetProxyStyleSliders function
Changes the name to ThemeChanged, as the function now does more than
reset the volume sliders.
2023-06-10 16:06:16 -07:00
Sean DuBois dd392188b8 UI: Enable WHIP service in UI
This provides the UI glue to enable the WHIP service introduced in the
obs-webrtc plugin.

Co-authored-by: John Bradley <jocbrad@twitch.tv>
Signed-off-by: pkv <pkv@obsproject.com>
2023-06-09 20:20:49 -05:00
Norihiro Kamae c053216824 UI: Remove move_to_xdg
The configuration directory was $HOME/.obs-studio until version 0.10.1
and then moved to XDG's configuration path by ba02e065fe.
The function move_to_xdg was introduced to move the old configuration
directory and left almost untouched for 8 years.
2023-06-09 04:51:10 -07:00
tududweb 4871fd301a UI: Don't trigger a settings update when list is empty
To avoid recursive call
2023-06-07 12:50:48 -07:00
tytan652 90d96e92c2 obs-frontend-api,UI,docs: Add API to add custom docks with no toggle
Some plugin does that by deleting the QAction returned by
obs_frontend_add_dock().

Now that obs_frontend_add_dock() is deprecated,
obs_frontend_add_custom_qdock() replace this usage.
2023-06-03 16:47:01 -07:00
tytan652 cde5545f8f obs-frontend-api,UI,docs: Add dock API that ask for unique object name
obs_frontend_add_dock() is deprecated in favor of
obs_frontend_add_dock_by_id()
2023-06-03 16:47:01 -07:00
tytan652 f2fa54120a UI: Avoid having two dock with the same object name
https://doc.qt.io/qt-6/qmainwindow.html#saveState

You should make sure that this property is unique for each QToolBar and
QDockWidget you add to the QMainWindow.
2023-06-03 16:47:01 -07:00
Igor Bochkariov df3b294fc3 UI: allow side docks to be tall
before: widgets docked on the sides of the preview are of the height of
the preview

after: the user can toggle the setting in the docks menu so the side
widgets are of the height of the whole window

UI: change menu label to Full-height docks
2023-06-04 09:39:47 +10:00
cg2121 382edcebb7 UI: Also toggle mixer toolbar in view menu
This change makes the mixer toolbar also show/hide when toggling
the source toolbars in the view menu.
2023-06-03 16:03:37 -07:00
gxalpha b69ee759d2 UI: Sort encoders alphabetically 2023-06-03 13:48:47 -07:00
cg2121 4c9e1949ad UI: Fix filter shortcuts not showing in context menu
This fixes the shortcuts not showing up in the filters context
menu for rename and remove. This also has a code cleanup for
the rename action, as now it is created in the ui file.
2023-06-03 11:53:36 -07:00
tytan652 7cd7ca80f8 UI: Use main video on the virtual camera if program
This change allows the virtual camera to really output what is in the
program view, some plugin interract with this view but their changes
does not appear on the virtual camera.
2023-05-30 16:16:07 -07:00
PatTheMav 2966c4030e libobs: Use static library for version string information
Switching to a static library that contains version information as
const char strings has multiple benefits:

* The version information provided externally via compiler definitions
  will fail compilation early if malformed
* An updated version string (which will happen with every commit) will
  not invalidate existing compilation units, because only the static
  library is affected by the change
* An update of the version change just requires a recompilation of the
  static library and a linker update
* An update of the version will _not_ infect the rest of the codebase
  (as it does currently, because everything includes obsconfig.h one
  way or another)
* Other modules which used the macro definition directly have been
  updated as much as possible to use the proper getter method from
  `libobs` instead (some Windows-specific modules use preprocessor
  string composition, the value has been added as a compiler definition
  directly in those cases)
* Because the impact of a version change due to a commit hash change
  is limited to the static library, ccache hit rates should be
  improved considerably
2023-05-27 16:48:24 -07:00
cg2121 016ce128b7 UI: Fix menu actions missing shortcuts
The scene and source rename/remove actions were missing shortcuts
in the context menu.
2023-05-27 16:26:02 -07:00
Norihiro Kamae b21edafe98 UI: Fix crash on patronJsonThread
If a user exit obs while patronJsonThread is running, the thread crashed
with the error below.
  QThread: Destroyed while thread is still running
2023-05-26 12:54:33 -04:00
gxalpha adb7029298 UI: Don't use ellipses in permissions window title 2023-05-24 15:47:10 -04:00
gxalpha 4b37692939 UI: Disallow exiting settings with no track in advanced mode 2023-05-24 12:30:27 -04:00
gxalpha 2bc368349f UI: Disallow exiting settings with no track in simple mode 2023-05-24 12:30:27 -04:00
Norihiro Kamae 63e0bff5e6 UI: Fix crash when receiving multiple SIGINT
When there are two or more SIGINT signals were sent to obs, obs crashes
because the 2nd SIGINT calls `close` though the main window has been
deleted.
2023-05-23 04:17:11 -07:00
cg2121 fc8c428521 UI: Move saving of scene tree grid mode
Widget shouldn't save their own states, as then they can't be used
elsewhere.
2023-05-21 01:48:13 -07:00
cg2121 20896280b1 UI: Fix compiling error on Ubuntu
Makes sure ceil function uses std namespace
2023-05-21 01:48:13 -07:00
cg2121 3a53882675 UI: Add scene grid mode to view menu
Makes toggling of the scene list grid mode also available in the
view menu.
2023-05-20 17:06:18 -07:00
gxalpha 58fb63030c UI: Only defer property updates for input and transition sources
Deferring properties was only ever made for input and transition
sources. As other property dialogs do not have an "Ok" button that would
cause an update to happen, if the deferred flag was set the callback
would never be called.
Also clarifies the docs to reflect this.
2023-05-20 16:55:50 -07:00
PatTheMav ccedbc0218 UI: Update display capture toolbar dropdown to use uuid field 2023-05-20 16:50:16 -07:00
gxalpha ad9fd6c6f0 libobs,UI: Add properties radio button list 2023-05-20 16:48:23 -07:00
gxalpha f049962bb2 libobs: Add properties list boolean format 2023-05-20 16:48:23 -07:00
Norihiro Kamae c335219582 UI: Fix missing translations
This commit fixes a typo in a translation key, adds two missing
translations, and also removes obsolete translations in the translation
files.
2023-05-20 16:27:28 -07:00
Lain 106c7aa61f Update copyrights/names 2023-05-20 01:31:18 -07:00
Jim fcfc2eb5fc UI: Fix 0,0 size transform bug when resizing sources
Fix a bug where if a source's width or height becomes 0 while you're
stretching the size of a source or modifying it from the transform
dialog, it would become permanently invisible

Closes obsproject/obs-studio#7962
2023-05-19 17:31:14 -07:00
gxalpha f6b6873aaa UI: Re-raise missing files dialog on macOS after file is selected 2023-05-18 18:07:12 -04:00
田七不甜 e1b02e5b8a UI: Remove tabs for About error statements
And change error statements to translation key
2023-05-18 16:13:59 -04:00
PatTheMav d3ccf1b889 UI: Add support for error messages from the Virtual Camera system 2023-05-18 14:41:08 -04:00
PatTheMav 3f85e447a8 mac-virtualcam: Add Camera Extension to main CMake plugin project
Camera Extensions require specific entitlements for the hosting app,
which also require a provisioning profile. To avoid breaking local
builds that do not require the camera extension, an additional
entitlements file that will not trigger the provisioning profile
requirement will be used if the virtualcam (but not the Camera
Extension) is configured.
2023-05-18 14:41:08 -04:00
tytan652 904fe87f83 build-aux,CI: Split Flatpak manifest in multiple files
Also moves Flatpak manifest to build-aux folder
2023-05-13 18:26:17 -07:00
gxalpha 2ab326d2cd UI: Redirect Qt log messages to OBS log 2023-05-13 17:09:32 -07:00
PatTheMav beab803599 UI: Add ellipses to menu item triggering user choice (per Apple HIG) 2023-05-13 16:57:30 -07:00
PatTheMav d2ea998f49 UI: Use native ObjectiveC methods to generate data file paths 2023-05-13 16:57:30 -07:00
derrod 2918d77e58 UI: Process Qt events once after destroy queue finishes 2023-05-13 16:53:17 -07:00
derrod 1c3ae0707c UI: Only update vcam output if necessary 2023-05-13 16:51:11 -07:00
derrod 14a6673e2f UI: Reset VCam when clearing scene data 2023-05-13 16:51:11 -07:00
gxalpha 96f1eec735 UI: Clean up disabling simpleFlvTracks
Since this widget is disabled every time it's shown and we're not
enabling this anywhere, it can just be disabled in the UI form.
2023-05-13 16:49:26 -07:00
田七不甜 229236e821 UI: Fix scene grid mode button color 2023-05-13 16:42:38 -07:00
田七不甜 90843221e6 UI: Normalize theme qss files 2023-05-13 16:42:38 -07:00
Richard Stanway 4176f9b13a UI: Fix crash when double-clicking projector
If "transition on double click" was enabled, OBS assumed all double
clicks were going to multiview projectors, which isn't necessarily the
case.
2023-05-13 16:38:09 -07:00
PatTheMav efbae916fb UI: Fix crash on macOS when closing OAUTH browser panel
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.
2023-05-08 18:22:27 -04:00
tytan652 169cd07c42 UI: Avoid registering CEF OAuth integrations on Wayland 2023-05-07 13:51:52 -07:00
derrod 4419786840 UI: Exit and show error if clearing scene data fails 2023-05-07 11:03:53 -07:00
田七不甜 e1a202b370 UI: Make "Portable Mode" translateable 2023-05-06 16:21:56 -07:00
derrod 982c424de3 UI: Do not show unassigned icon for monitored sources 2023-05-05 17:38:34 -04:00
derrod 0c0ec90eac UI: Fix FLAC missing from builtin codecs list 2023-05-05 12:48:19 -04:00
Richard Stanway 132f0b85fc UI: Relax mc_trans_video_imagescaler.dll DLL block
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.
2023-05-03 19:16:18 -04:00
Vainock e23b80151b UI: Fix case inconsistency in translation key
[skip crowdin-sync]
2023-05-03 02:54:14 -07:00
Translation Updater a0fbdc3c34 Update translations from Crowdin 2023-05-01 23:11:13 +00:00
derrod 0be8d8a28d UI: Fix building macOS/Sparkle without Browser 2023-05-01 10:45:08 -04:00
derrod 4a8e8644e0 cmake,UI: Remove unused legacy DSA public key 2023-04-29 16:10:45 -07:00
gxalpha 1437a6e4fc UI: Explicitly focus Ok button in properties dialog 2023-04-29 16:07:38 -07:00
tytan652 2b4ef6d6ea UI: Fix advanced audio encoder bitrate always set to 192
Audio bitrate maps needs to be populated while finding closest available
bitrate

Not populating makes always fallback to 192
2023-04-23 23:47:32 -07:00
tytan652 3c1733b40d UI: Fix the license in the AppStream metadata
The "or later" must be specified in the identifier or it will be seen
as "only".
2023-04-22 16:41:13 -07:00
derrod ff06927c71 UI: Disable auto-remux for AV1+PCM, use MOV for PCM 2023-04-22 16:16:40 -07:00
gxalpha a4ea51b2b1 cmake: Add properties and log viewer UI files to sources list 2023-04-22 16:01:47 -07:00
gxalpha 597ceb2ff0 UI: Make hotkey edit layout margins symmetrical 2023-04-15 16:38:18 -07:00
gxalpha 1578cca9b2 UI: Sort Add Source menu case insensitively 2023-04-15 16:06:36 -07:00
derrod 36d30cad19 UI: Fix simple mode replay buffer maximum not being set 2023-04-14 19:35:59 -04:00
Richard Stanway 1d7c066cf5 UI: Avoid calling libobs functions with null pointers in projectors 2023-04-14 15:50:59 -07:00
Richard Stanway bacc3ac8ed UI: Add Citrix ICAService to Windows DLL blocklist 2023-04-12 21:32:49 +00:00
derrod f3c075f19f UI: Do not disable events when disabling codecs 2023-04-12 17:17:11 +00:00
jpark37 bad13c90e0 decklink-output-ui: Don't crash on missing device
Noticed OBS crashing after I removed DeckLink hardware that I enabled
auto-start output against.
2023-04-09 11:53:12 -07:00
gxalpha e03a2751f4 cmake: Set CFBundleName to "OBS Studio" 2023-04-09 03:58:40 +02:00
PatTheMav 2978f20b06 UI: Replace use of macros for macOS updater with character constants
Also updates unqualified call to `std::move` per modern clang standards
2023-04-08 16:21:40 -07:00
gxalpha 1b708b312e cmake: Fix build without Sparkle 2023-04-08 05:44:08 +02:00
derrod 50d1b5ccb4 UI: Lower Sparkle update check interval for pre-release builds 2023-04-07 20:59:30 +02:00
Richard Stanway 9cdd847445 UI: Fix incorrect use of QT_TO_UTF8 in SpeakerLayoutChanged
The string is immediately destroyed after use, so taking a pointer to it
ends up pointing to invalid memory. Let's avoid using QT_TO_UTF8 here.
2023-04-05 21:26:21 +00:00
gxalpha 6c676d39da UI: Removed unused static AddProjectorMenuMonitors declaration
e832b42 made AddProjectorMenuMonitors a member function of OBSBasic, but
the (now unused) declaration of the static function never got removed.
2023-04-05 21:26:17 +00:00
PatTheMav 1bab65683e frontend-plugins: Fix auto scene switcher not saving settings on close
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.
2023-04-05 21:26:15 +00:00
derrod e8541b9e27 UI: Recalculate scroll position after resize 2023-04-05 21:26:10 +00:00
derrod d277a7541f Revert "UI: Only adjust size of properties on first draw"
This reverts commit 624a0da302.
2023-04-05 21:26:10 +00:00
derrod 87e294fa5f UI: Fix unassigned audio source check in callback 2023-04-05 21:53:36 +02:00
derrod 16909e0566 UI: Fix simple mode container check 2023-04-05 09:45:56 -07:00
gxalpha 5fe8dac563 UI: Fix "Unqualified call to 'std::move'" warnings 2023-04-04 16:24:35 -07:00
derrod 7743ccfb03 UI: Fix replay buffer/split file extension 2023-04-05 01:14:26 +02:00
Richard Stanway 820fba2d7f UI: Remove unnecessary variables type conversions
Detected by PVS Studio.
2023-04-05 00:40:31 +02:00
PatTheMav ee3c2d0e8a CI: Fix build errors with Xcode 14.3 and platform SDK 13.3
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)
2023-04-04 17:27:59 +00:00
PatTheMav 6e07b86729 cmake: Remove EXCLUDE_FROM_ALL directive from interface libraries 2023-04-04 17:27:54 +00:00
gxalpha 5444732c91 UI: Use name instead of internal extension for incompatible codec check 2023-04-04 17:27:45 +00:00
derrod 69ac2b7aaa UI: Fix Simple Mode compat check only checking video codec 2023-04-04 00:54:28 +00:00
derrod 5a375defa8 UI: Rework recording format handling 2023-04-04 00:54:28 +00:00
Richard Stanway a781f4a887 UI: Don't std::move main in SetUndoProperties
main is used later in the function, making this undefined behavior.
Though we can move the scene_name string.

Detected by PVS Studio.
2023-04-03 21:47:14 +02:00
derrod 288dfd2660 UI: Remove unused uppercase format string 2023-04-03 16:18:48 +02:00
Jim d166bee3b6 Revert "UI: Fix preview rendering order"
This reverts commit bb34315f90.
2023-04-01 18:00:44 -07:00
cg2121 3a610c698e UI: Remove UNUSED_PARAMETER where unnecessary
Since cpp allows removing the unused parameters from the function name,
UNUSED_PARAMETER is not needed, unless it is in an ifdef.
2023-04-01 16:54:02 -07:00
cg2121 7475261542 UI: Fix rotation handle when source is flipped
The rotation handle and cursor would be drawn at the wrong spot
if the source was flipped.
2023-04-01 16:48:24 -07:00
cg2121 30682e999e UI: Use UUIDs for QDataStream
UUIDs are more robust than names as they can't be changed.
2023-04-01 16:45:48 -07:00
cg2121 bb34315f90 UI: Fix preview rendering order
The spacing helpers were being rendered above the preview
safe areas.
2023-04-01 16:44:38 -07:00
gxalpha 2f2fc33f91 UI: Disallow closing settings without selected codec or format 2023-04-01 16:43:07 -07:00
Ryan Foster 60139cbdfe Revert "UI: Remove bitness strings"
This reverts commit 64d4ae0106.
2023-04-01 16:35:10 -07:00
gxalpha 240a718818 UI: Guard ResetInvalidSelection check behind Qt < 6.5.1 2023-04-01 16:25:49 -07:00
derrod 61efa3cbeb UI: Fix replay buffer with fragmented formats 2023-04-01 16:24:40 -07:00
derrod c8d274edac UI: Only use FFmpeg compat check for external codecs
For all the codecs we ship with OBS we can use a hardcoded lookup
instead as the FFmpeg one is unreliable.
2023-04-01 16:19:27 -07:00
gxalpha 6fc9235b09 cmake: Enable "sortable" flag in UI for large lists 2023-04-01 16:15:41 -07:00
Richard Stanway e0f674de86 UI: Add AMD AV1 encoder to simple output mode
Fixes https://github.com/obsproject/obs-studio/issues/8584
2023-03-30 22:04:07 -04:00
Richard Stanway 9a24b1ad06 UI: Update Windows DLL blocklist
- Add Bandicam
- Add VirtualMotionCapture (unity capture)
- Add HolisticMotionCapture (unity capture)

Fixes https://github.com/obsproject/obs-studio/issues/8552
2023-03-30 21:16:35 -04:00
derrod 2560187611 UI: Remux fragmented containers to regular counterparts
Also disables record-as-MKV when using fmp4.
2023-03-29 19:17:24 +00:00
derrod 8e1cae4f02 UI: Remux mp4/mov to mp4/mov with suffix 2023-03-29 19:17:08 +00:00
derrod 624a0da302 UI: Only adjust size of properties on first draw 2023-03-29 19:16:56 +00:00
tytan652 0d9f15cf3d UI: Improve AV1 fallbacks while changing services
This makes AV1 encoders fallback to their H264 counterpart rather than
just falling back to x264 while changing services.
2023-03-29 19:16:46 +00:00
PatTheMav 0b136c3a39 UI: Add exportOptions property lists for Xcode archiving 2023-03-29 10:31:57 -04:00
derrod 16c078960d UI: Fix missing masking in unassigned audio mix check 2023-03-29 03:16:45 +02:00
derrod 1ea100e537 UI: Fix updater parameters missing a space 2023-03-29 02:08:58 +02:00
derrod 5fbe9cdb41 updater: Add workaround for broken CLI arguments 2023-03-29 02:08:46 +02:00
tytan652 ffe5a2f152 UI: Add missing compile definitions for service integrations 2023-03-28 14:48:47 +02:00
gxalpha 454a701431 UI: Fix simple stream encoder changed signal-slot connection 2023-03-28 22:51:00 +11:00
tytan652 b11d0523fb UI: Load service before creating the output handler 2023-03-27 14:33:24 -04:00
Norihiro Kamae fad82d0f9c cmake: Fix obs-frontend-apiConfig.cmake included from 3rd party plugin 2023-03-27 14:09:19 -04:00
Translation Updater 7c5560bf1b Update translations from Crowdin 2023-03-27 13:39:03 +00:00
Norihiro Kamae e4eeecf3df cmake: Fix OBS_INSTALL_PREFIX
Before 349372b3b3, OBS_INSTALL_PREFIX contained trailing slash so that
it can concatinate with further paths.
2023-03-27 15:30:05 +02:00