84 Commits

Author SHA1 Message Date
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
tytan652
21886adb32 base: Fix generated header inclusion 2023-03-27 12:59:23 -04: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
tt2468
9cdfa41113 requesthandler: Add projector creation requests
I didn't think I'd be able to make remotely usable requests using OBS'
existing projector API, but I'm actually pretty happy with how it
turned out.

Closes #929

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2022-07-02 08:25:38 -07:00
tt2468
6deadc25ac base: Change column limit to 132
A column limit of 80 is very restrictive and code readability was
suffering. A limit of 132 is more realistic for this plugin.
2022-06-07 21:36:51 -07:00
tt2468
f73e78582b base: Format code 2022-05-13 21:19:29 -07:00
tt2468
3303acfcca requesthandler: Don't require session for Request Handler
Required to call requests in situations where a session is not
relevant.
2022-05-10 22:48:57 -07:00
Christopher Sund
2479501879 Requests: Add GetMonitorList
Adds a new request `GetMonitorList` that returns a json Array of
objects containing data about connected monitors. See #868
2022-04-25 20:20:45 -07:00
tt2468
d8c042fe4a requesthandler: Add private scene item settings get/set
Some may need it, similarly to Get/SetSourcePrivateSettings.
2022-04-13 02:13:30 -07:00
tt2468
aa13828cf5 requesthandler: Add SetSourceFilterName 2022-02-16 13:37:18 -08:00
tt2468
db2ffa569a Base: Fix some formatting 2022-02-16 13:30:10 -08:00
tt2468
66c14dced5 requesthandler: Reorder a filter request 2022-02-16 13:23:49 -08:00
Brendan Allan
361547a96d
requesthandler: Filter requests & events (#888)
* Implement filter requests

* Fix CreateSourceFilter

* Implement most Filter events

* build against 27.1.3

* Update main.yml

* SourceFilterNameChanged rename

* revert main.yml changes

* rename SourceFilterCreated and revert CI changes

* cleanup

* Base: Various cleanups + fix -Werror

* Base: A few nitpicks/fixes

* requesthandler: Fix CreateSourceFilter

* utils: Fix CreateSourceFilter

Use obs_source_t* instead of OBSSourceAutoRelease to prevent double
release

* requesthandler: Remove filterIndex from CreateSourceFilter

The purpose of sceneItemEnabled in CreateSceneItem is to hide the
scene item while we still hold the scene mutex (guaranteeing the input
will never be shown). Since we don't hold a mutex when creating
filters, there's no reason to do any extra steps.

* requesthandler: Validate input/filter kinds in *DefaultSettings

Co-authored-by: tt2468 <tt2468@gmail.com>
2022-02-16 13:17:06 -08:00
tt2468
7b52d7e015 requesthandler: Move GetRecordDirectory to config
More consistency
2022-02-14 17:11:07 -08:00
tt2468
9664f28483 requesthandler: Finish transition requests 2022-02-14 17:01:44 -08:00
tt2468
d9070f9edb requesthandler: Add scene scene transition override requests
It's named like:
`Get Scene (Scene Transition) Override`
2022-02-14 15:57:33 -08:00
tt2468
fa8a091a3e RequestHandler: Add SendStreamCaption 2022-02-13 15:20:19 -08:00
tt2468
38d78596ce requesthandler: Add replay buffer requests 2022-01-26 21:19:10 -08:00
tt2468
ae906bb283 RequestHandler: Add VirtualCam requests 2022-01-18 19:23:06 -08:00
tt2468
6035294339 requesthandler: Add GetSourceFilter 2022-01-03 13:54:27 -08:00
tt2468
6a2d5968ad requesthandler: Add private source settings get/set requests
It was requested via Discord to be able to modify the private settings
of any private source, since that functionality is used by some client
software to store stateful data. As private settings are in territory
that no normal user should ever tread into, these requests will be left
undocumented.
2022-01-01 17:43:26 -08:00
tt2468
fe64620731 requesthandler: Add scene item blend mode requests 2021-12-31 18:05:05 -08:00
tt2468
24e43d0276 requesthandler: Add GetSpecialInputs 2021-12-31 16:49:18 -08:00
tt2468
506a9167c3 requesthandler: Add SetInputAudioTracks 2021-12-31 15:26:54 -08:00
tt2468
e451a8d6b0 requesthandler: Use unordered_map for request table
Shaves like 0.0005ms off of request time, but still worth noting.
2021-12-31 15:26:54 -08:00
tt2468
702f88cea8 requesthandler: Add GetInputAudioTracks 2021-12-31 14:08:22 -08:00
tt2468
4a2654d095 RequestHandler: Add GetGroupList 2021-12-30 00:12:41 -08:00
tt2468
a90dafb971
Merge pull request #885 from obsproject/feature/input-audio-requests-events
Input audio requests and events
2021-12-29 21:12:23 -08:00
tt2468
9113ff9021 RequestHandler: Add audio balance requests 2021-12-29 21:03:16 -08:00
tt2468
a94ac24027 RequestHandler: Add input open dialog requests
Adds
- `OpenInputPropertiesDialog`
- `OpenInputFiltersDialog`
- `OpenInputInteractDialog`
2021-12-29 21:00:11 -08:00
tt2468
e2f60b002e RequestHandler: Reorder Ui requests to new category 2021-12-28 16:58:28 -08:00
tt2468
07249da400 RequestHandler: More transition requests 2021-12-23 21:00:11 -08:00
tt2468
14238027cc RequestHandler: More transition requests 2021-12-23 01:07:27 -08:00
tt2468
e05be47847 RequestHandler: Add GetTransitionKindList 2021-12-22 16:28:12 -08:00
tt2468
5f261de143 WebSocketApi: Finish implementations 2021-12-14 18:22:52 -08:00
tt2468
889062e44b RequestHandler: Reorder BroadcastCustomEvent
Code cleanup stuff
2021-12-13 19:20:27 -08:00
tt2468
fcbe11616d
docs: Overhaul documentation (#863)
More docs-related commits will follow, but this needs to be merged in order to continue with other development.

* Docs: Overhaul docs generator (beginning)

* docs: Rename comments file

* docs: Move comments gitignore

* docs: Initial request documentation

* docs: Improvements to comment processing

* docs: More improvements

* docs: Add enum functionality for protocol.json

* WebSocketServer: Document enums

* RequestHandler: Document RequestStatus enum

* Base: Move ObsWebSocketRequestBatchExecutionType to its own file

Moves it to its own file, renaming it to `RequestBatchExecutionType`.
Changes the RPC to use integer values for selecting execution type
instead of strings.

* docs: Update introduction header

Removes the enum section, and documents RequestBatchExecutionType.

* WebSocketCloseCode: Shuffle a bit

* Base: Use `field` instead of `key` or `parameter` in most places

* RequestStatus: Mild shuffle

It was really bothering me that OutputPaused and OutputNotPaused
had to be separated, so we're breaking it while we're breaking
other stuff.

* docs: Delete old files

They may be added back in some form, but for now I'm getting them
out of the way.

* docs: Add enum identifier value

Forgot to add this before, oops

* docs: Document more enums

* docs: Add basic protocol.md generator

* docs: More work on MD generator

* docs: MD generator should be finished now

* docs: More fixes

* docs: More fixes

* docs: More tweaks + add readme

* docs: Update readme and add inputs docs

* docs: More documentation
2021-12-10 21:38:18 -08:00
tt2468
bc7b8d330a RequestHandler: Move RequestStatus.h to types directory 2021-11-21 03:13:53 -08:00
tt2468
bd6c663775 Base: Add copyright header to source 2021-11-19 17:32:22 -08:00
tt2468
5ab091a40b Base: Move WebSocketServer to its own directory
Just helps with organization
2021-11-18 00:29:28 -08:00
tt2468
4076c0baa9 Requests: Add media input requests 2021-11-17 03:03:14 -08:00
tt2468
08eb2defbc Requests: Add GetMediaInputState 2021-11-17 01:17:40 -08:00
tt2468
0671ded7d1 Requests: Add recording requests 2021-11-17 00:30:17 -08:00
tt2468
9197a48088 Requests: Add SetSceneItemTransform
Yay party
2021-11-12 23:24:39 -08:00
tt2468
45f7661a5d Requests: Add DuplicateSceneItem 2021-11-12 17:31:11 -08:00
tt2468
1b25e98dc2 Revert "Requests: Add Compare"
This reverts commit 3687086ce0a2d0ed88444e51953ecb60ef98aa09.

I realized that I'm adding too much too fast, and that we should
focus on getting v5 out first.
2021-10-05 20:17:45 -07:00
tt2468
3687086ce0 Requests: Add Compare
Non-functional, will have to finish impl later
2021-10-04 17:32:17 -07:00
tt2468
b91ad0f790 Requests: Add GetSceneItemId
I realized that it was not entirely fair to expect users to fetch a
scene's item list, then search the list on the client in order to find
an item ID, so this is a compromise. This will also help developers
move from the 4.x scene item functionality to 5.x's

Operating on scene items by relying on source name can be dangerous
and in some cases exhibit what would be considered undefinied behavior.
Operating on scene items using IDs is best practice.
2021-09-25 17:21:06 -07:00
tt2468
eebcc25115 Requests: Add unpublished RemoveInput
The functionality depends on obs-studio#5276 to be merged and released,
so we can add it but not enable it for now.
2021-09-17 02:42:58 -07:00
tt2468
7e1e1bc33c Base: Large plugin refactor
- Merge WebSocketProtocol into WebSocketServer
  - Having them separated was not doing anything productive
- Request: Move SessionPtr to RequestHandler
  - Less copying to do for batch requests
- Fully modularize EventHandler
  - Make BroadcastEvent a stored callback that WebSocketServer sets
- Return early on high volume events to avoid unnecessary compute
  - These events will only generate a json object when it is actually
needed
2021-09-04 10:04:00 -07:00