55 Commits
Author SHA1 Message Date
shiina424andRyan Foster d7292a4f64 UI: Create YouTube Dock when switching profile 2024-11-05 14:42:06 -05:00
PatTheMavandRyan Foster bf00c17b2b UI: Update profile encoder information after module load
The function InitBasicConfigDefaults2's purpose is to set up encoder-
related settings for a profile, which requires all available encoders
to have been discovered first.

As encoders are added by runtime modules, this also means that discovery
needs to be delayed until after modules have been loaded, but modules
themselves require a valid profile to exist and be loaded.

This leads to the requirement of profiles needing to exist in a
half-initialized state when modules are loaded and only becoming
fully initialized after that.

This distinction is not necessary after the initial launch of obs-studio
because runtime plugins are not hot-loadable, so the update can happen
unconditionally at any time a plugin is changed, which implicitly
couples every call to ActivateProfile with a call to
UpdateProfileEncoders.
2024-10-30 16:18:29 -04:00
PatTheMavandRyan Foster 072102701c UI: Use custom property on QAction to retain profile or collection name
On some platforms (e.g. KDE) accelerators are automatically added to
the text properties of QActions, thus changing the value returned by
text().

Thus we cannot rely on the text to always represent the same text that
we set originally and have to explicitly store and retrieve the value
as a property.

Coincidentally this not only fixes possible issues on other platforms,
but is also architecturally more correct.
2024-10-21 11:51:33 -04:00
PatTheMavandRyan Foster 918fe6171d UI: Update order of profiles and scene collections in their menus
The old method to update the profile menu iterated over the directory
entries of the profile directory in the order provided by the operating
system.

The system calls used for this explicitly state that the order of items
is "undefined" but seems to have followed a case-insensitive
alphabetical order on Windows, an order which users have come to expect.

The new code uses a std::map to store discovered profiles and scene
collections, which is ordered by key and with std::string used for keys
this means a lexicographical sorting of keys which is case-sensitive.

To restore the old behavior, profiles and scene collections need to be
added to their respective menus sorted by case-insensitive order, which
has to be done manually before adding the items.
2024-10-21 11:51:33 -04:00
PatTheMavandRyan Foster a05f5f5009 UI: Fix activation order of profile and scene collections after delete
After a profile or scene collection is deleted, the last item in each
list would have been automatically activated as the new current profile
or scene collection.

This is opposite to prior behavior, which would always select the first
item in the list.

This code restores the prior behavior.
2024-10-10 16:38:33 -04:00
derrodandRyan Foster 746d215453 UI: Avoid path<->string conversion when refreshing profile cache 2024-10-08 12:59:45 -04:00
shiina424andRyan Foster cb1a15ecdf UI: Fix locale key for rename profile text 2024-10-07 14:47:48 -04:00
Ryan Foster a1fbf1015f clang-format: Increase column limit from 80 to 120 2024-10-04 18:19:27 -04:00
PatTheMavandRyan Foster 607d37b423 UI: Rewrite profile system to enable user-provided storage location
This change enables loading profiles from locations different than
OBS' own configuration directory.

It also rewrites profile management in the app to work off an in-memory
collection of profiles found on disk and does not require iterating
over directory contents for most profile interactions by the app.
2024-09-12 16:18:46 -04:00
cg2121andLain 89554112c1 UI: Cleanup frontend event handling
This adds a function to OBSBasic to call on_event, so every
time a event is called, the api variable doesn't have to be
checked everytime.
2024-08-10 17:35:22 -07:00
tytan652 48f139729f UI,shared: Move Qt Wrappers to its own directory 2024-07-27 07:38:36 +02:00
derrodandLain eb89f7c3ab UI: Create/Delete YouTube Dock when switching profiles 2023-09-06 21:50:12 -07:00
tytan652andRyan Foster a4bef329c2 UI: Replace remaining enc-amf reference
Since enc-amf was removed, this reference causes issue by flagging H264
AMF as unsupported forcing a fallback to x264.
2023-08-22 14:24:46 -04:00
Kurt KartaltepeandLain 6034aa4164 UI: Avoid auto config selecting QSV on linux
Previously we left the QSV -> x264 in the fallback function to deal with
the autoconfig wizard possibly selecting QSV outside of the UI. But this
actually runs for both recording and streaming every time obs starts,
reseting user's config if they selected QSV for recording.

Instead avoid recording from being selected in the UI and by the
auto-config wizard, and revert changes to the fallback function.
2023-07-27 02:34:30 -07:00
Kurt KartaltepeandRyan Foster 425be04014 UI: Disable QSV for simple mode on Linux
Linux QSV drivers have varying capabilities depending on if the
free/non-free Intel drivers are installed. This means we cannot safely
expose QSV in simple mode as users may be unable stream without changing
to advanced mode.
2023-07-14 12:19:33 -04:00
Lain 106c7aa61f Update copyrights/names 2023-05-20 01:31:18 -07:00
Jim 00078a6a73 UI: Add QSV AV1 to simple output mode 2022-11-21 19:08:02 -08:00
Roman Hutsandjp9000 8a831e2da5 UI: Add AMD AV1 to simple output mode 2022-11-18 18:18:08 -08:00
PatTheMav 4ff789e24c UI: Fix snprintf calls with literals as buffer sizes 2022-11-11 19:51:28 +01:00
gxalphaandPatrick Heyer e6b7a60638 UI: Add simple mode for Apple Hardware HEVC 2022-11-02 22:44:20 +01:00
jp9000 614bf960d9 UI: Add NVENC AV1 to simple output mode 2022-10-07 14:34:39 -07:00
PatTheMavandRyan Foster 1b57419670 UI: Update volume controls decay rate on profile switch
Without this change the decay rate would only be updated when an audio
source is added or when the volume meter itself is changed (e.g. from
horizontal to vertical layout).
2022-09-20 20:32:33 -04:00
jp9000 2b957c9368 UI: Update simple output to use new AMD encoder 2022-07-21 15:29:25 -07:00
gxalpha 29ae00e4af UI: Add Apple H.264 hardware encoder to simple mode
Adds the Apple Silicon hardware encoder as a simple mode option. For
recordings this only requires being on Apple Silicon (since we use the
Constant Quality setting), while for streaming it requires the user to
be on macOS 13 or newer (since we're using CBR).
2022-07-11 23:45:43 +02:00
VainockandMatt Gajownik e053f9dd26 UI,mac-avcapture: Use consistent variables in locales 2022-07-02 14:02:40 +10:00
Yuriy ChumakandJim 84e7db5059 UI: Simple Output Mode for NVENC HEVC 2022-06-05 16:02:58 -07:00
cg2121andJim 748cf32a43 UI: Add events for renaming profiles/collections
The events make it more clear when profiles or scene
collections are renamed.
2022-03-08 11:17:59 -08:00
tytan652andJim 2720e6d00f UI: Avoid emiting events 2 times when renaming a profile 2022-02-12 15:14:21 -08:00
tt2468andJim 167f539416 libobs: Rename obs_audio_monitoring_supported to _available
With the reasonable possibility of monitoring support becoming a
runtime check, the phrase `available` is more fitting.
2021-12-22 02:43:14 -08:00
tt2468andJim ff22897d68 libobs/UI: Stop using preprocessor directives for monitor
**Code Cleanup**
Stop using preprocessor directives to determine if audio monitoring
is supported. Use runtime function instead
2021-11-20 20:00:59 -08:00
tt2468andJim feda1aaa28 UI: Add _CHANGING frontend events
Adds the following events:
- `OBS_FRONTEND_EVENT_SCENE_COLLECTION_CHANGING`
- `OBS_FRONTEND_EVENT_PROFILE_CHANGING`

Both emitted right before the change occurs. Can provide plugins with
better awareness of these critical operations happening, so that they
can react accordingly.
2021-11-10 06:36:23 -08:00
MikeandJim e6a3d2b8f2 UI: Add restart message on profile change
When a profile changes settings that require a restart, show a dialog to
ask the user whether they'd like to restart.

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

Closes obsproject/obs-studio#3207
2021-10-07 11:49:21 -07:00
derrod 698ed54870 UI: Add missing Auth::Load() when duplicating/creating profile 2021-09-27 18:42:01 +02:00
SCG82andDillon Pentz 88cc691afa UI: Add obs-frontend-api functions to create/delete profiles 2021-07-09 19:32:18 +12:00
Johann GarcesandJim 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
Clayton Groeneveldandjp9000 762983b5d8 UI: Use non-native file dialog w/ Linux 2020-07-18 09:49:24 -07:00
Matt Gajownik 2cbe64a79a UI: Fix Import Profile in Portable Mode
QDir.mkpath seems broken with relative paths

Also adds a check for existing profiles
2020-02-23 10:57:11 +11:00
jp9000 f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
Richard Stanwayandjp9000 90df9ea290 UI: Update error message severity levels and show additional info 2019-04-19 05:45:19 -07:00
jp9000 9cf40e230b UI: Fix profile duplicates using wrong cookies 2019-02-18 19:20:28 -08:00
jp9000 7edbb2f149 UI: Delete cookies on profile removal 2019-02-13 19:39:55 -08:00
jp9000 9fee895359 UI: Use hardware encoding by default if available
If the user doesn't use the auto-configuration on first use, set the
default encoders used in simple output mode to hardware encoders.
2019-02-07 17:00:46 -08:00
jp9000 08fb29a035 UI: Add Auth and OAuth classes
Allows the ability to authenticate to a specific service.  Typically via
OAuth.
2019-02-07 14:47:15 -08:00
jp9000 fe043f2b2a UI: Add per-profile browser panel cookie management
Allows the ability to switch cookies between profiles.  Allows the
ability to, for example, switch streaming service accounts between
profiles for proper access to the pages displayed by the browser panels
(such as chat windows).
2019-02-07 14:47:15 -08:00
Shaolin b5ee8a9a5d UI: Prevent format-truncation compiler warning
Variables path and dir with the same declared size triggers a compiler
warning about possible truncation. Although, depending on the path
where profiles are stored, its still possible to go beyong the declared
size and the path will be invalid. This will not trigger any
compilation warning and all invalid paths will be cought by the already
check in the os_glob function.
2018-09-06 22:10:29 -03:00
VodBox e122a07cdd UI: Change monitoring device on profile change 2018-04-11 23:59:34 +12:00
jp9000 bd0983a89e UI: Add simple output mode encoder fallback
Prevents simple output mode from getting stuck on an encoder that may
not be available suddenly for whatever reason (system device changes,
driver issues, etc).  If the encoder is no longer available, falls back
to x264 to ensure that the user can continue to use the program.
2018-01-20 13:58:02 -08:00
jp9000 44f4f4366b UI: Use snprintf and std::string when creating profiles 2018-01-17 02:59:18 -08:00
Michelandjp9000 609334e427 UI: Fix problem with exporting scene collections/profiles
When exporting scene collections/profiles existing files are
not overwritten.

Closes jp9000/obs-studio#963
2017-07-21 07:46:39 -07:00
jp9000 522f5cdf3b UI: Make sure all message box buttons are translated
Instead of QMessageBox::question and QMessageBox::information, use the
OBSMessageBox class, which translates all buttons.
2017-05-13 14:06:32 -07:00