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

718 Commits

Author SHA1 Message Date
jpark37
9409ce1ea7 UI: Add Rec. 2020 space and I010/P010 formats
Also localize color spaces with improved naming. Should be compatible
with existing user profiles.
2022-04-07 02:38:33 -07:00
gxalpha
e33b7d2dab UI: Disable wheel scrolling on QComboBoxes
Adds a new ProxyStyle, OBSIgnoreWheelProxyStyle, and applies it to the
entire program. This style sets a StyleHint to disable mouse wheel
scrolling on QComboBoxes.
The existing OBSProxyStyle, which is used only for the context bar, has
been renamed accordingly.
2022-04-02 16:04:51 -07:00
jpark37
f2b049c0e7 UI: Add support for nonlinear SRGB blending 2022-04-02 16:02:41 -07:00
Richard Stanway
a8ecf3c8f2
UI: Fix display affinity logic when re-applying
The old behavior toggled display affinity every time the window was
updated instead of applying it consistently.
2022-03-31 17:23:53 +02:00
jp9000
e236a16715 libobs: Refactor hide/show transition functions
Having two separate functions for each hide/show transition action is
silly and makes code awful.
2022-03-24 22:32:41 -07:00
jpark37
cd22df09c9 libobs, UI: Add SDR white nits option 2022-03-23 22:35:26 -07:00
PatTheMav
1f0f2be15e
UI: Update CMakeLists.txt for main OBS app 2022-03-16 23:11:58 +01:00
cg2121
24e4cd1717 UI: Fix mixer hide toggle in studio mode
If the user would toggle hide in mixer in studio mode,
the source would show up in audio mixer, even if it
wasn't active.
2022-03-08 13:18:05 -08:00
Matt Gajownik
372b54ca7a UI: Display dock-relevant context menu on titlebar 2022-03-08 12:36:19 -08:00
cg2121
8c732d31a7 UI: Disable replay save button when paused
Another indicator to the user that replays can't be saved
when recordings are paused.
2022-03-08 12:32:27 -08:00
jp9000
61cbfb3b9a UI: Use get_new_source_name instead of strprintf
Remove a bit of duplicated code, and fix non-Windows compilation. This
is a bit of a workaround to not have to modify cmake, but might as well
reuse a function that already exists anyway rather than duplicate the
code.
2022-03-08 01:27:20 -08:00
jp9000
6dd65c8d13 UI: Fix duplicated source names in audio settings
When you add an audio capture source and use the "use existing" feature
in the source selection dialog, and then recreate the same audio source
again in audio settings, it will result in two sources using identical
names, which although relatively harmless can cause issues when doing
things such as trying to find sources by their name.

Fixes obsproject/obs-studio#5621
Closes obsproject/obs-studio#5947
2022-03-08 01:05:27 -08:00
cg2121
1a2e5035c3 UI: Remove OBSSceneItem QDataStream
Since the source list is a custom list model, the
QDataStreams for OBSSceneItem are not needed.
2022-03-05 15:59:30 -08:00
gxalpha
dd564a2e8f UI: Move "Check For Updates" menu to app menu on macOS
For apps using sparkle, it's normal for the "Check For Updates" button
to be in the app menu instead of the help menu, so let's put it there.
2022-02-27 12:47:18 +11:00
jpark37
61ffb5c4d8 UI: Add OBSQTDisplay::OnMove()/OnDisplayChange()
This plumbing will be useful when handling color space changes.

Currently does nothing, and only Windows is wired for now.
2022-02-26 01:09:07 -08:00
gxalpha
d5f2b7e496 UI: Refresh edit menu on item select/deselect 2022-02-19 15:42:57 -08:00
Matt Gajownik
eb7d6e84aa UI: Add separators to system tray context menu 2022-01-29 14:01:34 +11:00
gxalpha
9c51b70dd0 UI: Fix unused variable warning on non-windows 2022-01-29 13:30:17 +11:00
jp9000
c87a81ba56 UI: Show wait cursor while cleaning up scene data 2022-01-28 10:30:42 -08:00
Richard Stanway
5ed45d06da
UI: Check current affinity before calling SetWindowDisplayAffinity
For some reason, SetWindowDisplayAffinity can make windows visible even
when it sets the same value for affinity that GetWindowDisplayAffinity
reports. Possibly an API bug as this is probably not a widely used API
yet?

Fixes a weird window with no size appearing when browsing for files on
Windows.
2022-01-27 02:47:11 +01:00
gxalpha
799ac3f6a0 UI: Fix transform options being wrongly enabled/disabled
They detection for this was not checking the n selected items but the
first n items in the list, which would lead to the options being enabled
or disabled based on the whether other items were locked.
2022-01-25 05:58:47 -08:00
Richard Stanway
076cd5d5d4 UI: Add option to hide OBS windows on Windows
This uses the SetWindowDisplayAffinity API to hide windows from capture
applications (including OBS). This is not perfect - internal windows
such as context menus, combo box dropdowns, etc will still be displayed.
Even with these limitations, it should help people with single monitors
capture content with less interference from the OBS window.

This implementation is for Windows only but the code is generic enough
that adding other platforms should be straightforward.
2022-01-22 15:14:16 -08:00
Cody Jung
fab293a686 UI: Remove Apple deferred tray load
With the change to how initial startup minimizing-to-tray works,
we can remove the Apple-specific workaround.
2022-01-07 20:15:03 -08:00
Cody Jung
35b9c76495 UI: Fix flash when starting minimized
Rather than showing the main window, then hiding it again when the
tray icon initialization happens, just don't show the main window.

When deciding whether to show the window, we need to know whether
the tray icon is available or not - if it's not and we don't show
the window, there would be no way to restore OBS.
2022-01-07 20:15:03 -08:00
Cody Jung
8929798d4d UI: Immediately apply tray icon change on Apply
Rather than waiting until the user chooses OK or Cancel to update the
system tray icon status, update it when the user chooses Apply.
2022-01-05 20:53:17 +11:00
Matt Gajownik
65b4ba7939 UI: Fix compile error in UpdateEditMenu from rebase 2022-01-05 17:12:55 +11:00
gxalpha
5b87a842ee UI: Correctly enable edit menu items with multiple sources 2022-01-04 21:39:57 -08:00
gxalpha
648b47a6f5 UI: Reenable copy/paste transform 2022-01-04 21:39:57 -08:00
jp9000
f295bd9968 Revert "UI: Add checks for overwrite setting to replay buffer"
This reverts commit 02f3495b72.

Multiple issues have come up with this commit. One issue is that
suddenly replays are overwriting themselves despite the option being
disabled. Second issue is that slashes to separate files into
subdirectories no longer work properly with replay buffers.

I'm just reverting it. I do not care enough about this feature to try to
fix it or wait on a fix. If someone wants to fix it they can create a
new PR for it.
2022-01-04 20:42:58 -08:00
gxalpha
9f15a58483 UI: Correctly disable "Paste Duplicate" if required 2022-01-04 02:01:28 -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
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
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
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
Mike
02f3495b72 UI: Add checks for overwrite setting to replay buffer 2021-12-17 06:49:44 -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
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
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
Matt Gajownik
0b67dc0285 UI: Uniquely identify Custom Browser Docks 2021-12-04 15:08:46 -08:00
VodBox
3d544653e8 UI: Cleanup libobs C++ type use 2021-11-26 23:23:51 +13: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
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
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
gxalpha
e6dc6c2d94 UI: Recreate nested scenes on scene delete undo 2021-11-23 22:00:47 -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
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
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
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
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
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
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
Jim
5a9d4d1b26
Merge pull request #5411 from derrod/yt-fixes
More YouTube fixes
2021-10-24 00:47:51 -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
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
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
64cb26d03d UI: Tuck variable inside macro guard 2021-10-10 19:12:45 -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
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
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
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
derrod
ca3f244584 UI: Rework YouTube broadcast setup flow 2021-09-12 13:45:51 +02: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
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
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
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
ba616fbac2 UI: Add styling for YouTube integration 2021-08-23 06:16:38 -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
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