59 Commits
Author SHA1 Message Date
Ryan Foster a1fbf1015f clang-format: Increase column limit from 80 to 120 2024-10-04 18:19:27 -04:00
PatTheMavandRyan Foster b9808eaca8 UI: Fix outdated scene collection and profile method names 2024-09-16 15:53:51 -04:00
PatTheMavandRyan Foster 3e0592dc20 UI: Rewrite scene collection system to enable user-provided storage
This change enables loading scene collections 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
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
PatTheMavandRyan Foster 2635cf3a2a UI: Split global config into app and user config
This introduces a split of the current single ConfigFile instance for
all configuration into two separate instances.

The app config instance contains system-wide settings that mainly
concern the working of the app itself, whereas the user config instance
contains settings actually exposed to the user for the configuration.
2024-09-12 16:18:46 -04:00
tytan652 48f139729f UI,shared: Move Qt Wrappers to its own directory 2024-07-27 07:38:36 +02:00
Ruwen HahnandRyan Foster c8950900c3 UI: Add eRTMP Multitrack Video Output 2024-06-04 20:50:46 -04:00
derrod 8ac8118b7f UI: Add chapter frontend API and hotkey 2024-05-26 23:11:48 +02:00
Norihiro KamaeandLain 7b2d555061 UI: Set dock floating after hiding it
Setting the dock floating before hiding it created a transparent window
on X11.
2024-04-20 16:49:19 -07:00
tytan652andLain 90d96e92c2 obs-frontend-api,UI,docs: Add API to add custom docks with no toggle
Some plugin does that by deleting the QAction returned by
obs_frontend_add_dock().

Now that obs_frontend_add_dock() is deprecated,
obs_frontend_add_custom_qdock() replace this usage.
2023-06-03 16:47:01 -07:00
tytan652andLain cde5545f8f obs-frontend-api,UI,docs: Add dock API that ask for unique object name
obs_frontend_add_dock() is deprecated in favor of
obs_frontend_add_dock_by_id()
2023-06-03 16:47:01 -07:00
tytan652andLain f2fa54120a UI: Avoid having two dock with the same object name
https://doc.qt.io/qt-6/qmainwindow.html#saveState

You should make sure that this property is unique for each QToolBar and
QDockWidget you add to the QMainWindow.
2023-06-03 16:47:01 -07:00
Norihiro KamaeandJim 23a0b7cacd UI: Fix possible use-after-free of obs_source_t
Also removes an implicit pair of successive obs_source_getref and
obs_source_release calls from OBSSource.
2023-03-18 15:34:47 -07:00
ExeldroandJim 2d3013ccdc UI: Add obs_frontend_add_undo_redo_action 2023-02-04 15:30:07 -08:00
ExeldroandJim 46da073aa5 UI: Add obs_frontend_open_sceneitem_edit_transform() 2023-02-04 15:23:26 -08:00
Jim 1fc6c50b62 UI/obs-frontend-api: Return allocated strings for new funcs
8dda8d3500 added a few functions to get the last
recording/replay/screenshot path, but it should return allocations
because it's possible for the data to be modified at a later point.
2022-10-30 20:35:36 -07:00
cg2121andJim 8dda8d3500 obs-frontend-api: Add functions to get last saved files
Adds functions to the frontend api to get the last recording,
screenshot and replay buffer saved.
2022-10-30 19:53:11 -07:00
cg2121andJim 3c7b1c8297 obs-frontend-api: Add theme functions
This adds a frontend function to check if a theme is dark and also
adds an event for when the theme is changed.
2022-10-15 16:21:34 -07:00
gxalphaandMatt Gajownik 467f73d4c9 obs-frontend-api: Add function for manual file splitting 2022-07-30 18:50:13 +10:00
cg2121andJim 65a360fa41 obs-frontend-api: Add function to get frontend translated string
Developers now can easily get a translated string from the frontend
instead of using their own translations.
2022-03-10 06:27:18 -08:00
Jim b9e01380f3 UI: Replace addref calls with get_ref 2022-01-24 14:06:50 -08:00
tt2468andJim 47397ce527 UI: Add obs_frontend_open_source_interaction()
Adds a frontend api call to open the interact dialog of a source,
just like the `_properties` and `_filters` functions.
2021-12-28 21:44:35 -08:00
VodBox 3d544653e8 UI: Cleanup libobs C++ type use 2021-11-26 23:23:51 +13:00
tt2468andJim 22fa8f8bb0 UI: Add obs_frontend_get_current_record_output_path()
Returns the current path of the record output.
2021-11-13 16:05:52 -08:00
jp9000 ee67228a94 UI: Fix compiler error
I probably should have at least compiled this before pushing a commit.
2021-08-15 06:55:15 -07:00
jp9000 228ca55661 UI: Fix frontend API cleanup/exit event order
Makes it so that the exit event is always called regardless of save
state, and that exit is always called after cleanup rather than before.
2021-08-15 06:44:23 -07:00
ExeldroandJim 5b18faeb49 UI: Add functions to open properties and filters 2021-08-12 04:31:40 -07:00
ExeldroandJim f0d372bdd7 obs-frontend-api: Send OBS_FRONTEND_EVENT_SCENE_COLLECTION_CLEANUP 2021-08-12 01:33:52 -07:00
Norihiro KamaeandJim 04b0d632aa UI: Fix da_push_back taking a wrong type of item
A pointer to `OBSSource` was passed to an argument that expect a pointer
to `obs_source_t *`.
Since the current implementation of a class `OBSSource` has a member
`obs_source_t *obj` at first and the class does not have any virtual
member functions, most implementation should work correctly.
2021-07-31 15:29:26 -07:00
SCG82andDillon Pentz 88cc691afa UI: Add obs-frontend-api functions to create/delete profiles 2021-07-09 19:32:18 +12:00
tt2468andDillon Pentz 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
Christopher P YargerandJim 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
tt2468andJim fa3ae6db93 Frontend-API: Add obs_frontend_reset_video() 2021-02-03 08:53:42 -08:00
Clayton GroeneveldandJim 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
Clayton Groeneveldandjp9000 b9b990a35a UI: Fix transition enumeration
Fixes issue where sometimes the transition loop would return a null
transition.
2020-08-23 09:47:52 -07:00
Clayton Groeneveldandjp9000 a70014d7b2 UI: Add ability to make screenshots
Co-authored-by: Jim <obs.jim@gmail.com>
2020-07-30 17:41:43 -07:00
tt2468andjp9000 a03189bb68 UI: Add TBar controls to obs-frontend-api
Adds `obs_frontend_set_tbar_position` and `obs_frontend_release_tbar`,
which allow plugins and scripts to control the tbar in OBS.
This specific change is required for the `SetTBarPosition`
request to be added to obs-websocket.
2020-07-06 17:48:30 -07:00
Chris Angelicoandjp9000 7c540acc11 UI: Create an API for opening projector windows 2019-11-24 22:45:28 -08:00
jp9000 eab10d48b2 UI: Add pause support
Adds support for pausing recordings.  When settings are eligible for
recordings, a pause button will appear next to the recording button.  If
the settings are not eligible, it will warn the user in the output
settings that they cannot pause recordings if those settings are used.
2019-07-08 08:11:56 -07: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
jp9000 bcd59b670a obs-frontend-api: Add func to add custom docks 2019-06-13 21:12:49 -07:00
JimandGitHub 3a3cfce29d Merge pull request #1873 from Palakis/feature/frontend-api-studio-mode-transition
obs-frontend-api: Add method to trigger a Studio Mode transition
2019-05-09 19:24:59 -07:00
Stéphane Landjp9000 4762351258 obs-frontend-api: Add func to trigger a Studio Mode transition 2019-05-09 17:01:08 -07:00
Stéphane Landjp9000 d3910149d2 obs-frontend-api: Add methods to get/set transition duration 2019-05-09 16:58:47 -07:00
Nick Stockton 54da8eca85 obs-frontend-api: Access system tray icon from API
All UI elements are accessible through the obs frontend api via
obs_frontend_api_get_main_window, except for the tray icon and its
elements. This commit adds an obs_frontend_api_get_system_tray function
which returns the pointer to the QSystemTrayIcon cast to void (much like
the QMainWindow pointer for the main window).
2019-04-04 07:55:19 -04:00
jp9000 1c4a6ca6c6 UI: Make workaround for Logitech plugin hard lock
In commit d17ee20863, we attempted to fix a race condition crash in the
Logitech plugin by deferring the "stream/recording/replay buffer active"
calls to the UI thread.  However, the Logitech plugin loop_function
funciton can call obs_frontend_streaming_active/etc functions while the
UI thread waits for the loop_function thread for many OBS events,
causing a hard lock in the Logitech plugin.  This fixes that by making
the obs_frontend_streaming_active/etc functions completely atomic
instead.  It's a bit of a hack but it's better than accessing objects.
2019-02-26 06:37:01 -08:00
jp9000 d17ee20863 obs-frontend-api: Make a few frontend API thread-safe
Additionally, check for null output handlers.
2019-02-18 19:28:26 -08:00
Ilya Melamedandjp9000 e265fc92ed UI: Block when calling obs_frontend_set_current_scene
Uses WaitConnection() when calling obs_frontend_set_current_scene to
ensure that the calling thread and the UI thread are synchronized when
setting the current scene via this function.

Closes obsproject/obs-studio#1234
2018-05-04 15:45:27 -07:00
Ilya Melamedandjp9000 c768f703ad UI: Add obs_frontend_add_scene_collection API call
Allows the ability to add a new scene collection via the frontend API.
Blocks until the scene collection has been successfully added to ensure
synchronization between the calling thread and the UI thread.

(Jim: Added detailed description to commit message)

Closes obsproject/obs-studio#1232
2018-05-04 15:40:53 -07:00
Ilya Mandjp9000 439b9e4d15 UI: Add frontend API to defer saving
Allows the ability to perform multiple actions that would normally save,
and defer the save until all of those actions are complete.

Closes obsproject/obs-studio#1231
2018-04-06 17:34:10 -07:00