Commit Graph

507 Commits

Author SHA1 Message Date
Richard Stanway
0189c3a3f5 Utils: Check system tray exists before trying to use it
Fixes https://github.com/obsproject/obs-studio/issues/9991
2024-01-15 23:19:09 -08:00
Exeldro
f43ef8e2da requesthandler: Add optional context to TriggerHotkeyByName 2024-01-08 23:06:12 -08:00
tt2468
07537a33fa websocketserver: Check for EventHandler validity in de/constructor
Redundant fix for shutdown crash
2023-11-14 00:07:05 -08:00
tt2468
efeae8d640 eventhandler: Disconnect signals from all public sources on shutdown
Fixes crash on shutdown when memory leaks lead to un-destroyed
sources after plugin shutdown.
2023-11-14 00:07:05 -08:00
Norihiro Kamae
3cd8163945 base: Fix error to save configuration at obs_module_unload
When `obs_module_unload` is called, the frontend API is no longer
available so that `_config->Save()` is failing with error messages.
Since the configuration is saved from the OK or the Apply button on the
dialog, it is not necessary to save it again at `obs_module_unload`.
2023-08-16 12:56:12 -07:00
Norihiro Kamae
55b3f88db9 base: Fix a comment for SetSceneSceneTransitionOverride 2023-08-09 21:53:17 -04:00
tytan652
417725801c base,deps,src: Replace qr submodule by prefix/system install 2023-07-15 16:58:18 -07:00
tt2468
6434c42155 websocketserver: Retry listen on IPv4 if IPv6 is not available
Fixes #1311
2023-05-27 22:54:02 -07:00
tt2468
ac00465565 requesthandler: Add SetRecordDirectory
I've admittedly done a pretty bad job of communicating the intention of
having `SetProfileParameter` be the go-to method of configuring the
record directory. In hindsight, such a commonly needed feature should
not be locked behind an arguably complex request.

Closes #1142
Closes #1062
Closes #1035
2023-05-27 22:30:08 -07:00
tt2468
19170fe6d9 WebSocketApi: Add missing GPL license headers 2023-05-27 22:06:46 -07:00
tt2468
1fc7900b1c Config: Move default values to header file
Just to make the code style align with other places
2023-05-27 22:00:51 -07:00
tt2468
53d7596160 base: Various random code nitpicks 2023-05-27 22:00:26 -07:00
tt2468
886738547a websocketserver: Clean up WebSocketSession class implementation
Makes it header-only with inlines, so there's theoretically some very
small performance improvements too.
2023-05-27 21:50:55 -07:00
tt2468
c11874eb17 eventhandler: Use OBS_FRONTEND_EVENT_SCRIPTING_SHUTDOWN for exit
Fixes #1136
2023-05-09 22:53:43 -07:00
tt2468
a0ffe16e91 base: Pause requests and events during start, SC change, and shutdown
This implements the functionality described by the new NotReady request
status. Behavior should now be *much* more reliable.
2023-05-09 22:53:43 -07:00
tt2468
d5185417ec requesthandler: Add NotReady request status
During scene collection change and OBS exit, performing requests
constitutes undefined behavior. Previously, we attempted to help this
by providing the `SceneCollectionChanging` event for any clients to
pause requests client-side, but this method has proven to not be
adequate to fix the issue. As such, this allows us to tell clients
explicitly that a request cannot be fulfilled reliably, and they
may decide whether or not to retry.
2023-05-09 18:26:25 -07:00
tytan652
21886adb32 base: Fix generated header inclusion 2023-03-27 12:59:23 -04:00
PatTheMav
dd248faecb cmake: Add changes for CMake build framework 3.0
New code path only taken if OBS_CMAKE_VERSION is set to 3.0.0 or
greater, old functionality remains unchanged.
2023-03-26 18:21:05 -04:00
tt2468
96032e0e8c
requesthandler: Allow empty vendor request data 2023-02-08 10:10:44 -08:00
tt2468
e797a3fb34
websocketserver: Validate data type of authentication payload field
Can cause crash if field is not a string

Reported by @tyami94
2022-12-31 14:54:11 -08:00
tt2468
9959acb0e8 forms: Various UI improvements 2022-11-18 02:09:48 -08:00
tt2468
8b1ef17c25 docs: Fix initial version for reconnect enum fields 2022-11-18 02:09:48 -08:00
tt2468
a254172c12 eventhandler: Add reconnecting and reconnected stream output states
Closes #1050
2022-11-18 02:09:48 -08:00
tt2468
57a9e23f16 docs: Document ObsOutputState enum 2022-11-18 02:09:48 -08:00
tt2468
323b5d0b5d eventhandler, utils: Implement missing output states 2022-11-18 02:09:48 -08:00
tt2468
23f883d906 eventhandler: Split some handling code into multi handlers
Code cleanup
2022-11-18 02:09:48 -08:00
tt2468
8cabe24b77 eventhandler: Add ScreenshotSaved event
No, this does not trigger with `Get/SaveScreenshot`. I've tried to make
that super clear in the docs. Hopefully people don't get too confused.
2022-11-17 22:19:12 -08:00
tt2468
9cfca3c7d1 utils: Use new method to get last replay
Uses the newer obs-frontend-api function instead of our original
method. It was cool, but is no longer necessary.
2022-11-17 22:18:18 -08:00
tt2468
cfa0b4363e utils: Add function to get last screenshot file name 2022-11-17 22:16:59 -08:00
jeiea
9bdf560bf8 utils: Fix use-after-free in GetLastReplayBufferFileName 2022-11-17 18:36:25 -08:00
Chris Angelico
32d0834c3f docs: Fix description of "mul" volume notation 2022-11-12 16:00:28 -08:00
Matt Rossman
9722ed3df4 Add CustomEvent docs entry
Resolves #1031
2022-11-12 15:56:03 -08:00
Christophe Carvalho Vilas-Boas
290e042612 fix: Sleep request fields are exclusive so both optional fixes #1042 2022-10-22 15:22:20 -07:00
Matteo Gheza
bc18401fb0 docs: Fix ouputPaused typo 2022-10-18 13:10:58 -07:00
tt2468
9e1a41f219
docs: Clarify that nested scenes are recommended instead of groups
Seems like it would be obvious, but apparently not
2022-09-18 18:02:13 -07:00
tt2468
6038fe9a0a
docs: Start list of known propertyName values for common buttons 2022-09-07 12:43:29 -07:00
Dominik Nakamura
fb2abc45cf docs: Fix category of GetRecordDirectory` 2022-08-24 01:44:55 -07:00
tt2468
b07dce821a websocketserver: Log disconnect code and reason on disconnects
No clue why I wasn't doing this before.
2022-08-02 14:35:50 -07:00
Dominik Nakamura
2f549b82a3 base: Fix version string when built as submodule 2022-08-01 22:22:43 -07:00
tytan652
190a9551f6 requesthandler,websocketserver: Fix C4101 warnings 2022-07-28 11:40:27 -07:00
tytan652
773f85e0d7 requesthandler: Fix C4267 warnings 2022-07-28 11:40:27 -07:00
tytan652
b5d50c4243 lib,requesthandler,eventhandler: Fix C4244 & C4334 warnings 2022-07-28 11:40:27 -07:00
tt2468
e0d322d4cc Config: Disable WebSocket server by default
I believe it would be bad to enable a network-based WebSocket server
for all OBS users, since obs-websocket usage is very likely less than
a majority of users. A password will still be generated on first run,
so there are no worries about weirdness if a user goes in to enable
the server later on.
2022-07-25 08:24:04 -07:00
tt2468
ecde83a28d requesthandler: Allow empty object in Set*PrivateSettings requests
Requested by #958

Closes #958
2022-07-25 08:21:57 -07:00
tt2468
16f3ceb997 eventhandler: Provide outputPath on OUTPUT_STARTED too
4.x apparently included this path during output start along with stop.
It appears safe to include this on output start.

Closes #963
2022-07-25 08:05:03 -07:00
tt2468
b9a63603c7 websocketserver: Validate op field type
Could cause a crash by assuming `op` is always a number.

Closes #965
2022-07-25 08:00:48 -07:00
tt2468
1698b2895b
base: Fix MSVC warning about misdeclared Config struct 2022-07-22 07:00:05 -07:00
tt2468
1d25f97004
requesthandler: Fix OpenVideoMixProjector program option
It was stuck opening preview regardless of setting.
2022-07-22 01:59:23 -07:00
tt2468
35e3e278bf
requesthandler: Fix GetGroupSceneItemList name in docs 2022-07-12 10:10:53 -07:00
Brendan Allan
1dd57f6140 requesthandler: Add Outputs requests
Co-authored-by: Ruggero Tomaselli <ruggerotomaselli@gmail.com>
Co-authored-by: tt2468 <tt2468@irltoolkit.com>
2022-07-02 10:32:48 -07:00