0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

2357 Commits

Author SHA1 Message Date
gxalpha
8298f040fe UI: Add Rosetta Detection
Adds a check that detects if OBS is running on Rosetta on macOS and logs
the result.
2022-01-04 01:57:02 -08:00
gxalpha
c60ec74424 UI: Remove unneeded include 2022-01-04 01:54:38 -08:00
tt2468
5d87d43e8e UI: Increment showing in filters dialog
Increment the show reference of a source when the filters dialog is
open, just like the properties dialog.
2021-12-31 17:36:25 -08:00
Exeldro
1dd96124e3 UI: Fix vertical grayscale meters when volume is muted 2021-12-30 22:32:24 -08:00
jp9000
52cc1d533e libobs, UI: Fix cpp auto-release assignment from OBSRefs
The *AutoRelease helpers should not take references from OBSRef objects.
Instead, make an OBSRefAutoRelease base class, and OBSRef a subclass of
that to allow moves, and then perform moves from those objects.

This fixes an issue where *AutoRelease OBSRef objects would cause an
unintended double release of objects after having been assigned values
from non-*AutoRelease OBSRef objects.
2021-12-30 21:19:34 -08:00
tytan652
bce1d6970a UI: Fix build with YT integration without browser 2021-12-30 11:36:33 +01:00
tt2468
47397ce527 UI: Add obs_frontend_open_source_interaction()
Adds a frontend api call to open the interact dialog of a source,
just like the `_properties` and `_filters` functions.
2021-12-28 21:44:35 -08:00
jp9000
213712dfe5 UI: Fix Copy/Paste not including blend mode 2021-12-28 09:12:51 -08:00
jp9000
2364dfd0ef UI: Remove unnecessary shared_ptr allocations
Not sure why these were separate allocations -- the data will be
preserved just fine when copying the structure without being separate
allocations
2021-12-28 08:34:40 -08:00
jp9000
0c4b3816de UI: Add alt-key support to Docks menu 2021-12-28 06:42:11 -08:00
jp9000
1655ebf18f libobs, UI: Add support for beta builds
Allows the ability to specify beta builds in addition to release
candidate builds
2021-12-27 10:01:07 -08:00
gxalpha
a92b671ed1 UI: Hold refs to existing sources during remove scene undo 2021-12-24 09:45:02 -08:00
gxalpha
3a67fe5944 UI: Hold refs to old sources during remove source undo
Fixes an issue where sources could get released and destroyed when
undoing the removal of a nested scene.
2021-12-24 06:02:02 -08:00
Norihiro Kamae
550b1331ac obs-ffmpeg, UI: Reset timestamps at splitting file
This commit adds a setting to reset timestamps when splitting files.
Some NLEs cannot handle video files whose starting timestamp is not
zero. Default is enabed.
2021-12-24 15:59:26 +09:00
Norihiro Kamae
0e81c66f6e UI: Add automatic file splitting
This commit implements a new feature to split recordings in split files
in Advanced output mode.
These basic settings are implemented.
- Enable/disable the feature. Default is disabled.
- Select a type of the limit, time or size.
- Specifies the limit in seconds or MiB.
2021-12-24 15:55:57 +09:00
gxalpha
29b8df97a6 UI: Remove unneeded call when removing scene 2021-12-23 06:37:10 -08:00
Clayton Groeneveld
f52c05081a UI: Add grayscale meters when volume is muted
This allows the user to see audio levels, even when
muted.
2021-12-23 06:35:29 -08:00
Clayton Groeneveld
5878856ce4 UI: Display grayscale volume meter if muted
Currently, the volume meters don't show volume levels when
muted. This shows the levels and makes it grayscale when
the source is muted.
2021-12-23 06:35:29 -08:00
Matt Gajownik
845e056551 UI: Filter out incompatible audio filters in A/V list
Fixes #5136
2021-12-23 06:30:02 -08:00
tt2468
167f539416 libobs: Rename obs_audio_monitoring_supported to _available
With the reasonable possibility of monitoring support becoming a
runtime check, the phrase `available` is more fitting.
2021-12-22 02:43:14 -08:00
jp9000
1dbc6c177a UI: Invoke QCoreApplication::quit in queued connection
Instead of calling App()->quit() directly, which may shut down the event
loop prematurely, invoke it and put it in the event queue so other
events can be processed first.

Again, this may be redundant, but we want to make sure any remaining
events are taken care of before the main window gets completely
destroyed, and before the program shuts down. This should help ensure
that.

Plus it also says you're supposed to do it this way in the documentation
rather than call it correctly so uh... yea. Probably should have done
this sooner.
2021-12-21 01:49:47 -08:00
jp9000
8bff191b32 UI: Use sendPostedEvents with deleteLater events on destroy
On destruction of the window, send remaining QEvent::DeferredDelete
events just to ensure there are no lingering actions remaining in the
queue. May cause additional events to be posted, which should be covered
by the final sendPostedEvents call.

(Jim note: I admit this is probably unnecessary, and this may be
redundant, but the reason such redundant precaution is being taken is
because we want to make sure that browser panels in particular are
properly cleaned up. To be quite frank I'm adding this mostly out of
paranoia.)
2021-12-21 01:48:58 -08:00
jp9000
fb58e58892 UI: Use null with sendPostedEvents()
After stepping into this function with a debugger, it's been determined
that App() won't do anything because it'll marked as a recursive call,
and 'this' will only clear events for this specific object. Instead, we
should be using nullptr to send all posted events for the program.

This fixes an issue where posted events would not be processed on
shutdown as expected before destroying the main window.
2021-12-21 01:41:19 -08:00
jw0z96
447b17e75e libobs: Implement additional source blending modes 2021-12-20 09:06:38 -08:00
jp9000
8b3416c1e7 libobs: Implement deferred destruction of sources
(This also modifies the UI)

The purpose of deferring destruction of sources is to ensure that:
1.) Hard locks from enumeration cannot occur with source destruction.
  For example, if the browser source is destroyed while in the graphics
  thread, the browser thread would wait for the graphics thread, but the
  graphics thread would still be waiting for the browser thread, causing
  a hard lock.
2.) When destroys occur during source enumeration, that the integrity of
  the context's next pointer in the linked list can no longer be
  compromised
3.) Source releases are fully asynchronous rather than having the risk
  of stalling the calling thread
4.) We can wait for source destruction when switching scene collections
  or when shutting down rather than hoping for threads to be finished
  with sources.

This introduces a new requirement when cleaning up scene/source data:
the obs_wait_for_destroy_queue() function. It is highly recommended that
this function be called after cleaning up sources. It will return true
if at least one or more sources were destroyed. Otherwise it will return
false. Forks are highly advised to call this function manually on source
cleanup -- preferably in a loop, in conjunction with processing
outstanding OBS signals and UI events.
2021-12-19 11:53:19 -08:00
jp9000
e4f0c21252 UI: Process deleteLater() tasks in OBSBasic::ClearSceneData
Causes QObject::deleteLater() events to be processed immediately in
OBSBasic::ClearSceneData() to ensure no lingering source or scene item
references remain
2021-12-19 11:25:57 -08:00
Warchamp7
f5947d9b9b UI: Update the filters window to be resizeable
Updates the filters window to use a QSplitter layout for the properties area.

The handle is disabled for audio filter windows. The handle and property area are hidden when there are no filters.
2021-12-17 06:52:35 -08:00
Mike
02f3495b72 UI: Add checks for overwrite setting to replay buffer 2021-12-17 06:49:44 -08:00
gxalpha
d121c92fbb UI: Add undo/redo for "Add existing source"
Adds an undo/redo action for the "Add existing source", which previously
was missing.
2021-12-17 04:30:36 -08:00
Tommy Vercetti
c83b758f4d UI: Remove Qt Windows Extras for Qt 6 and later
Co-Authored-By: Matt Gajownik <matt@wizardcm.com>
2021-12-17 01:35:40 -08:00
Translation Updater
062de2c998 Update translations from Crowdin 2021-12-17 08:01:29 +00:00
wangshaohui
90f11b3eae UI: Fix a stack overlow caused by using OBSScene 2021-12-16 23:38:59 -08:00
Jim
83f08725e4
Merge pull request #5580 from VodBox/add-cpp-templates
libobs: Add AutoRelease OBSRef wrappers for OBS types
2021-12-13 21:31:27 -08:00
Richard Stanway
ea1ae59149 UI: More user-friendly error when using a bad output path 2021-12-13 22:32:09 +01:00
Translation Updater
261345f9ef Update translations from Crowdin 2021-12-12 02:38:59 +00:00
derrod
2c7b14bc37 UI: Add UUID to Twitch panel URLs
Some Twitch dashboard panels now require a UUID, it is not used for
anything but local storage right now, and according to Twitch we can
generate it ourselves (or even use a static string). To be safe we can
just use QUuid to generate a "real" UUID and then store it locally until
the user disconnects the account.
2021-12-11 14:39:19 -08:00
Georges Basile Stavracas Neto
ca72f890da UI: Set donation, bugtracker, and translate AppData fields
These are more fields that app stores such as GNOME Software
and Discover show. Nothing fancy, but the more information we
provide, the better it looks!
2021-12-09 17:03:36 -03:00
Richard Stanway
10446c1a0b UI/updater: Explicitly set PSAPI_VERSION=2
If the user didn't set their minimum SDK level this would default to
PSAPI_VERSION=1 which requires psapi.lib (removed in 4614c057).
2021-12-09 02:51:08 +01:00
jp9000
b92e941b4f libobs: Add source cap to hint not to show properties
(This commit also modifies UI)

Adds a source capability flag to indicate that properties should not be
shown on creation
2021-12-07 20:54:37 -08:00
jp9000
0be3524658 UI: Don't show properties on creation if no properties
If a source doesn't have any properties, don't show properties on
creation
2021-12-07 20:54:37 -08:00
Richard Stanway
0438d60499 UI: Remove duplicate translate_button macro call 2021-12-08 02:24:50 +01:00
Colin Edwards
54e5252906
aja: Disable plugin if no devices are found 2021-12-07 18:52:12 -06:00
gxalpha
e6153dae9a UI: Fix unused lambda capture warning 2021-12-04 15:23:07 -08:00
Matt Gajownik
0b67dc0285 UI: Uniquely identify Custom Browser Docks 2021-12-04 15:08:46 -08:00
Matt Gajownik
1acc14e189 UI: Fix service integration with older Qt versions 2021-12-01 18:53:11 +11:00
Matt Gajownik
bc9911f5a6 UI: Pass parent QWidget to Browser Docks 2021-11-30 23:28:20 -08:00
gxalpha
3dbdd4b312 UI/importers: Automatically detect SL Collections on macOS 2021-11-30 23:19:13 -08:00
Georges Basile Stavracas Neto
0d91bfd281 UI: Add kudos to AppData file
Kudos are read by app centers such as GNOME Software and Discover
to calculate the "awesomeness" level of the application. OBS Studio
qualifies for two of these kudos: the "hi-dpi icon" kudo, since we
have 128x128 and bigger icons; and the "modern toolkit" icon, since
we use Qt5.

Add these kudos to the AppData file, and let app centers tell the
world how awesome OBS Studio is :)
2021-11-26 13:49:33 -03:00
VodBox
c3409b5bb5 frontend-tools: Cleanup libobs C++ type use 2021-11-26 23:23:52 +13:00
VodBox
3d544653e8 UI: Cleanup libobs C++ type use 2021-11-26 23:23:51 +13:00
Matt Gajownik
ab5d41c445 UI: Add separator before Custom Browser Docks in Dock menu 2021-11-26 18:06:51 +11:00
Matt Gajownik
a150fe7573 UI: Remove unused/nonexistent signal/slot connections 2021-11-26 17:28:34 +11:00
Warchamp7
a33c5c6be1 UI: Move Docks into top level menu
Managing the OBS UI docks is a core feature and as such should be
at the top level of the menu
2021-11-25 11:30:55 -08:00
Matt Gajownik
c45c261a9c UI: Add missing Interact tooltip in compact source toolbar 2021-11-25 20:09:46 +11:00
Matt Gajownik
13390b24b7 UI: Expose cURL error if Remote Text error text is empty 2021-11-25 00:57:00 -08:00
gxalpha
f2fda20572 UI: Minimize context bar when too small
This change removes the minimum total size from the context bar, instead
removing certain elements when the size is too small. This means that
users will still be able to make OBS smaller in width while keeping the
context bar enabled.

First, the properties, filter and interact buttons will get reduced to
just the symbols, if it gets even smaller the source specific menus are
hidden.
2021-11-24 13:40:29 -08:00
Georges Basile Stavracas Neto
dc63f63d9d UI: Install correct logos
Until now, we've been installing the UI/forms/images/obs.png asset
as the logo. However, that's not officially the logo we should
be using.

Install the correct logo assets. Add 128x128, 256x256, 512x512,
and scalable variants.
2021-11-24 01:36:44 -08:00
Clayton Groeneveld
6a0348cf64 UI: Add option for only one fullscreen projector per screen
This option is added for users who want to have only one
projector on a screen and want to save gpu resources.
2021-11-24 01:01:12 -08:00
Ryan Foster
54a808c34a UI: Set Twitch Panel Dark Mode using OBS theme
Check if the current OBS theme is "Dark Mode"-esque and use that to
determine if the Twitch browser panel docks should use Twitch's Dark
Mode or not.
2021-11-24 00:03:39 -08:00
Kasin Sparks
67d2b50a91 UI: Fix bug with audio balance slider not updating
Fixes #4763.
2021-11-23 22:06:25 -08:00
gxalpha
3ccc963e53 UI: Fix context bar shutdown crash 2021-11-23 22:01:43 -08:00
gxalpha
e6dc6c2d94 UI: Recreate nested scenes on scene delete undo 2021-11-23 22:00:47 -08:00
Clayton Groeneveld
fee5b67bef UI: Use std::gcd for aspect ratio
This removes our own code for gcd, as it is already built into cpp.
2021-11-23 21:47:57 -08:00
Paul Hindt
ce3ae8e423
aja: Capture and Output plugin for AJA Video Systems IO devices
* aja: Initial commit of AJA capture/output plugin

* aja: Fix clang-format on aja-output-ui code

* aja: Remove script used during dev/testing

* aja: Address pull request feedback from @RytoEX

* aja: Remove the SDK sources and update CMakeLists to point to new headers-only/static libs dependency distribution.

* aja: Only build AJA plugin on x64 on macOS for now

* aja: Remove the non-English placeholder locale files. The english strings/files will be produced via crowdin, according to @ddrboxman.

* aja: Add FindLibAJANTV2.cmake script to locate the ajantv2 headers and static libs in the OBS external deps package(s). Tested on Windows x64. macOS and Linux x64 TBD.

* aja: Add ajantv2/includes to FindLibAJANTV2 include search paths

* aja: Remove commented code from aja CMakeLists

* aja: Remove debug code and comments that are no longer needed.

* aja: Fix indentation

* aja: Remove disablement of clang-format in routing table and SDIWireFormat map

* aja: Use spaces for all indentation in widget crosspoint arrays where we disable clang-format

* aja: Address code style comments made by @RytoEX

* aja: Fix uneven indentation

* aja: More fixes to if/else placement and remove superfluous comments.

* aja: Rename 'dwns' to 'deactivateWhileNotShowing' for clarity. The DeckLink plugin still uses the variable name 'dwns' and should be changed, if desired, in a separate PR.

* aja: Remove X11Extras dependency from AJA Output frontend plugin

* aja: Add patch from Jim to find AJA release/debug libs

* aja: Improve AV sync of queued video/audio sent to the AJA card in the AJA Output plugin.
2021-11-23 20:31:11 -06:00
tt2468
44f07f9b11 UI: Delete OBSDisplay on window hide on unix
When a window with an OBSQTDisplay is closed, the surface can be
destroyed before the display is, opening a gap for OBS to attempt to
draw to the invalid surface.

This deletes the underlying OBSDisplay object when the actual surface
is destroyed, closing that gap.

Note: This appears to have been an issue previously with Wayland, as
hinted by the existing ifdefs.
2021-11-20 23:47:02 -08:00
tt2468
33b75a1a78 UI: Update adv audio props on monitoring type change
Update the audio monitoring combo box when it is changed via libobs.
Required to make obs-websocket requests work well
2021-11-20 20:00:59 -08:00
tt2468
ff22897d68 libobs/UI: Stop using preprocessor directives for monitor
**Code Cleanup**
Stop using preprocessor directives to determine if audio monitoring
is supported. Use runtime function instead
2021-11-20 20:00:59 -08:00
tt2468
544633d9bb UI: Remove unnecessary calls to RefreshSources()
With the previous commit, these calls to `RefreshSources()` are no
longer necessary.
2021-11-20 19:58:38 -08:00
tt2468
71d7b6855d UI: Refresh source tree when an item source is removed
Previously, calling `obs_source_remove()` on an input would not fully
remove it if there was a scene item of the input on the current scene.

Now, when calling `obs_source_remove()` and there is a scene item of
the removed input on the current scene, the UI refreshes the scene
items, allowing the scene item to be released completely and the
input destroyed.
2021-11-20 19:58:38 -08:00
Ryan Foster
651f01cfef UI: Import Streamlabs Screen Capture source type
Add support for importing the Screen Capture source type from Streamlabs
scene collections. Since the Screen Capture source type is essentially
an abstraction layer for Display Capture, Game Capture, and Window
Capture, this adds some translation logic to translate Screen Capture
sources into one of those source types.
2021-11-21 14:46:14 +13:00
Clayton Groeneveld
8d349ea4aa obs-frontend-api: Add scripting shutdown event
This event is for when scripts need to know when OBS is exiting.
Currently scripts are destroyed before the current exit event.
2021-11-15 10:20:55 -08:00
tt2468
22fa8f8bb0 UI: Add obs_frontend_get_current_record_output_path()
Returns the current path of the record output.
2021-11-13 16:05:52 -08:00
Kurt Kartaltepe
293b7951ed UI: Update python linkage for older compilers
Move the python linkage after the obs target is defined so that we can
also add linker flags to preserve the unused python linkage. This is
required before GCC 11.
2021-11-13 16:00:09 -08:00
Kurt Kartaltepe
1017cd5430 UI: Link python when obs-scripting python is enabled
This fixes #2222 by ensuring python symbols are in the global symbol
table through a direct linkage to the executable. When python is
normally linked via frontend-tools.so its symbols are not global since
we dlopen frontend-tools.so. This causes issues for native python
modules which stopped directly linking python around 3.8 as the symbols
will not resolve.

This is pretty much a hack, but it minimizes the number of extra symbols
we add and hopefully isnt too terrible to maintain.
2021-11-10 14:36:26 -08:00
Anthony Torres
fd500f15a3 UI: Apply transforms/crops correctly to sources on paste
Applies transformations correctly to copy/pasted sources when copy and
pasting multiple. Previously the transformation/crop state was stored in
a single variable on copy so it would only apply the transformations to
one of the selected sources on paste instead of what the state was when
copied.
2021-11-10 14:22:45 -08:00
gxalpha
577d6f1614 UI: Add undo/redo for resetting filters properties 2021-11-10 08:10:16 -08:00
tt2468
feda1aaa28 UI: Add _CHANGING frontend events
Adds the following events:
- `OBS_FRONTEND_EVENT_SCENE_COLLECTION_CHANGING`
- `OBS_FRONTEND_EVENT_PROFILE_CHANGING`

Both emitted right before the change occurs. Can provide plugins with
better awareness of these critical operations happening, so that they
can react accordingly.
2021-11-10 06:36:23 -08:00
Mike
9267c7e53d UI: Update Edit Transform dialog on scene switch
Closes obsproject/obs-studio#4312
2021-11-10 06:08:48 -08:00
gxalpha
a7e0affd36 UI: Don't load existing sources for scene removal undo 2021-11-06 15:08:17 -07:00
gxalpha
509e44d6ea UI: Add undo/redo for context bar text changes 2021-11-06 14:43:58 -07:00
Clayton Groeneveld
af6c719139 UI, libobs, obs-plugins: Fix compiler warnings
Found warnings when compiling OBS.
2021-11-04 06:25:52 -07:00
gxalpha
c565bcaf54 UI: Set correct text in system tray on startup
The system tray assumed all outputs are inactive when it's initiated,
however outputs can be active if started via command line options. This
caused the wrong (only) text to be set if the output was in fact active.
2021-11-04 03:40:17 -07:00
gxalpha
ea90b93c33 UI: Remove duplicated StreamingActive() function 2021-11-04 03:38:45 -07:00
Matt Gajownik
a2c3896e1a UI: Match Windows taskbar state to tray icon
This adds a status icon for active/paused outputs.

Stripped down version of #2442
2021-11-03 09:28:41 -07:00
gxalpha
01d91ee600 UI: Focus correct filter list when opening filter view
When the filter view is created, the first item of the asyncFilters list
would be selected (if the source supports asyncFilters) and have its
properties shown.
This means that when no items were in the asyncFilters list, no
properties would be shown, even if an effect filter was present.

Adds a check to focus the effectFilters list in case there are only
effect filters, which makes the correct properties appear.
2021-11-02 10:33:23 -07:00
gxalpha
25204b3e68 UI: Focus filter list when adding new filter
Fixes an issue where the defaults button wouldn't work since the wrong
list is in focus.
2021-11-02 10:33:23 -07:00
derrod
92f5afae51 UI: Migrate to Helix Twitch API 2021-10-27 14:14:17 -07:00
jp9000
a4146a685b libobs: Allow last encoder error for last output error
(This commit also modifies UI)

This makes it more trivial for encoder plugins to communicate to users
why specifically an encoder error might have occurred mid-stream.
2021-10-25 12:24:16 -07:00
furious
0c1524b53c UI: Add Hotkey filter search and duplicate detection 2021-10-24 08:39:53 -07:00
Grant Likely
0ac286bc27 Themes: Specify QListView instead of QListWidget
Plugins using a QListView widget (e.g. obs-ptz) do not get the theme
settings that are applied to QListWidget. However, QListWidget directly
inherits from QListView, so a theme specifying the QListView will also
get applied to QListWidget. Change the themes to all specify QListView
so that theming is consistent.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2021-10-24 02:23:55 -07:00
Jim
355eb4b8df
Merge pull request #5269 from jpark37/wasapi-cleanup
win-wasapi: WASAPISource improvements
2021-10-24 02:16:40 -07:00
Clayton Groeneveld
d9b4fbba1a UI: Disable properties for groups in context menu
Makes it consistent with the source context menu.
2021-10-24 02:06:19 -07:00
Clayton Groeneveld
13c7998cb5 UI: Fix vertical/horizontal scene item alignment
If the transform position alignment was set to anything but
top left, or the item was flipped, the item would be moved to
the the wrong position when centering vertically or horizontally.
2021-10-24 02:01:56 -07:00
Matt Gajownik
ffa733bd7f UI: Remove duplicate minimum width definition 2021-10-24 19:33:09 +11:00
Jim
5a9d4d1b26
Merge pull request #5411 from derrod/yt-fixes
More YouTube fixes
2021-10-24 00:47:51 -07:00
Matt Gajownik
b03dc67a62 UI: Clean up XML warnings in layout files 2021-10-24 00:42:05 -07:00
Matt Gajownik
2568a5106d UI: Add Qt XML Schema definitions for validation
As all the .ui files follow a set schema, providing a way to validate
that schema is useful for manual XML modifications.

XML-Schema-Qt5.15.xsd source: https://doc.qt.io/qt-5/designer-ui-file-format.html
Note: some lines had to be commented out as they are not valid in XSD.
When a new version of Qt is used, compare the diff and update as necessary.

This file doesn't do anything on its own, but can be paired with an IDE
or a standalone linter to perform validation.
2021-10-24 00:42:05 -07:00
Clayton Groeneveld
96a5e11cd9 UI: Cleanup advanced audio functions
This removes the AdvAudioPropsClicked and AdvAudioPropsDestroyed
functions. The click function was not being used anywhere and the
destroy function was redundant because the dialog is set
to be deleted on close.
2021-10-24 00:21:10 -07:00
Morgan Rose
ccdf624c44 UI: Refactor Frontend API and header
Moved getters to be before setters. Moved functions in cpp file to match the order of their declarations in the header file.
2021-10-24 00:17:22 -07:00
Clayton Groeneveld
dae03c8a9f UI: Change position of filters defaults button
The button was not on the left side, as other default buttons are in
the UI.
2021-10-24 00:11:54 -07:00
Clayton Groeneveld
bb43a6fa7c UI: Make transition duration suffixes consistent
The suffixes for the source and override transition durations
were not consistent with the transition dock duration.
2021-10-24 00:10:45 -07:00
Matt Gajownik
8f1d2458bf decklink-captions: Build with Windows file descriptor
Additional details: #1944
2021-10-17 18:25:58 +11:00
James Beddek
5fccf86b07 UI: Fix build with Clang and libc++
std::bind conflicts with extern int bind defined in socket.h

Signed-off-by: James Beddek <telans@posteo.de>
2021-10-16 16:14:32 -07:00
VodBox
19ced32c58 UI: Translate to current OS for all colection imports
Importers are written to convert third-party collection formats to a
Windows OBS scene collection. The Studio importer is capable of
translating scene collections to the correct types for the current
operating system. This change makes it so all imports will be ran
through the Studio translation, not just Studio and SL collections.
2021-10-16 15:34:53 -07:00
VodBox
8a132ad69f UI: Resolve relative paths on scene collection import
This change makes it so any strings in a scene collection that start
with "./" are checked as being a relative path. As long as the resulting
absolute path is contained within the same directory as the collection
being imported, it will be replaced with an absolute path.

This allows scene collections to be effectively "packaged" with assets,
so long as the assets are contained somewhere within the folder the
collection is being imported from.
2021-10-16 15:34:53 -07:00
gxalpha
5c26bf06f0 UI: Use correct color property for freetype in toolbar 2021-10-16 15:30:41 -07:00
gxalpha
4bd69bf46e UI: Make toolbar color selectors respect alpha 2021-10-16 15:30:41 -07:00
gxalpha
8f0964c2dd UI: Don't save defaults in oldSettings in properties
The default settings were saved in the oldSettings variable of the
properties dialog in `86eb7ae` to be able to restore default settings in
undo/redo, but this doesn't actually do anything.
Besides this, it introduced a bug where clicking "Cancel" in the
properties dialog would save all settings, including default ones, as
well as a bug where not changing anything in the properties dialog would
still add an undo action.
2021-10-16 15:07:13 -07:00
jp9000
b173d1ce2c UI: Disable paste source menu items when removed
Disables the "Paste (Reference)" and "Paste (Copy)" for sources when the
sources that have been copied have been removed

Fixes obsproject/obs-studio#4074
Closes obsproject/obs-studio#4096
2021-10-15 22:11:03 -07:00
jp9000
52497d23bb UI: Don't copy via name, use weak refs
This change makes it so that when copying filters or sources, that it
stores a weak reference to the source(s) or filter(s) being copied
rather than relying on their names.
2021-10-15 22:10:33 -07:00
Mike
96449877ef UI: Update Edit menu item states before displaying
Originally, the states of the items in the Edit menu would only update
when a context menu popup was created for sources. This moves that code
out of the context menu creation, and into its own dedicated function.
That function is then used both before the Edit menu is shown, and
before the context menu is created.

Fixes obsproject/obs-studio#3827
2021-10-15 16:11:08 -07:00
derrod
9d8a011b78 UI: Fix broadcast button state for autostart without autostop 2021-10-13 12:41:49 +02:00
derrod
2170a6b8ac UI: Show warning if starting/stopping broadcast fails 2021-10-13 12:27:47 +02:00
derrod
bd45d46c3c UI: Fix YT broadcast start/stop failing due to redundant transition/reset
- If the stream is already live or going live, do not reset or
  transition
- If the stream is testing, transition but do not reset
- If the stream is starting a test, error out since this can take a
  while
- If the attempted transition was redunant, still return a success

Fixes #5403
2021-10-13 12:27:47 +02:00
jp9000
c46a719c9c UI: Fix formatting with both 12.0.0 and 12.0.1
This single line in the entire project causes a difference between
clang-format 12.0.0 and 12.0.1. So, just rearrange the code so it works
with both instead.
2021-10-13 02:44:31 -07:00
jp9000
de0610a03a UI: Fix formatting for clang-format 12.0.0 (I guess)
I guess visual studio uses 12.0.0 rather than 12.0.1 and apparently,
there's some ****ing difference between 12.0.1 and 12.0.0.

Whatever.
2021-10-13 02:22:31 -07:00
jp9000
095661905b UI: Fix formatting with clang-format 12 2021-10-13 02:12:18 -07:00
Ryan Foster
5f68991911 clang-format: Commit file changes for clang-format 12 2021-10-13 20:00:04 +11:00
PatTheMav
39aedc6c2f UI: Add new vector-based menubar icons for macOS 2021-10-12 08:33:54 +11:00
jpark37
86b607154a UI: Add support for real-time work queue 2021-10-10 19:53:27 -07:00
jpark37
64cb26d03d UI: Tuck variable inside macro guard 2021-10-10 19:12:45 -07:00
jpark37
e181a23bed UI: Remove NOMINMAX from CMake scripts
If we want NOMINMAX globally, we should probably define at top level.
2021-10-10 19:12:45 -07:00
jpark37
c93b040d0d UI: Use patterns that avoid std::min/max
New code is cleaner anyway.
2021-10-10 19:12:45 -07:00
Matt Gajownik
4681e10fdf UI: Improve installer, add release notes & Quickstart link
* Use AppName & AppVersion consistently in Installer
* Update various strings in installer
* Remove duplicate icon file for installer
2021-10-10 17:19:10 +11:00
Matt Gajownik
115973b1ed UI: Log compiled & runtime Qt versions 2021-10-10 10:21:19 +11:00
Mike
e6a3d2b8f2 UI: Add restart message on profile change
When a profile changes settings that require a restart, show a dialog to
ask the user whether they'd like to restart.

Co-authored-by: Jim <obs.jim@gmail.com>

Closes obsproject/obs-studio#3207
2021-10-07 11:49:21 -07:00
Bob van de Vijver
1b280e0ac4 UI: Add ShutDownActiveOutputsOnExit setting
Adds a new setting to the general OBS settings, which can be checked
in order to no longer show the "confirm close" dialog when there are
still streams/recordings running.
2021-10-07 09:07:06 -07:00
jp9000
da04907927 Revert "UI: Disable hotkeys when a user is expected to type text"
This reverts commit f832d14220.

Reverting this until we do more investigation. Currently, any text
that can be typed in a dialog requires the dialog to re-enable hotkeys
on destruction, which is frustrating. There has to be a better way.
2021-10-03 07:52:44 -07:00
Norihiro Kamae
669a615983 UI: Fix tab stop order for Draw safe areas
A tabstop definition was missing on the commit afd58a78e.
2021-10-02 06:00:23 -07:00
derrod
a18178f631 UI: Do not disable AutoConf bandwidth test for YouTube
Also code-cleanup
2021-10-02 05:55:53 -07:00
derrod
7d6b61ad8c UI: Fix Twitch bandwidth test checkbox 2021-10-02 05:42:59 +02:00
Richard Stanway
4395005a24 UI: Remove thread from YouTube auto config
This was causing crashes on auto config dialog creation, as Qt GUI
objects can only be safely accessed from the main thread. Fixes #5364.
2021-10-01 13:57:48 -07:00
Warchamp7
1d040a8c66 UI: Adjust minimum size of source toolbars smaller
#5187 added a minimum size enforcement on the source toolbar to ensure
it remains functional at lower window sizes.

That minimum size was set to 800 pixels, which causes issues for
users on 1366x768 monitors in a vertical orientation.

This is still a rather common resolution, so this reduces the minimum
size below 768
2021-10-01 09:37:54 -07:00
derrod
698ed54870 UI: Add missing Auth::Load() when duplicating/creating profile 2021-09-27 18:42:01 +02:00
Vainock
11a690b038 Update translations from Crowdin 2021-09-24 09:42:08 -07:00
jp9000
2be0d6b8ef Revert "UI: Update volume controls by callback"
This reverts commit 0a3cd8fbf6.

Causes volume levels to freeze if audio stops.
2021-09-23 09:27:30 -07:00
Ryan Foster
10810d9730 UI: Prevent Restream OAuth disconnection
Fix the service check for services where its name in the UI does not
match its Auth::Def service string.

In Restream's case, the service name in the UI and rtmp-services is
"Restream.io" while the service name in its Auth::Def is "Restream".
This mismatch causes the `service_check` bool to be false, whereas the
previous condition (`!!main->auth && service.find(main->auth->service())
!= std::string::npos`) would have evaluated to true.

This was broken in commit e6f1daab8c.

Fixes GitHub Issue 5290.
2021-09-22 22:56:41 +02:00
jp9000
c459e8954c UI: Fix enter/esc when hotkeys are disabled in focus
Fixes an issue where enter/escape/return would not work in the program
if hotkeys were disabled while in focus. No other known keys were
affected by this filter issue.
2021-09-20 08:19:13 -07:00
jp9000
a73586b8b1 UI: Use STL random as fallback
For Linux distros still living in the stone ages, use the old
randomization code. Fixes CI not building. We can change it later when
we finalize good random stuff.
2021-09-17 02:59:21 -07:00
derrod
8c9bb3a84b UI: Fix AuthListener error HTTP response body 2021-09-16 15:03:28 +02:00
derrod
37ab69aa46 UI: Abort YouTube login on cancel or listener fail 2021-09-16 14:56:46 +02:00
Richard Stanway
422a206371 UI: Force minimum reconnect delay of 1 second
Setting this to zero breaks reconnecting (and OBS) entirely as various
parts of the reconnect system do not handle zero values properly, and
there are also possible race conditions with the reconnect thread. Set a
minimum of 1 second to avoid this.
2021-09-16 03:32:46 -07:00
Matt Gajownik
8265a8653f UI: Remove test YouTube QSS from Dark theme 2021-09-16 19:00:45 +10:00
jp9000
27efd76125 UI: Add label/widget buddying to YouTube dialog
Adds missing label/widget buddying to the appropriate widgets within the
YouTube Actions dialog.

Closes obsproject/obs-studio#5284
2021-09-15 06:32:28 -07:00
Richard Stanway
4687e99563 UI: Use secure RNG for generating YouTube state parameter
mt19937 is a deterministic RNG and was not seeded, so the state
parameter was identical for all runs. Switch to using Qt's
QRandomGenerator::system() which is implemented as a CSPRNG on
all platforms we care about.
2021-09-15 06:16:29 -07:00
Richard Stanway
0a13ce851d UI: Properly verify state parameter for YouTube auth
Very low risk of anything bad here since we use a random port and the
chance of a CSRF attack is tiny, but this is a best practie to do when
using OAuth.
2021-09-15 06:16:29 -07:00
Warchamp7
1588357583 UI: Update Acri theme styling
Adds new styling for checked buttons when
they are pressed or hovered

Adds a hover styling for dropdown boxes
2021-09-15 19:22:48 +10:00
Warchamp7
3909c311f1 UI: Update dark theme button styling
Reorder styling so that checked buttons can still
get hover styling.

Add a distinct background color for disabled
buttons. Fixes the text being the same color
as the button when disabled.
2021-09-15 19:22:48 +10:00
Jim
7d5c11de2d
Merge pull request #5216 from derrod/yt-thumbnail-upload
UI: Add Thumbnail uploading to YouTube integration
2021-09-15 00:26:56 -07:00
derrod
7f2efbdb28 UI: Fix loading auto start/stop setting in YT dialog
The checkboxes need to be enabled for setting the checked state to
succeed.
2021-09-15 08:16:40 +02:00
derrod
39bbbb41dc UI: Add thumbnail option to YouTube broadcast setup 2021-09-15 07:49:39 +02:00
derrod
2dd8049aef UI: Add postDataSize option to GetRemoteText
In order to be able to POST binary data that may contain NULL-bytes we
must manually specify the size of the array, otherwise cURL will fall
back to `strlen()`.
2021-09-15 07:44:55 +02:00
Jim
5c9aa83e05
Merge pull request #5242 from derrod/yt-better-buttons
Adjustments to YouTube Broadcast Setup
2021-09-14 16:36:34 -07:00
tt2468
1f504c6ba4 UI: Fix used source for SetCurrentScene during undo 2021-09-13 19:17:11 +10:00
tt2468
63a570ed00 UI: Remove unused RemoveSelectedSceneItem slot
Appears to be a remnant left by the undo/redo system changes, not used
at all by any parts of the UI. This slot does not have undo/redo
system functionality, so it is not useful in its current form.
2021-09-13 01:38:23 -07:00
jpark37
4614c0574e UI/updater: Remove dependency on psapi.lib 2021-09-12 14:10:36 -07:00
derrod
136ff7b8a3 UI: Check selected broadcast when re-opening YT dialog 2021-09-12 19:58:01 +02:00
derrod
2535414923 UI: Change YouTube Broadcast Dialog title
Also uses cached username rather than making an API request.
2021-09-12 19:57:28 +02:00
derrod
35602e3249 UI: Add remember settings checkbox to YT broadcast setup
Co-authored-by: cg2121 <claytong1214@gmail.com>
2021-09-12 13:45:55 +02:00
derrod
ca3f244584 UI: Rework YouTube broadcast setup flow 2021-09-12 13:45:51 +02:00
Tommy Vercetti
5912074271 UI: Add -DNOMINMAX to CMake on MSVC 2021-09-11 15:50:06 -07:00
derrod
1e98c9a0be UI: Disable reconnect for bandwidth test
Trying to reconnect would cause a hard crash of OBS rather than going to
the failed state. Therefore disable reconnects when doing bandwidth
testing.
2021-09-10 10:26:13 -07:00
derrod
85f9a8661b UI: Enable AutoConfig bandwidth test for YT integration 2021-09-10 10:26:13 -07:00
Ryan Foster
bb5820b882 UI: Fix Qt6-incompatible operator usage
Commit 60d95cb5 introduced some code that used the + operator on two
Qt::Modifier items. Using a pipe operator instead fixes the compilation
error on Qt5 and Qt6.
2021-09-10 10:23:24 -07:00
Ryan Foster
fd2aaf92b9 UI: Fix Qt6-incompatible call to QLocale::setDefault
The YouTube integration changes introduced code that does not build on
Qt6. The errors were:

 * void QLocale::setDefault(const QLocale &)': cannot convert argument 1
   from 'QString' to 'const QLocale &'

 * no suitable user-defined conversion from "QString" to "const QLocale"
   exists

This commit creates a new QLocale in place from a QString using the
`QLocale(const QString &name)` constructor, and passing that QLocale to
QLocale::setDefault.
2021-09-10 10:23:24 -07:00
jpark37
0a3cd8fbf6 UI: Update volume controls by callback
Gets rid of the time-critical timeSetEvent thread on Windows.
2021-09-10 10:21:19 -07:00
derrod
e2b7597fb0 UI: Fix YT chat being shown when selecting private event 2021-09-05 10:30:20 +02:00
derrod
d6f00ccfd7 UI: Only start YT check thread if auto-start is disabled 2021-09-05 04:04:46 +02:00
Ryan Foster
f832d14220 UI: Disable hotkeys when a user is expected to type text
Disable hotkeys when a user starts an interaction with the UI where they
are expected to type text and re-enable hotkeys when the interaction is
completed.
2021-09-04 15:22:21 -07:00
derrod
ee30a83a6f UI: Remove obsolete/unused struct members 2021-09-04 01:58:38 -07:00
derrod
d5f3ddabd1 UI: Restore auth reset when switching services
Fixes #5236
2021-09-04 01:58:38 -07:00
derrod
79e21eaea3 UI: Remove unused struct 2021-09-04 01:58:38 -07:00
Warchamp7
6995a7b5ae UI: Fix vertical stretching in audio settings pane
The fixes in #5143 caused the audio pane in settings
to stretch out to fit the available space.

Add a spacer so the pane only uses the space it needs.
2021-09-03 21:28:16 -07:00
derrod
a04bd742d7 UI: Use OBS locale for YouTube categories API 2021-08-31 17:59:51 -07:00
derrod
aba94c71e2 UI: Fix missing broadcast state reset on force-stop 2021-08-30 22:30:27 -07:00
derrod
5ea7aa3b7e UI: Start YouTube check thread after output starts
Fixes #5199
2021-08-30 22:30:27 -07:00
derrod
c52d127286 UI: Actually set AutoConfig bitrate max to 51 Mbps
Somebody snuck in an extra 0...
2021-08-30 13:50:12 +02:00
derrod
fe34a4f974 UI: Change YouTube description input to QPlainTextEdit 2021-08-29 22:55:59 -07:00
derrod
d16af0180d UI: Bump AutoConfig bitrate maximum to 51 Mbps
Several of the services included in OBS support bitrates higher than
10,000 kbps, YouTube being the new maximum at 51,000.
2021-08-30 03:29:08 +02:00
derrod
7ae6f328a1 UI: Add missing properties to ResetBroadcast 2021-08-29 01:19:16 +02:00
Exeldro
ffa9cd15e4 UI: Fix crash when output source 0 is null 2021-08-28 01:45:28 -07:00
Warchamp7
b34e6ae76b UI: Fix disabled auto-start/stop checkboxes
The YouTube integration auto-start and auto-stop checkboxes are only
made visible when scheduling an event. However, they are disabled by
default so users can't change them when they're visible.

I suspect these checkboxes used to always be visible and were on an
enable/disable flip which got changed to a visibility flip.
2021-08-27 13:01:10 +02:00
Clayton Groeneveld
6c10e9c3ac UI: Update png to svg in ui files
The icons in the main and filter ui files, were still using
png instead of svg.
2021-08-25 19:54:52 -07:00
gxalpha
4382591be3 UI: Remove "Fullscreen Interface" menu on macOS
Removes the "View" -> "Fullscreen Interface" menu entry on macOS, since
macOS automatically adds an entry doing the same thing by itself.
2021-08-25 19:39:58 -07:00
Warchamp7
2f637ede0f UI: Fix source toolbar shifting when nothing is selected
#5125 added icons to the source toolbar but no icon is displayed when nothing is selected.

This adds a spacer on the right side of the label that gets toggled inversely to the source icon, to maintain the same width
2021-08-25 11:40:43 -07:00
Warchamp7
6e566f9b23 UI: Adjust minimum size of source toolbars
Sets a minimum size on the source toolbar itself to prevent shrinking the main window too small for it to be useable in some cases.

Also sets some sane limits on the toolbars with dropdown menus and the image source toolbar filepath
2021-08-25 02:09:51 -07:00
jp9000
8f97e32227 UI: Allow overriding keyframe interval if smaller
Allows the ability to override the default keyframe interval via
advanced output mode as long as that interval is smaller than the
recommended keyframe interval.

Fixes an issue where it was impossible to set a lower keyframe interval
than the recommended keyframe interval.
2021-08-24 19:41:43 -07:00
jp9000
a6fdc47535 UI: Cache YouTube channel name
This prevents having to look up the YouTube channel every time the
settings window is opened.

Closes obsproject/obs-studio#5154
2021-08-24 18:44:34 -07:00
Warchamp7
e5dd5b4595 UI: Adjustments to YouTube integration strings
Various tweaks to phrasing, casing, and consistency with other places in the UI
2021-08-23 21:56:11 -07:00
derrod
18f40be820 UI: Add YouTube Chat Dock
Since embedded browsers are no longer allowed to log into Google from the chat
dock is effectively read-only.
To prevent users from even trying to log in the input field is hidden
via custom CSS.
2021-08-23 18:28:23 -07:00
Matt Gajownik
6e6263b185 UI: Fix incorrect OBSTheme definition for highlighted text color 2021-08-23 17:14:22 -07:00
Matt Gajownik
e03aeb9bfd UI: Use Palette in all default themes
This also replaces hex colours with RGB.
2021-08-23 17:14:22 -07:00
Matt Gajownik
58caf406cd UI: Load theme palette before loading theme
This ensures the theme loads its own palette colours rather than default.
2021-08-23 17:14:22 -07:00
Warchamp7
ba616fbac2 UI: Add styling for YouTube integration 2021-08-23 06:16:38 -07:00
Richard Stanway
f131c0c36b UI: Use inline const for shared vector
Issue detected by PVS Studio.
2021-08-22 17:12:00 -07:00
Richard Stanway
64f3b29e02
Merge pull request #4678 from cg2121/logviewer-fixes
UI: Log viewer fixes
2021-08-21 21:59:05 +02:00
jp9000
5968119c61 UI: Hide auto-start/auto-stop options in YouTube dialog
Having these widgets visible but disabled will only serve to confuse
users, so these widgets don't even need to be visible if the user isn't
performing a scheduled broadcast. There really isn't a purpose in having
them visible.
2021-08-21 06:51:46 -07:00
jp9000
bbad7f3e1f UI: Replace bad YouTube link with popup helper
The helper link associated with starting a scheduled broadcast was not
helpful, as it linked to developer API documentation. Instead, have the
helper widget pop up a tooltip so the user understands what it is doing,
and adjust the wording slightly so that the user knows it's a setting
primarily used for scheduled broadcasts (normal streams always start
right away)
2021-08-21 06:49:34 -07:00
jp9000
a668e01788 UI: Fix minor leak
The authors of this function didn't realize that the data object
returned from obs_service_get_settings() is incremented, and must be
released.
2021-08-20 18:47:26 -07:00
Clayton Groeneveld
afd58a78e5 UI: Add option to draw safe areas in preview 2021-08-20 15:20:59 -07:00