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

2105 Commits

Author SHA1 Message Date
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
Ryan Foster
9b1d1c1b3d UI: Make GetUnusedSceneCollectionFile usable elsewhere 2021-01-11 14:49:59 -08:00
jpark37
0d1ffd8b30 UI: Support color picker with alpha 2021-01-11 11:52:50 -08:00
Colin Edwards
60e3c66d08
Merge pull request #3934 from pkviet/macbrowseraccel
UI: Enable HW acceleration switch for browser sources on Mac
2021-01-07 23:03:19 -06:00
Warchamp7
4b2fe7b552 UI: Fix padding on Acri context bar buttons 2021-01-02 04:36:17 -08:00
jp9000
cdd94b2b59 Revert "UI: Only apply new scaling behavior on newer installs"
This reverts commit 4e5f20dcbe.

This originally was added because of a faulty assumption that it would
change defaults, but defaults were apparently broken from 26.0.2 -> 26.1
because primaryScreen->size() changed its behavior, so the original code
technically fixed the original behavior.
2020-12-29 09:13:37 -08:00
jp9000
4e5f20dcbe UI: Only apply new scaling behavior on newer installs
The new scaling behavior affects defaults, so only apply it to new
installs of 26.2 or greater, while maintaining the previous behavior if
the user is upgrading from an older version.
2020-12-29 08:58:30 -08:00
Ryan Foster
5cdd084c7f UI: Support fractional scaling for Canvas/Base size
Without this change, new profiles created on systems using a fractional
scaling factor (e.g., 125%, 150%, 175%) will get an incorrect (X, Y)
pair for the new canvas size. For a display with 125% scaling, OBS would
set (1536, 864) instead of (1920, 1080). With this change, it will set
(1920, 1080).
2020-12-29 08:40:07 -08:00
Richard Stanway
2678d351f5 UI/updater: Increase number of download workers
Request / response latency dominates the download time of small
files and patches, especially the locale files. Increasing this to
4 doesn't consume many more resources and basically doubles the
download speed, especially on higher latency connections.
2020-12-21 18:32:39 +01:00
Richard Stanway
f0ed8c337e UI/updater: Enable HTTP2 and TLS 1.3
Unfortunately WinHTTP doesn't support multiplexing with HTTP2, but there
is still some minor benefit to enabling it. Windows 10 21H1 will enable
TLS 1.3 client support in Schannel, so let's get ready for it.
2020-12-21 18:32:39 +01:00
Gol-D-Ace
513e95d0f6
UI: Fix name of kab-KAB locale 2020-12-21 16:04:27 +01:00
Rodney
60fed63d68
Merge pull request #3877 from derrod/purge-services
UI/rtmp-services: Remove Smashcast
2020-12-21 09:46:53 +01:00
Richard Stanway
6b2830b16f UI/installer: Add additional VS2019 DLL check 2020-12-20 02:57:15 +01:00
pkv
c8155d491d UI: Enable HW acceleration switch for browser sources on Mac
This enables in Settings the checkbox for hardware acceleration for
Browser Sources in MacOs.
2020-12-18 18:13:35 +01:00
Richard Stanway
9201390a46 UI/updater: Move in-use files away before writing
On a modern Windows OS, you can rename an in-use file despite not being
able to write to it. With the introduction of the virtual camera, it is
now quite common that users will have in-use files when updating. This
commit renames in-use files, allowing the new version to be installed.
Upon a reboot, the previously in-use file will be deleted.
2020-12-15 21:11:47 +01:00
Richard Stanway
c0d7602b64 UI/updater: Always clean up temporary files
If an update failed to install, it would leave a single temporary file
behind for that particular patch / file.
2020-12-15 21:11:35 +01:00
Richard Stanway
38ad3ba18f UI: Add deferred function to update context bar
With the queued connection in d68484e7, the "Deselect" signal for
sources which are being deleted is never fired, as the object is gone by
the time the queued signal is processed. This results in the context bar
not updating.

This commit adds a new UpdateContextBarDeferred function, allowing
queuing of only the context bar update instead of the whole signal
handler.
2020-12-14 11:53:01 -08:00
jp9000
580eecda01 UI: Fix installer/updater check for vs2019 32bit
VS2019 32bit redist does not have/use vcruntime140_1.dll, so remove
those checks from the installer and auto-updater.
2020-12-13 21:59:21 -08:00
derrod
a605770a2b UI: Remove Smashcast from AutoConfig 2020-12-14 05:04:40 +01:00
Gol-D-Ace
7368a2c7cc Update translations from Crowdin 2020-12-14 00:29:44 +01:00
Richard Stanway
a53c59e8c7 UI: Determine rate control after creating encoders
If the user hasn't specifically set a rate control and left OBS at the
default of CBR, the settings loaded by GetDataFromJsonFile will not have
a rate_control parameter present. This causes the replay buffer to think
the user is in VBR mode and use the wrong settings for determining
maximum buffer size. Fixes #2516.
2020-12-12 02:43:35 +01:00
Exeldro
d68484e7b7 UI: Handle (de)select scene items queued
The (de)select signal can come from a obs_scene_enum_items
which locks the scene. The Qt::QueuedConnection makes sure
the (de)select is handled outside of that lock.
Fixes the deadlock from #3673
2020-12-11 17:05:38 -08:00
jp9000
13ee86ab7f UI/updater: Fix dll check 2020-12-09 22:25:49 -08:00
jp9000
a01d3e77b1 UI: Remove jansson requirement from UI and updater
Use json11 instead.
2020-12-09 22:23:03 -08:00
jp9000
9cc5aa5629 UI/updater: Update redist checks to VS2019 2020-12-09 22:23:03 -08:00
jp9000
ebc0d6a500 UI: Fix weird spacing in adv output FFmpeg recording 2020-12-07 19:15:16 -08:00
Matt Gajownik
5f5b220048 UI: Correctly unregister Virtual Camera & Source Toolbar hotkeys
Fixes an issue where the hotkey entries would be duplicated
(including in the UI hotkey list) on every Profile switch.
2020-12-06 23:01:46 +11:00
Matt Gajownik
fff45a4114 UI: Scale Interact cursor position based on display DPI 2020-12-06 16:22:11 +11:00
Matt Gajownik
448599e761 UI: Sync 'Copy Filters' enabled state in the Source context menu
This matches the behaviour of Scenes and the Audio Mixer.
2020-12-04 21:10:37 +11:00
jp9000
7a17f47d8a UI: Allow enabling vod track on custom via ini 2020-12-03 01:31:32 -08:00
jp9000
eac66d773c UI: Fix vod track working with custom server 2020-12-03 01:20:37 -08:00
jp9000
609ec9b556 UI: Fix vod track not working with twitch soundtrack
The vod track in advanced output mode would be overwritten by twitch
soundtrack's vod track. Additionally, simple output mode would overwrite
twitch's soundtrack vod track even when vod track was turned off in
settings.

So instead, if vod track is off, don't clear the secondary encoder
unless it's explicitly our encoder. Additionally, make sure that
advanced output mode's vod track encoder behaves consistently with
simple output mode's vod track so it doesn't get overwritten.
2020-12-03 01:13:10 -08:00
jp9000
53ec75ccd6 UI: Fix aac encoder name
Was meant to be "adv" meaning advanced rather than "avc"
2020-12-03 01:13:10 -08:00
Kurt Kartaltepe
bf4ad780b5 UI: Fix disabled sliders
Previously sliders would not be disabled when the the obs_property was
disabled.
2020-12-02 21:56:56 +11:00
Joel Bethke
aa713e07d0
Merge pull request #3815 from ckelsel/master
UI: fix typo
2020-12-02 03:36:41 -06:00
jp9000
15d000c50c UI: Remove redundant setting
This setting, although technically different from the one in the
streaming section of settings, is superseded by that setting.

The setting can still be used via ini file if an actual custom rate
control or keyframe interval is needed.
2020-12-02 01:09:37 -08:00
ckelsel
f4adc26864 UI: fix typo 2020-12-02 16:56:11 +08:00
Richard Stanway
207716f69f UI/installer: Add additional VS2019 DLL check
Also updates references from 2017 to 2019 for consistency.
2020-12-02 02:08:56 +01:00
Ryan Foster
1bb71e1f7f UI: Use Qt::MiddleButton instead of deprecated Qt::MidButton 2020-12-01 10:54:21 -05:00
Matt Gajownik
e08a8fc356 UI: Don't round non-integer High DPI scale
This fixes an issue on Windows where loading on a
150% scale display renders OBS windows at 200%.

Reference: https://doc.qt.io/qt-5/qguiapplication.html#setHighDpiScaleFactorRoundingPolicy
2020-11-28 11:08:11 +11:00
VodBox
dbbfa2491a UI: Fix filter window rendering and accessible names 2020-11-26 20:44:03 +13:00
Ryan Foster
6b6a72cd21 UI: Log success/failure for scene collection importer 2020-11-25 20:19:30 -08:00
Ryan Foster
714c652dc9 UI: Prevent import failure for collections with slash in name 2020-11-25 20:19:30 -08:00
Ryan Foster
2d1b0666af UI: Prevent name collision during scene collection import
The Scene Collection Importer would attempt to set the new filename
using the name property of the scene collection. However, it would
determine an unused filename, and then replace spaces with underscores,
which could cause a name collision. This changes the importer to replace
spaces with underscores first for the base filename, and then determine
an unused filename.
2020-11-25 20:19:30 -08:00
VodBox
89b4e9136f UI: Various screen reader fixes
This commit fixes various issues with screen readers in the main OBS
interface. These were tested using NVDA on Windows 10 2004.

Audio track selection in Settings now says Track 1, 2, etc, rather than
just the number.

Various checkboxes that just say "Enable" now have accessible text that
says what the enable is for (since it says "checkbox", the fact it's an
enable should hopefully be clear).

Type in the recording tab of output now has accessible text which says
"Recording Type".

Items in the Advanced Audio Properties window now have accessible text
for what they are for. Currently some do not report correct values, but
that will require an accessible interface in Qt to be written
specifically for that, which will be done at a later date.

Buttons in the filters window now have accessible text for what they do.

All the right side buttons in hotkeys now have tooltips, and by
extension, accessible text.
2020-11-25 19:38:05 -08:00
Gol-D-Ace
7ab98ca00f Update translations from Crowdin 2020-11-25 20:11:39 +01:00
Mike
f0593f3805 UI: Fix Save Replay button staying highlighted 2020-11-24 14:32:29 -08:00
Exeldro
02f47345cf frontend-tools: Don't give every loaded filter focus
Speeds up loading with large number of filters and prevents deadlock by
not getting the properties of filters during
OBSBasicFilters::UpdateFilters() which uses the source->filter_mutex
2020-11-24 14:32:18 -08:00
Matt Gajownik
a88b262d5f UI: Set default source toolbar visibility to true
This significantly simplifies the
configuration setting's initial load.

This also fixes as issue where the source toolbar
would initialise as "TextLabel" with enabled
buttons if the user had not yet toggled the setting.

Fixes #3722
2020-11-24 14:19:57 -08:00
jp9000
9048d8095d UI: Force plugins to use our Qt5Network, not their own
The Elgato Streamdeck plugin ships their own Qt5Network.dll on Windows,
which may be ABI incompatible with newer Qt DLLs if we decide to update
our Qt version. So to prevent that plugins (and other plugins) from
using their Qt5Network.dll, we need to explicitly load our
Qt5Network.dll first so that we can prevent it from trying to load
theirs beforehand.

For context on this, previously, we didn't ship Qt5Network on Windows
because we would have to ship OpenSSL with it, but we didn't want to
ship it without SSL support. Because of that, Elgato's Streamdeck plugin
would ship their own Qt5Network.dll library (that didn't have SSL
support anyway). However, Qt recently added support for windows
schannel, which allows SSL support via the Windows API, making it so we
don't have to ship extra libraries to get SSL. So now we can start
shipping Qt5Network without worry.
2020-11-22 15:30:12 -08:00
Ed Maste
a0f64a6017 UI: fix build on older FreeBSD versions
Include pthread_np.h header and use pthread_set_name_np to fix build
on FreeBSD 12.1.  The Linux-compatible pthread_setname_np alias was
added later.
2020-11-16 19:01:56 -08:00
Ka Ho Ng
f8aa02897f UI: Detect other instances of obs on FreeBSD
Detect other instances of the obs by creating an extra dummy thread,
named "OBS runonce". The process of threads enumeration of current user
is guarded by an O_EXLOCK file advisory lock when opening the lock file.
Such file lock would be dropped once the thread name is changed.

This should be usable on FreeBSD and possibly compile on DragonFly BSD.

fixes: #3053
2020-11-14 12:04:31 -08:00
Vadim Zhukov
0d222b6b56 Add OpenBSD support 2020-11-14 11:55:22 -08:00
jp9000
fc6d53763a UI: Add Twitch VOD track to simple output mode
Allows the ability to use the separated Twitch VOD track with simple
output mode in addition to advanced output mode.
2020-11-14 08:05:52 -08:00
jp9000
cac2ff31f4 cmake: Put decklink-captions in source folders 2020-11-14 04:40:47 -08:00
jp9000
8b30204946 UI: Move "changed" when recreating output res widget 2020-11-14 02:45:19 -08:00
jp9000
3805a11955 UI: Show service max resolution/framerate values to user
If a service has a maximum resolution and/or maximum framerate, shows
that to the user in the stream section of settings where the maximum
video/audio bitrate are shown.
2020-11-13 18:24:00 -08:00
jp9000
592cdfb039 UI: Add service res/fps limitation support to settings
Allows services to limit and enforce resolution and framerate values the
user can select in the UI if "ignore service recommendations" is not
checked. If the "ignore service recommendations" option is not checked,
the user will not be able to select or use a resolution and/or framerate
in the user interface that the service does not support. If "ignore
service recommendations" is checked, it will work as it normally would,
allowing any value to be used as per normal.

Fortunately, and hopefully for the foreseeable future, there is only one
service that enforces resolutions and framerates.
2020-11-13 18:23:24 -08:00
jp9000
ebbe8d1bf9 libobs: Change service max res. to res. list
(This commit also modifies rtmp-services and UI)

Changes the maximum resolution size to a resolution list, and splits the
maximum FPS to its own function.

(Note: ABI has not been modified because the last changes still haven't
been released yet, so it's safe to modify this as long as the changes
haven't been officially released)
2020-11-13 18:22:53 -08:00
jp9000
4f74ffe993 UI: Allow blocking all signals if resetting downscales
Allows the ability to block all the signals if resetting downscale
values, which will prevent values from triggering a widget update
unintentionally, forcing the user to have to save settings.
2020-11-13 18:09:14 -08:00
jp9000
97491ee91a UI: Add SetComboItemEnabled
Replaces SetComboItemDisabled in context-bar-controls.cpp with a global
function in qt-wrappers called SetComboItemEnabled, which allows both
enabling and disabling items in a combo box.
2020-11-13 18:07:20 -08:00
PatTheMav
9ac92f61be
UI: Use macOS app icon for Qt app on macOS 2020-11-13 17:17:45 +01:00
PatTheMav
8110b8bd65
UI: Fix tray icon menu handling on macOS 2020-11-13 17:17:45 +01:00
PatTheMav
84b2558995
UI: Update macOS app icon 2020-11-13 17:00:05 +01:00
PatTheMav
35e6f5e17a
UI: Update tray icons to use masks on macOS 2020-11-12 23:39:32 +01:00
jp9000
ade054eeaa UI: Fix compiler-specific error
Return value between ternary options are ambiguous on GCC/clang
2020-11-11 10:19:06 -08:00
jp9000
546dcc7a14 UI: Move "enforce" setting to "ignore" stream section
Moves the "Enforce streaming service bitrate" option from simple output
mode to the stream section, renames it to "Ignore streaming service
setting recommendations" (inverting it). When trying to check it, it
will now also display a message box warning the user that it's generally
a not-so-good idea.

Also displays recommended settings for the service.
2020-11-11 09:48:39 -08:00
jp9000
005863a346 UI: Refactor to make it easier to get service object
Refactors a bit of code to make it easier to get the current stream
service object in the settings
2020-11-11 09:48:10 -08:00
jp9000
6b81c106d8 UI: Add VOD track support in advanced output
Adds a VOD track option (specific to Twitch) that allows a user to
specify which audio track to use for their Twitch VODs, which uses a
separate encoder to encode the track. This allows users the ability to
choose what audio goes on their VOD, separately from the live stream.
2020-11-04 00:15:25 -08:00
Colin Edwards
5b8f89d86e decklink: Clean up warnings introduced by caption code 2020-11-03 17:00:14 -08:00
Colin Edwards
7b0d7c6357 Remove BUILD_CAPTIONS build flag 2020-11-02 22:46:55 -06:00
Colin Edwards
923f06bfa6 decklink: Add ability to ingest/embed cea 708 captions
(This commit also modifies libobs, UI)
2020-11-01 22:28:49 -08:00
Richard Stanway
9a64adb4d1 UI: Don't update source context bar when hidden 2020-10-31 20:59:12 -07:00
Ryan Foster
7f4e375e12 UI: Disable stream encoder setting in simple output with active output
We disable the stream encoder setting in Advanced Output Mode when an
output is active, so let's also disable the stream encoder setting in
Simple Output Mode when an output is active.
2020-10-31 02:52:24 -07:00
Jim
b32abbe33f
Merge pull request #3083 from pkviet/srtfix4
UI: Enable sps/pps (video headers) repetition (for srt/mpegts)
2020-10-30 23:25:24 -07:00
Christian Lockley
ad528bef17 UI: Detect other instances of obs on Linux
fixes: obsproject#3053
2020-10-30 11:50:47 -07:00
Richard Stanway
57bed7923e UI/installer: Use random temp directory for security
Using a fixed path would allow malware on a compromised system to
perform a DLL planting attack. Reported by Erik Wynter.
2020-10-30 17:10:34 +01:00
jp9000
6af26d3290 UI: Add max cx/cy/fps clamp (if service specifies) 2020-10-30 00:28:44 -07:00
Johann Garces
ade4c4cf49 UI: Run Autoconfig Wizard on New Profile Creation
New profile state is similar to first start: settings are wiped, encoders
not setup. It may make sense to show the auto configuration wizard when
a new profile is made as well.

There is a checkbox option to show the wizard. If a profile is created
with the checkbox off, the checkbox will remain defaulted to off next
prompt.
2020-10-29 14:15:57 -07:00
Matt Gajownik
bc7afb0fae UI: Report detailed output errors for Replay Buffer
Same changes as 0c0ffb341c
2020-10-21 18:10:05 -07:00
hgonomeg
4390eb5591 UI: Fix replay buffer saved event in advanced mode
AdvancedOutput::AdvancedOutput(OBSBasic *main_) lacked
a proper event handler connection
2020-10-18 12:17:31 -07:00
Mikhail Kochegarov
117d35433f UI: Detect other instances of obs on macOS
Detect other instances of the obs by inspecting running applications
with same bundle ID.

fixes: #3053
2020-10-16 05:48:37 -07:00
Exeldro
64869bac46 UI: Add duplicate filter 2020-10-16 05:38:10 -07:00