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

2087 Commits

Author SHA1 Message Date
tt2468
9ca70f4470 UI: Add obs_frontend_get_current_profile_path()
Returns the path of the current profile's location on the filesystem.
2021-07-09 17:39:40 +12:00
Matt Gajownik
74c3781554 libobs, UI: Add support for button properties as links
This adds support for a button property that opens a URL, after showing
a confirmation dialog to the user. Both the Type and URL must be set.
2021-07-09 17:32:09 +12:00
Bruce Zhang
7baf08e917 rtmp-services: add bilibili live 2021-07-08 09:44:28 -07:00
Matt Gajownik
5485a91d4c UI: Log Show/Hide transitions on scene collection load 2021-07-04 08:25:33 -07:00
Rat
c1deaf9c3f UI: Fix audio mixer UI not updating from threads
When changing a source's audio mixers/tracks or sync offset with
obs_source_set_audio_mixers or obs_source_set_sync_offset
from a non UI thread while the advanced audio properties panel is open
the UI fields will not update until closed and reopened.

It just shows an error on stderr for the failed invokeMethod calls
that would do the update. For mixers and sync offset respectively:
QMetaMethod::invoke: Unable to handle unregistered datatype 'uint32_t'
QMetaMethod::invoke: Unable to handle unregistered datatype 'int64_t'

Added needed Qt registrations in window-basic-main as that's where
all the needed ones for the frontend UI seem to be put.
2021-07-04 04:34:06 -07:00
gxalpha
7526bf76ff UI: Check if recording is paused when trying to pause
Adds a safety check to the pause-functions, double-checking that they
won't be called whether it is already in the desired state
2021-07-01 00:23:58 -07:00
Matt Gajownik
cf9899bade UI: Handle HTTP errors for fetching remote files 2021-06-30 01:46:50 -07:00
Matt Gajownik
1517062251 UI: Handle & log HTTP errors for RemoteTextThread
This includes the Patreon fetcher & the log/crash report uploader
2021-06-30 01:46:50 -07:00
Ryan Foster
1fa45e63a3 UI: Remove fractional scaling ifdefs
Among the systems we officially support, the oldest Qt version is Qt 5.9
on Ubuntu 18.04. Fractional scaling is supported in Qt 5.6 and newer. We
should be able to safely remove these ifdefs.
2021-06-30 01:42:01 -07:00
Ryan Foster
b496f43d45 UI: Make projector display resolutions DPI-aware
Follow up to PR #3988 and commit
5cdd084c7f.
Without this change, displays listed as projector targets on systems
using a fractional scaling factor (e.g., 125%, 150%, 175%) will show an
incorrect width and height for their size. For a display with 125%
scaling, OBS would show 1536x864 instead of 1920x1080. With this change,
it will show 1920x1080.
2021-06-30 01:24:02 -07:00
jp9000
f7dcb6afd6 UI: Fix win uninstall not deleting desktop shortcut
The Windows uninstaller was not deleting the desktop shortcut because
the shell context was incorrectly set to "current" for it, causing it to
try to delete in the incorrect location.
2021-06-22 19:05:43 -07:00
Matt Gajownik
3cc4feb8dd UI: Fix code indentation for Edit Undo/Redo 2021-06-13 15:36:22 +10:00
Matt Gajownik
dcd491541e UI/installer: Silently install Visual C++ Redist
Requires redistributables in the install build directory.
2021-06-11 23:12:30 -07:00
jpark37
cd5873e9bc UI: Fix unused parameter warning 2021-06-11 07:20:50 -07:00
Translation
ef2b1eb1c6 Update translations from Crowdin 2021-06-11 07:18:15 -07:00
jp9000
2d524580fe UI: Fix context bar crash
This crash was caused by the fact that the SourceToolbar::oldData member
variable was not being released correctly. To release an OBSData object,
it must be either destructed, set to a new value, or set to a null
value.
2021-06-10 14:33:32 -07:00
Ryan Foster
e0edd753ad UI: Handle mac-vth264 encoder ID change
Before OBS Studio 27, we used our own hard-coded internal encoder IDs on
for the mac-vth264 plugin: vt_h264_hw and vt_h264_sw. As of OBS Studio
27, we changed to using the encoder IDs that Apple's API reports.
Specifically, this behavior occurs due to PR #4105 and commit
6a9f25c8ea.

Unfortunately, this change in encoder IDs failed to take into account
existing user configurations, resulting in users with broken encoder
settings. This change attempts to gracefully upgrade user configurations
to handle the changed encoder IDs.

Fixes #4799.
2021-06-09 17:14:32 -07:00
Exeldro
5998f4cc4d UI: Optimize backup scene for undo/redo 2021-06-08 23:29:17 -07:00
Ford Smith
2ae593860d UI: Fix filters changes not properly being added to undo stack 2021-06-07 21:47:03 -07:00
Matt Gajownik
4d647d8d15 UI: Translate Undo action "Delete Scene" and include scene name 2021-06-06 11:05:47 -07:00
Matt Gajownik
94404a4d28 UI: Don't execute or track empty SceneItem move actions
This would appear as "Undo Move '' in 'Scene Name'"
2021-06-05 20:07:57 -07:00
jp9000
2b69adf3bc Revert "UI: Cleanup on_scenes_currentItemChanged function"
This reverts commit c497342fd6.

Fixes a bug where the sources list would not update after 5b25dec714.
2021-06-04 20:44:20 -07:00
jp9000
5b25dec714 Revert "UI: Fix spamming of log when setting current scene"
This reverts commit 9ca7e1cb0f.

Fixes obsproject/obs-studio#4801
2021-06-04 18:56:28 -07:00
Ryan Foster
5517db5122 UI: Disable Copy Filters in scene list for scene with no filters
When you right-click on a source in the Sources list that does not have
any filters, the "Copy Filters" item is disabled. When you right-click
on a scene in the Scenes list that does not have any filters, the "Copy
Filters" item is enabled. This fixes the Scenes context menu to behave
like the Sources context menu.
2021-06-02 03:39:26 -07:00
Ryan Foster
efb2dc70b9 UI: Disable Copy Filters in Audio Mixer for source with no filters
When you right-click on a source in the Sources list that does not have
any filters, the "Copy Filters" item is disabled. When you right-click
on an audio source in the Audio Mixer that does not have any filters,
the "Copy Filters" item is enabled. This fixes the Audio Mixer context
menu to behave like the Sources context menu.

Fixes #4790.
2021-06-02 03:39:26 -07:00
jp9000
457adcedd3 UI: Disable drag/drop on Linux scenes/sources (for now)
Due to a Qt issue on Linux, disable drag/drop on the scenes/sources list
on Linux for the time being.
2021-05-31 12:18:45 -07:00
jp9000
fb42a2ad8c UI: Remove scene collection undo/redo actions 2021-05-30 11:54:46 -07:00
Gol-D-Ace
90df8d44df Update translations from Crowdin 2021-05-30 20:33:35 +02:00
jp9000
dfff6bcfd6 UI: Fix OBS signal recursion
SourceSyncChanged() would call syncOffsetChanged() because it's
connected to the widget.  This is fixed by blocking signals

This bug was discovered because undo/redo actions for sync offset
changes were triggering the creation of new undo/redo actions within
their own callbacks.

Fixes obsproject/obs-studio#4760
2021-05-28 11:29:58 -07:00
Ed Maste
8dd612e37f UI: Correct add_action repeatable arg type
FreeBSD build fix.  repeatable is a bool, so pass false instead of NULL.
2021-05-23 03:34:39 -07:00
jpark37
2dc87dcd7f UI: Fix null string being passed to blog() 2021-05-21 23:45:15 -07:00
jp9000
c4c5b0d21d UI: Add Group/Ungroup Undo/Redo actions 2021-05-21 18:17:09 -07:00
jp9000
64cd451def UI: Do not allow new undo actions while undo disabled 2021-05-21 18:14:59 -07:00
jp9000
008a7372d3 UI: Add OBSBasic::BackupScene() with scene param
Just a little inline helper that automatically converts it to a source
so callers don't have to manually do this each time.
2021-05-21 18:13:19 -07:00
jp9000
7bdd384fd5 UI: Fix hide undo/redo not working with group items
Fixes obsproject/obs-studio#4702
2021-05-17 16:34:56 -07:00
Clayton Groeneveld
f4c36460c8 decklink-output-ui: Stop outputs when unloading
When closing OBS, sometimes it would crash if the Decklink outputs
were active.
2021-05-15 14:08:49 -07:00
Clayton Groeneveld
b28f99d4cd decklink-output-ui: Render texrender once per frame
To prevent rendering the texrender more than necessary, only
render it once per frame in a tick callback.
2021-05-15 14:08:49 -07:00
Ryan Foster
0a3cd9021b UI: Add versioned sources to scene collection importer
Versioned sources were added in commit
b2302902a3 after the scene collection
importer was added in commit 191165c721.
When a versioned source gets converted in TranslateOSStudio, it can end
up with a translated "id" but an untranslated "versioned_id". When OBS
loads the resulting JSON, it will rely on the versioned_id, and rewrite
the id to the corresponding value. Use obs_get_latest_input_type_id on
the translated source id to get the correct versioned_id when using
TranslateOSStudio.
2021-05-14 20:44:19 -07:00
Ryan Foster
183fb20dde UI: Fix scene collection importer OS translation
The OS translation in the Scene Collection Importer seems to have been
broken since the feature was added because the translated sources were
not added back to the output JSON object. Add the translated sources to
the output JSON object to get the feature to work.
2021-05-14 20:44:19 -07:00
jp9000
8bcb2c3d42 UI: Add paste source undo/redo actions 2021-05-12 22:07:40 -07:00
jp9000
1afe092c6e UI: Add disable push/pop to undo/redo stack
This allows disabling and re-enabling in certain situations where these
actions doing so might end up being used in recursion.
2021-05-12 21:35:11 -07:00
jp9000
edc82eb7cf UI: Use "enabled" instead of "disabled" variable name
Avoids double-negative naming.
2021-05-12 21:35:03 -07:00
jp9000
b86999e133 UI: Rename enable/disable funcs for undo/redo stack 2021-05-12 21:13:56 -07:00
Clayton Groeneveld
a5bb527ce5 UI: Delete log viewer when closing it
When the user would open the log viewer and close it, it would
just hide, instead of deleting it.
2021-05-09 20:35:28 -05:00
Clayton Groeneveld
7aedf78338 UI: Simplify log viewer on launch code
Removes redundant code when showing log viewer on start up.
2021-05-09 20:34:53 -05:00
jp9000
cec8e24630 frontend-plugins: Fix script properties not updating
Fixes a bug where script properties would not update correctly after the
Undo/Redo changes in the properties view. The properties view was using
the wrong callback, and had a bad cast.
2021-05-09 08:45:08 -07:00
jp9000
8ecf634ba7 Revert "rtmp-services: Add Odysee.com"
This reverts commit e876ad6596.
2021-05-09 00:55:16 -07:00
Developer
4e4c460829 rtmp-service: Rename "stream key" for dacast
(Additional note by Jim: Apparently, dacast doesn't use "stream key" for
whatever reason on its website, so this commit apparently changes the
text "Stream Key" to "Encoder Key" or whatever for whatever reason I'll
never know. I guess we need arbitrary names for things these days
because services can't get their names in order or something. Whatever.
I'm seriously tired of dealing with this sort of stuff. Seriously, this
is just dumb. This is dumb, and I wish I wasn't merging it, but at this
point, I'm like, whatever. I don't care. I've stopped caring. Why should
I care anymore? I'm losing it. I am absolutely losing it.)
2021-05-08 19:16:13 -07:00
Clayton Groeneveld
0452f05595 UI: Clear fade to black source
If the fade to black was active and the user switched scene collections,
or exited studio mode, the source wouldn't be cleared, causing the
transition not to work properly when used again.
2021-05-08 19:05:27 -07:00
Clayton Groeneveld
c2bc5e675c UI: Simplify fade to black code
Removes unnecessary function call.
2021-05-08 19:05:27 -07:00
Clayton Groeneveld
90efc5c69c UI: Disable transition props menu when transitioning
When transitioning, the transitions properties menu would still be
enabled.
2021-05-08 18:46:15 -07:00
iamflorencejay
e876ad6596 rtmp-services: Add Odysee.com 2021-05-08 15:31:43 -07:00
geekenmd
200c154238 rtmp-services: Add Brime Live service
rtmp-services: Add Brime Live service
2021-05-08 15:14:19 -07:00
jpark37
bd98e41ca1 UI: Fix rounding truncation
Set decimal places before value on QDoubleSpinBox to preserve precision.
2021-05-02 10:01:29 -07:00
Clayton Groeneveld
03b76c09e8 UI: Move clearing of copy/paste variables
It makes more sense for these to be in the ClearSceneData function.
2021-04-30 18:45:27 -07:00
jp9000
b685d1bf88 UI: Fix proprty Undo not updating settings properly
Settings would not update properly because obs_source_update() can only
apply the settings value to the existing settings, so it could not
remove values. This change fully erases existing settings and replaces
it with the target settings instead.
2021-04-30 18:38:31 -07:00
Anton Bershanskiy
5f7e81d628 UI: Remove duplicate include 2021-04-30 14:12:39 -07:00
Anton Bershanskiy
f8ca45a276 UI: Fix Undo/Redo for pasting multiple filters
Fixes bug introduced in commit d7e4945eab
2021-04-30 09:09:23 -07:00
jp9000
ec25ade9f2 UI: Add Undo/Redo for single filter copy/paste
Closes obsproject/obs-studio#4616
2021-04-30 00:14:28 -07:00
jp9000
d7e4945eab UI: Add Undo/Redo for pasting multiple filters
Closes obsproject/obs-studio#4616
2021-04-30 00:14:28 -07:00
jp9000
6372f51bda UI: Fix missing files dialog starting hidden (macOS)
An annoying hack to fix the dialog being hidden behind the main window
when the program starts up on macOS.
2021-04-29 01:33:40 -07:00
Ford Smith
eb4dbb72c7 UI: Fix audio filter changes not being added to undo
When a change to an audio filter was done, it would create a timer and
wait for no more inputs before saving and adding to undo (this is to
prevent spam from sliders). For some reason, the timer would get
destroyed before the information is saved, preventing it from going on
the undo stack.
2021-04-29 00:14:28 -07:00
Ford Smith
92745a1009 UI: Fix audio filters being deleted not getting added to undo 2021-04-29 00:14:28 -07:00
Ford Smith
732c2c7e9e UI: Fix undo/redo enabling redo with no items in redo 2021-04-29 00:14:28 -07:00
jp9000
0d482be14a UI: Use std::bind for visibility undo/redo action
This is better and slightly more optimal code over what it was before.
2021-04-27 21:31:07 -07:00
jp9000
20bbc9794d UI: Add Undo/Redo for volume change/mute via main fader 2021-04-27 21:09:41 -07:00
jp9000
cec8061d83 UI: Add Undo/Redo items for adv. audio properties
Rather than forcing the user to close the advanced audio properties
window in order to obtain an undo/redo action, use explicit undo/redo
actions for each widget change in the advanced audio properties dialog.
2021-04-27 21:08:08 -07:00
jp9000
ae5ac8fa82 UI: Add repeat protection for Undo/Redo
This allows the ability to mark an action as repeatable, which when set,
makes it so that it will change only the redo value for the last undo
item in the undo stack within the last three seconds. This allows the
ability to, for example, scroll a spinbox or change a slider value
without creating many unnecessarily duplicated undo/redo actions.
2021-04-27 20:45:43 -07:00
jp9000
78f1983f7d UI: Remove unnecessary Undo/Redo cleanup func
Since fixing the reference holding issue with scene/source deletion, the
undo/redo cleanup function (last param of add_action) is no longer
required.
2021-04-27 20:45:43 -07:00
Clayton Groeneveld
c497342fd6 UI: Cleanup on_scenes_currentItemChanged function
Removed unnecessary lines from the function. Also if the source happened to be
null, the SetCurrentScene function would be called anyway. Finally, the
UpdateContextBar and api lines were removed, as they are also being called with
SetCurrentScene.
2021-04-27 01:24:50 -07:00
jp9000
387a2c5f3e UI: Add undo/redo actions for move up/down/top/bottom
Fixes obsproject/obs-studio#4567
2021-04-26 10:52:28 -07:00
jp9000
59603f47ad UI: Use scene backup/undo/redo funcs for reordering
Fixes a bug where groups would not be backed up properly
2021-04-23 12:40:33 -07:00
jp9000
f1c120df2e UI: Refactor scene action undo/redo
Allows this code to be used for other actions where the scene data needs
to be backed up
2021-04-23 12:39:32 -07:00
jp9000
00fdec2493 UI: Add missing locale text for reorder undo/redo 2021-04-21 00:13:21 -07:00
jp9000
4188899194 UI: Add undo/redo for source reordering 2021-04-20 19:38:53 -07:00
jp9000
dde4d57d72 UI: Fix imported scene collection names duplicating
If an imported scene collection has a name that already exists, it will
instead be given a name plus an increment (e.g. "name 2", or "name 3",
etc)

Fixes obsproject/obs-studio#4442
2021-04-20 00:17:34 -07:00
VodBox
b5596cbf61 rtmp-services: Update Twitter.com 2021-04-20 13:47:27 +12:00
Joe Flateau
e9b80235b4 rtmp-services: Add Luzento.com 2021-04-20 13:34:05 +12:00
SCG82
d3ee5dfb9f UI: Delete unimplemented declaration, LoadProfile() 2021-04-18 17:46:20 -07:00
Clayton Groeneveld
44ee91188f UI: Fix crash when closing missing files window
A crash would occur when clicking the 'x' button in the missing files
dialog. This seemed to only happen in debug mode and using QT 5.15.0.

Closes obsproject/obs-studio#4363
Fixes obsproject/obs-studio#4359
2021-04-18 17:19:36 -07:00
Matt Gajownik
2aed4be7cf UI: Fix invalid check for Remove Multiple Sources dialog result
Fixes #4546
2021-04-18 17:13:01 +02:00
jp9000
8175700620 UI: Add Undo/Redo for source visibility
(Author note: This is why I hate supporting undo/redo.)

Fixes obsproject/obs-studio#4447
2021-04-16 20:33:53 -07:00
jp9000
8515f38bdb UI: Make undo_stack types in-class and private
Reduces polluting the global namespace
2021-04-16 20:31:57 -07:00
Exeldro
7e9aea71d9 UI: Fix missing Files dialog crash loading source icon 2021-04-16 12:03:34 -07:00
Matt Gajownik
7282802d4e UI: Use newer Twitch Dashboard docks for integration
Fixes an issue where the submit button on the Stream Information dock
would be cut off at certain resolutions.
2021-04-13 05:21:53 -07:00
jpark37
01cf13ac51 UI: Increase float property decimals based on step
Values are no longer truncated if a small step is specified.
2021-04-13 04:48:36 -07:00
Richard Stanway
054a68b8f4 UI: Fix undo data being saved when no changes occur
obs_scene_save_transform_states was called with all_items = true when
starting a transform, but all_items = false when comparing undo data.

Fixes #4510
2021-04-13 00:52:55 +02:00
Exeldro
8c49cc2831 UI: Add Undo/Redo for source visibility transitions 2021-04-11 10:10:54 -07:00
Clayton Groeneveld
9ca7e1cb0f UI: Fix spamming of log when setting current scene
When setting the current scene and if it was the same as the previous,
the log would be spammed with switching scene messages.

This issue particularly happened when using undo/redo, as their
functions were setting the current scene.
2021-04-11 08:26:12 -07:00
Ford Smith
2932cd0fd3 UI: Fix wrong behavior with undo/redo and groups 2021-04-10 11:28:04 -07:00
Clayton Groeneveld
bab21888f3 UI: Fix reordering scenes not working properly
If the user were reordering scenes, the preview scene would change
to a different one, than the one they were currently on.
2021-04-10 06:07:55 -07:00
Clayton Groeneveld
bb0dff60ab UI: Update context bar when using undo/redo
The context bar wouldn't update when using undo and redo.
2021-04-10 01:50:05 -07:00
Clayton Groeneveld
7dfd36f9e8 UI: Force current scene when using undo/redo
The undo/redo functions are setting the current scene. Everytime
it would do this, it would actually transition to the scene.
This forces the current scene, so it fixes a bug where the
transition would be grayed out when undoing/redoing.
2021-04-10 01:49:30 -07:00
Ford Smith
97e038f895 UI: Fix Undo/Redo holding source references
Holding references to sources is never a good idea. Instead, save and
restore the scene and its subsources on removal.

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

Closes obsproject/obs-studio#4462
2021-04-09 06:05:03 -07:00
jp9000
e39fa5e902 UI: Clear undo stack in ClearSceneData() instead
Makes more sense to clear it here.
2021-04-09 04:19:31 -07:00
Ford Smith
0b583260a2 UI: Wipe undo/redo stack when switching scene collections 2021-04-08 16:45:04 -07:00
Ford Smith
0e944897c6 UI: Add maximum number of items in undo/redo stack 2021-04-08 15:53:20 -07:00
Lukáš Mojžíš
9ae6e145c1 UI: Conform transition duration in Scene Transition dock 2021-04-06 01:59:10 -07:00
Matt Gajownik
baf980f7a6 Revert "UI: Remove unnecessary IS_WIN32 macro"
This reverts commit 113b6317e7.
2021-04-02 21:15:30 +11:00
Matt Gajownik
113b6317e7 UI: Remove unnecessary IS_WIN32 macro 2021-04-02 21:04:09 +11:00
Clayton Groeneveld
448c7f38d0 UI: Add save notifications to status bar
This shows notifications in the status bar with the following:
- When screenshot is saved
- When replay buffer is saved
- When recording is saved
- When recording is auto remuxed
2021-04-01 07:36:20 -07:00
wangshaohui
48b779c7b2 UI: Ignore scene source which has been removed
While getting source list, we should ignore scene source which has been
removed. If we don't ignore it, a deleted scene source will be added
later. Besides, signals of that scene have been sent before, such as
"remove" of scene. So we can't remove this scene source by "auto
removeItem" defined in SourceTreeItem::ReconnectSignals().

Fixes obsproject/obs-studio#2602
2021-03-31 02:48:54 -07:00
Kurt Kartaltepe
fa8f95018d UI: Fix crash on exit with stuck encoder
If the encoder is hung and you try to exit these two values will still
be null when obs shutting down.
2021-03-31 01:21:51 -07:00
wangshaohui
f36b601aab UI: Fix character to prevent VS2019 compiler error
Apparently the specific character can cause VS2019 to have compiler
errors depending on the system's current character encoding, so just
remove it instead. (-Jim)
2021-03-30 23:02:23 -07:00
Richard Stanway
d6fd723f2c UI/installer: Add exit codes for silent installer
Code 3 = Unsupported OS (64bit on 32bit or below Windows 7)
Code 4 = Missing a dependency (VS 2019 or DirectX redistributables)
Code 5 = OBS is already running
Code 6 = OBS files are in use by another app (eg virtual camera)
2021-03-30 22:30:00 -07:00
tytan652
4f9940d1c0 UI: Fix wrong strings for Undo/Redo 2021-03-30 22:29:21 -07:00
Ryan Foster
bde55cbf7b UI: Remove Qt5MacExtras
QtMacExtras is currently not in Qt6 and there's no word on if/when it
will be reintroduced. We don't appear to be using it, so let's remove
it.
2021-03-30 05:50:43 -07:00
wangshaohui
81c4750fbf UI: Fix UI deadlock after dragging source
Fixes obsproject/obs-studio#2609
2021-03-30 05:49:00 -07:00
Vainock
3267f76c15 UI: Fix Horizontal Center Text
The horizontal center redo/undo works, but uses the vertical center string.
2021-03-30 05:25:13 -07:00
Vainock
da23113e41 UI: Fix locale key name 2021-03-30 13:35:36 +02:00
Ryan Foster
d445f9f9b6 UI: Remove ifdefs for Qt 5.9 and older
Among the systems we officially support, the oldest Qt version is Qt 5.9
on Ubuntu 18.04. We should be able to safely remove these ifdefs.
2021-03-30 03:52:04 -07:00
Jim
5d87f3c00b
Merge pull request #3426 from Programatic/undo_redo
UI: Implement Undo/Redo System
2021-03-30 03:16:24 -07:00
Ford Smith
86eb7aeb69 UI: Undo/Redo Properties and Filters
Implements undo/redo for both properties and filters. Works by creating
a new callback that gets called to save undo/redo states after a timer
is fired. Also disabled undo/redo until the actions have completed to
prevent a user from being able to disrupt the stack by perfoming actions
before others have finished.
2021-03-29 03:06:26 -04:00
Ford Smith
999495ca8c UI: Undo/Redo context bar properties
Implements undo/redo for changing of properties done through the context
bar.
2021-03-29 03:06:26 -04:00
Ford Smith
a374c023a1 UI: Undo/Redo Scene Collections
Implements undo/redo for scene collections. This includes operations
including rename, delete, and addition.
2021-03-29 03:06:26 -04:00
Ford Smith
3c5e2ddc37 UI: Undo/Redo audio
Implements undo/redo for advanced audio properties.
2021-03-29 03:06:26 -04:00
Ford Smith
3a620c485e UI: Undo/Redo Transformations
Implements undo/redo for transformations of sources, both through
preview and the transformations properties.
2021-03-29 03:06:26 -04:00
Ford Smith
60d95cb5bd UI/libobs: Undo/Redo Sources and Scenes
Implements the Undo/Redo for scenes and sources, ranging from renaming,
deletion, addition. It also adds several elements to libobs that were
designed to facilitate undo/redo, and should not affect the rest of
libobs.
2021-03-29 03:06:26 -04:00
Ford Smith
eced5a320b UI: Initial Undo/Redo
Starting to develop Undo/Redo. This just implmements the undo/redo stack
and its api.
2021-03-29 03:06:26 -04:00
Nirusu
a52012e8c5 UI: Fix canvas resolution in auto-config
Fix the returned display resolution when scaling is enabled to determine
the correct canvas resolution in the auto-config utility, using the same
approach as in 2787e63. This fixes #4298.
2021-03-25 19:25:13 -07:00
Ryan Foster
4ed7cd463d frontend-tools: Remove Qt5X11Extras
Qt5X11Extras (QX11Info) was added in
762983b5d8, but it doesn't seem to
actually be used. Qt6 doesn't yet ship X11Extras, so let's remove it.
2021-03-17 12:48:21 -07:00
Ryan Foster
0b88bfbf09 decklink-output-ui: Remove Qt5X11Extras
Qt5X11Extras (QX11Info) was added in
762983b5d8, but it doesn't seem to
actually be used. Qt6 doesn't yet ship X11Extras, so let's remove it.
2021-03-17 12:48:21 -07:00
Exeldro
32e7ba1abe UI: Add visibility transitions
This also modifies libobs.

This adds the ability for scene items to have transitions
when their visibility is toggled.
2021-03-16 22:15:16 -07:00
Anton Bershanskiy
543f58d4a6 UI: Copy Filters menu is active only if applicable 2021-03-16 21:38:06 -07:00
Kurt Kartaltepe
346e268a3d UI: Remove x11info dependency
This moves X11 platform to the qt private functions, as x11info was
removed from Qt6 so this is required for a clean Qt5/6 transition.

This is the implementation of x11info::getdisplay so it should still
work on older platforms. This "API" doesnt really guarantee anything
though.

Also clean up wayland only bits as we use them for all windowing systems
now, and the name of the native pointer we want is the same on both
platforms for now.
2021-03-16 18:50:52 -07:00
Georges Basile Stavracas Neto
7e36331c98 UI: Only set AA_DontCreateNativeWidgetSiblings on Wayland
It seems this introduced various regressions on X11 (and, potentially, on other
platforms too, but needs confirmation). Let's preserve the old ways on current
platforms, and only use this flag on the new Wayland platform.
2021-03-16 01:48:29 -07:00
Matt Gajownik
a86b4a9421 UI: Save video settings after 'Resize output (source size)'
Fixes #4207
2021-03-12 20:53:19 -08:00
Peter "Marenthyu" Fredebold
2a87543d82 UI: Add css on Drag and Drop
Adds parsing for the "layer-css" query param of URLs dragged into the main window, similarly to the other layer-* parameters already used.
2021-03-10 22:59:07 -08:00
Anton Bershanskiy
7d5430f4ea UI: Make drag and drop file ext. case insensitive
Fixes obsproject/obs-studio#4236
2021-03-10 20:40:04 -08:00
Christopher P Yarger
25a335dc3c UI: Add Frontend API function to get value of T-bar
Also add a Frontend API event for when the T-bar's value changes.
2021-03-10 20:18:36 -08:00
Clayton Groeneveld
40fda5fc08 UI: Remove UpdateSceneCollection function from header
This function wasn't removed in PR 4308.
2021-03-10 20:06:08 -08:00
Jim
9ecae253f0
Merge pull request #4314 from WizardCM/fix-group-resize-1
UI: Don't attempt to resize parent group when changing cursor
2021-03-09 20:59:05 -08:00
Ryan Foster
7214feba73 UI: Set Qt::AA_UseHighDpiPixmaps only on Qt5
Qt6 enables Qt::AA_UseHighDpiPixmaps by default and will emit a warning
if you try to enable it. To prevent the warning, only set this on Qt5.
2021-03-09 10:28:19 -05:00
Ryan Foster
1793515bbf UI: Explicitly include QFile
Explicitly include QFile to prevent a build failure with VS2019 and Qt6.
2021-03-09 09:31:10 -05:00
Ryan Foster
e81f8e3857 UI: Don't use QTextStream::setCodec in Qt6
In Qt6, QTextStream::setCodec has been replaced by
QTextStream::setEncoding. However, all text is assumed to be UTF-8, so
we don't need to specify UTF-8 in Qt6.

https://doc.qt.io/qt-5/qtextstream.html#setCodec-1
https://doc.qt.io/qt-6/qtextstream.html#setEncoding
2021-03-09 09:16:19 -05:00
Ryan Foster
05d29aa4e3 UI: Set default string size arg for QT_UTF8 / QString::fromUtf8
Our QT_UTF8(str) macro uses QString::fromUtf8(str) with no size
argument. In Qt5, QString::fromUtf8 uses a default value of -1 for the
size arg. If size is -1, it is taken to be strlen(str). In Qt6,
QString::fromUtf8 doesn't use a default value for the size arg, but has
the same behavior if you manually specify -1 for the size. Let's
manually specify -1 to maintain the same behavior between Qt5 and Qt6.

https://doc.qt.io/qt-5/qstring.html#fromUtf8
https://doc.qt.io/qt-6/qstring.html#fromUtf8
2021-03-09 09:16:16 -05:00
Ryan Foster
37971e7bf9 UI: Force plugins to use version appropriate Qt Network
Make building against either Qt5 or Qt6 easier by checking the Qt
version used and loading the appropriate Qt Network DLL.
2021-03-09 09:16:07 -05:00
Matt Gajownik
b2fb0ca07f UI: Don't attempt to resize parent group when changing cursor
Fixes an issue where resizing a source did not resize the parent group.
2021-03-09 21:15:17 +11:00
Kurt Kartaltepe
513bcb8e35 UI: Cleanup Qt for Qt6
This changes cleans up some deprecated functions that were removed in
Qt6. Some are placed behind version ifdefs and others are replaced for
their non-deprecated Qt5 version.
2021-03-08 21:41:13 -08:00
Mike
40f99da8a2 UI: Fix Qt signal connection warnings
Closes obsproject/obs-studio#4264
2021-03-08 21:39:43 -08:00
Exeldro
901a030adf frontend-tools: Add edit script button 2021-03-08 08:37:37 -08:00
VodBox
e81cf90c1e UI: Disable scroll and keyboard input for t-bar
closes #2951
2021-03-09 01:31:08 +13:00
VodBox
d2e3d0da3c UI: Remove unnecessary code 2021-03-08 23:42:21 +13:00
VodBox
3046f3b578 UI: Fix grid mode scenes overlapping
fixes #2676
2021-03-08 23:33:54 +13:00
VodBox
58b2da73b3 UI: Fix transform dialog for screen readers 2021-03-08 21:51:20 +13:00
Clayton Groeneveld
753de748e5 UI: Remove redundant code
The UpdateSceneSelection function was doing the same thing as the
code in the SetCurrentScene function.
2021-03-07 22:53:08 -08:00
VodBox
eb98505a2c UI: Fix memory leak with missing files dialog 2021-03-06 15:33:12 +13:00
Matt Gajownik
adb8046b7c UI: Use clicked signal for buttons in Missing FIles dialog
Clicked includes the release, whereas pressed occurs before.
2021-03-05 21:14:56 +11:00
jp9000
09c3892127 UI: Use more accurate wording 2021-03-01 18:28:43 -08:00
Robert de Bock
da8c7e5131 UI: Fix typo
"Ideal" is an absolute.
2021-03-01 15:03:33 -08:00
Doug Kelly
437ba31cf6 cmake: Remove pagezero_size from linker options
Previous versions of LuaJIT required setting linker options
-pagezero_size and -image_base.  This was accomplished in commit
c9224edbad, but as of LuaJIT 2.1, this is no longer necessary, and
doing so results in the application being killed when run natively
on macOS ARM targets.
2021-02-28 19:00:43 -08:00
jp9000
81a89e689f UI: Fix output resolution not properly changing
Fixes a bug where the output resolution wouldn't change when using a
service that uses the "supported resolutions" limitation. When switching
to a non-editable combo box, the signal used to detect whether the combo
box has had its value changed wouldn't work anymore because it was the
signal explicitly used for editable combos. So, to fix, just reapply the
normal combo box signal to detect when the value has been changed.

Fixes obsproject/obs-studio#4124
2021-02-17 03:31:06 -08:00
Gol-D-Ace
7a4844e2fc UI: Fix locale name 2021-02-15 18:16:07 +01:00
Nirusu
2787e63d8e UI: Fix screen resolution for canvas size
In #3988, @RytoEx mentioned that the recent Qt upgrade to 5.15.2
introduced a regression in which Qt begins returning DPI/scaling
aware resolutions for each screen. While this was fixed for
new profiles, this was not reflected in the choice for the
Canvas (Base) Resolution in the Settings screen yet.

This commits fixes this issue, and calculates the correct
physical screen size again, respecting per-screen DPI scaling.
2021-02-12 15:28:26 -08:00
Jim
190ab876cc
Merge pull request #2484 from GeorgesStavracas/feaneron/egl-wayland
EGL/Wayland (Wayland, pt 3)
2021-02-12 01:30:05 -08:00
jp9000
e8a1c082da Revert "UI: Add ability for stingers to use filters"
This reverts commit 36ab7b97cf.

The fact that a transition is a composition of two scenes was not
factored into the merging of this PR. Thus, it would apply to the
underlying scenes when transitioning, making the effectiveness of this
feature cause inconsistent rendering of the underlying scenes when
transitions are activated versus when they're not.
2021-02-11 22:34:55 -08:00
Georges Basile Stavracas Neto
e67fdbca79 UI: Check for Expose and PlatformSurface events to create display
This is a workaround for QWaylandWindow never becoming exposed, or
receiving the QEvent::Expose [1].

[1] https://bugreports.qt.io/browse/QTBUG-86176
2021-02-09 09:39:17 -03:00
Georges Basile Stavracas Neto
226cc22669 UI: Make OBSQTDisplay::CreateDisplay() public and allow forcing creation
This will be used by a new event filter, added only when running as a Wayland
client, to force creating the obs_display instance even when not exposed.
2021-02-09 09:39:17 -03:00
Georges Basile Stavracas Neto
b629265e7f UI: Disable and ignore Always On Top on Wayland platforms
This is a dangerous operation on Wayland, and is crashing not only
OBS Studio but also the whole compositor. Let's disable it for now
when running as a native Wayland client.

Some compositors (GNOME Shell, Plasma) still allow setting this
option on the window menu.
2021-02-09 09:39:17 -03:00
Georges Basile Stavracas Neto
f817300cfa UI: Rename callback to match signal name
The sizeChanged callback is connected to the screenChanged signal,
and evidently the naming doesn't match. Rename the callback to
match the signal name.
2021-02-09 09:39:17 -03:00
Georges Basile Stavracas Neto
b71498e8ab UI: Don't create obs_display when QTToGSWindow fails
Right after showing the OBSQTDisplay widget, it may happen that a
wl_surface is not yet created and attached to the window. When this
happens, creating the OBS display results in a crash.

Make QTToGSWindow return a boolean, indicating success or failure, and
don't create the OBS display on failure.
2021-02-09 09:39:17 -03:00
Georges Basile Stavracas Neto
60dab2cf1c UI: Destroy display when becoming invisible
When a window is made invisible, then visible again, the
obs_display is reused. Turns out, QT destroys the wl_surface
associated with the previewer on Wayland. However, the EGL
surface created on top of this wl_surface is not, and any
attempt to attach a new buffer to it will crash OBS.

Destroy the obs_display when becoming invisible, and when
running as a Wayland client. Also nullify the display
variable on destruction, to avoid subclasses double-freeing
the obs display.
2021-02-09 09:39:17 -03:00
Georges Basile Stavracas Neto
a56582d92d UI: Retrieve Wayland surface from QWindow
On Wayland, we want to query the window's underlying
platform for the Wayland surface, instead of foolishly
retrieving the X11 display.

Pass QWindow instead of WId directly, and set the surface
as the platform data on Wayland systems.
2021-02-09 09:39:17 -03:00
Georges Basile Stavracas Neto
2b3cb54771 libobs: Add a Wayland platform
Introduce the OBS_NIX_PLATFORM_WAYLAND enum value, and try to detect
it when OBS Studio runs by looking into the platform name.
2021-02-09 09:39:04 -03:00
Clayton Groeneveld
36ab7b97cf UI: Add ability for stingers to use filters
This adds a menu item in the transitions config menu to access
filters for stinger transitions.
2021-02-09 02:46:27 -08:00
poccariswet
77e4a09f62 rtmp-services: Add OPENREC.tv service 2021-02-08 22:36:36 -08:00
Jim
06c5d059c1
Merge pull request #4210 from fredemmott/decklink-settings-double-free
decklink-ui: fix double free of settings
2021-02-08 22:35:50 -08:00
Fred Emmott
e5f05473e7
decklink-ui: fix double free of settings
This leads to a crash when the output is stopped, either by clicking the
stop button or when exiting OBS studio.

This crash is:
- intermittent in release builds
- reliable for me in debug builds

It is held by an `OBSData`, which, if not null, will automatically
call `obs_data_release()` on scope exit.
2021-02-08 14:46:38 -06:00
tt2468
fa3ae6db93 Frontend-API: Add obs_frontend_reset_video() 2021-02-03 08:53:42 -08:00
jp9000
219a0913ca UI: Improve missing files text 2021-02-02 06:13:51 -08:00
Georges Basile Stavracas Neto
27d0182fdb UI: Set the Unix platform on startup
Move the OBS_USE_EGL environment variable check to obs-app.cpp,
and set the OBS platform to be either OBS_NIX_PLATFORM_X11_GLX
or OBS_NIX_PLATFORM_X11_EGL.
2021-02-01 19:05:11 -03:00
Georges Basile Stavracas Neto
506b950d02 libobs: Introduce the concept of a Unix platform
This is a Unix-specific code. The only available platforms
at this point are the X11/GLX and X11/EGL platforms.

The concept of a platform display is also introduced. Again,
the only display that is set right now is the X11 display.
2021-02-01 19:05:10 -03:00
Lordmau5
5b899788da UI: Add launch parameter to disable high-DPI scaling 2021-02-01 05:44:37 -08:00
Jim
2eca4d80b6
Merge pull request #2233 from VodBox/missing-files-dialog
libobs + UI: Add Missing Files API & Dialog
2021-01-31 08:02:16 -08:00
jpark37
3d4e8c377c UI: Fix unused parameter 2021-01-30 00:25:25 -08:00
jpark37
48ba511bda UI: Avoid asprintf warning 2021-01-30 00:25:25 -08:00
Georges Basile Stavracas Neto
f12dbc87b8 UI: Don't define QT_NO_GLIB
The same reasoning of the previous patch means we can also stop
force-disabling Qt/GLib integration.
2021-01-28 23:58:13 -08:00
Georges Basile Stavracas Neto
58497e59d9 UI: Reinstate native dialogs on Linux with browser enabled
After the recent CEF update, the GMainLoop-in-a-thread conflict seems to be
gone, which allows us to being back native dialogs.
2021-01-28 23:58:13 -08:00
Georges Basile Stavracas Neto
913821ee8e UI: Make BrowserDock native
After cleaning up the native flags in various places, and disabling
making sibling of native widgets native, BrowserDock was left in an
inconsistent state, since it requires being native for CEF to work
properly.

Make BrowserDock native.
2021-01-26 09:43:16 -08:00
Georges Basile Stavracas Neto
9ee7547e19 UI: Cleanup native widgets
Some widgets are marked as native unnecessarily. Native widgets are
a bit more involving than regular ones, so remove this flag.

Original patch by David Edmundson <kde@davidedmundson.co.uk>
2021-01-26 09:43:16 -08:00
David Edmundson
4a32d1cec5 UI: Don't create native widget siblings
Native windows really only make sense for previews. They can be a new
xcb_window or a wayland subsurface.

For historical reasons setting a widget to native will also affect
ancestors. Qt will still draw them as part of the parent as they are
never mapped, but a window is nonetheless created.

This is especially problematic on wayland as then the subsurface is
parented to an unmapped window.

This default behaviour can be turned off. Now only the native widgets
(the video previews) are actually native.
2021-01-26 09:43:16 -08:00
Exeldro
bacf83dbc9 UI: Close context menu on destroy of VolControl 2021-01-25 04:17:14 -08:00
Kurt Kartaltepe
77e4416c9f UI: Fix crash when systray is not enabled 2021-01-25 04:14:29 -08:00
Jim
8333f13587
Merge pull request #2067 from jpark37/srgb-toggle
Linear color math
2021-01-22 16:03:29 -08:00
jpark37
e08ad9faf3 UI: Render previews in linear sRGB space
Necessary for correct alpha blending.
2021-01-21 07:42:57 -08:00
Ivan Efremov
c7ca8abdd3 UI: fix the maximum search length of Hotkeys Filter
The "fullName" property was filled only in case of exceeding
TRUNCATE_TEXT_LENGTH. Also search function had worked only with
item->text() what was the reason of maximum search length in
Hotkeys Filter(Setting->Hotkeys).

The following changes allow to search in filter without
the length limit of string along with the current functionality.
2021-01-20 12:18:05 -08:00
Ryan Foster
54207a0d60 UI: Replace deprecated QLayout->setMargin with setContentsMargin
QLayout->setMargin has been deprecated since Qt 5.13 (though marked
obsolete since at least Qt 4.8) and removed in Qt6. It was replaced by
QLayout->setContentsMargins, which is available in all versions of Qt5.
Building against Qt 5.13+ can produce compiler warnings when using
QLayout->setMargin, and warnings are bad.

https://doc.qt.io/archives/qt-4.8/qlayout-obsolete.html
https://doc.qt.io/qt-5/qlayout-obsolete.html
d6d33f0b80
https://github.com/qt/qtbase/blame/5.15.2/src/widgets/kernel/qlayout.h
2021-01-18 19:10:31 -08:00
Mike So
f79393a727 UI: fix unable to upload and view crash report in mac 2021-01-18 01:43:09 -08:00
Clayton Groeneveld
968a1a6ff0 UI: Add interact button to source toolbar
This adds a interact button to the source toolbar. It is only
shown when source is interactable.
2021-01-17 20:03:08 -08:00
Clayton Groeneveld
520f1158e1 UI: Fix color of filters icon
The filters icon color was #ffffff. This changes it to #d2d2d2, the
same as the other icons.
2021-01-17 19:55:21 -08:00
VodBox
3273472019 UI: Add missing files dialog 2021-01-17 10:31:59 +13:00
Andrew Tropin
fb347c3c62 UI: Add support for OBS_PLUGINS*_PATH env variables
Allow to load obs plugins from arbitary directory, specified by
OBS_PLUGINS_PATH and OBS_PLUGINS_DATA_PATH environment variables.
2021-01-16 00:26:10 -08:00
Clayton Groeneveld
e38d8f10a6 UI: Add virtual camera to system tray
Adds ability to start and stop the virtual camera from the
system tray.
2021-01-15 18:16:41 -08:00
Andrew
7f5013cf37 UI: Use FileNameWithoutSpace for screenshot output 2021-01-15 18:16:03 -08:00
Clayton Groeneveld
3bc4e8ecba obs-frontend-api: Add frontend api functions for the virtual camera
This adds functions to the frontend api to start/stop the virtual
camera, to check if it is active and adds function to get the output
reference. It also adds api events for when the virtual camera is
started or stopped.
2021-01-13 09:46:04 -08:00
Hayden McAfee
96ef45cef5 UI: Support FTL URLs for custom streaming service
Custom streaming service URLs beginning with `ftl` are handled by the
`ftl_output` plugin.
2021-01-13 09:44:52 -08:00
Matt Gajownik
46118470ab UI: Only apply passthrough DPI scaling on Windows
Fixes #4031

It seems Qt on various flavours of Linux behaves erratically when scaled,
and for the moment macOS doesn't require fractional scaling support.

This commit can be reverted when Qt fixes issues on their side.
2021-01-13 20:26:35 +11:00
clone1018
64164a1523 rtmp-services: Add Glimesh service 2021-01-12 16:43:41 -08:00
Jimi Huotari
41367bb2b4 UI: Fix crash when no audio backends are available
This commit prevents a crash in, for example, Linux configurations
where PulseAudio is disabled, which leads into 'mod' being 'null',
which in turn leads into a segmentation fault when an ALSA source
is selected.

Closes https://github.com/obsproject/obs-studio/issues/3485
2021-01-12 09:33:48 -08:00
Ryan Foster
461a0c5484 UI: Refactor importer to use GetUnusedSceneCollectionFile 2021-01-11 14:49:59 -08:00