Commit Graph

38 Commits

Author SHA1 Message Date
6af3af61d5 requesthandler: Add Outputs requests
Co-authored-by: Ruggero Tomaselli <ruggerotomaselli@gmail.com>
Co-authored-by: tt2468 <tt2468@irltoolkit.com>
2022-07-02 10:31:47 -07:00
ad3cb5dcfd requesthandler, eventhandler: Add outputPath fields when record stops
Closes #934
2022-07-02 07:00:51 -07:00
af97978841 utils: Move from explicit enum converters to nlohmann macros 2022-07-02 05:57:08 -07:00
2e48dd24c4 base: Format code 2022-07-02 05:42:20 -07:00
c355c72f4b requesthandler, utils: Add search offset to GetSceneItemId
Allows you to select a specific match by offset, or select the
last (top) scene item by specifying `-1`.
2022-04-13 02:01:40 -07:00
db2ffa569a Base: Fix some formatting 2022-02-16 13:30:10 -08:00
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
6035294339 requesthandler: Add GetSourceFilter 2022-01-03 13:54:27 -08:00
fe64620731 requesthandler: Add scene item blend mode requests 2021-12-31 18:05:05 -08:00
e43ebde794 Base: Use static_cast in place of reinterpret_cast
static_cast is a much safer cast method
2021-12-30 00:21:29 -08:00
4a2654d095 RequestHandler: Add GetGroupList 2021-12-30 00:12:41 -08:00
e1cb858d2d Utils: Split monitor type util 2021-12-28 22:49:58 -08:00
964e91bbd7 docs: Document ObsMediaInputAction 2021-12-28 18:57:02 -08:00
4d65c2adee Utils: Move GetListPropertyItems to utils 2021-12-28 17:16:41 -08:00
5cbf439f55 Utils: Add GetSceneTransitionByName 2021-12-23 01:07:15 -08:00
2302fdd25f Utils: Fix up transition related utils 2021-12-22 16:27:50 -08:00
f566ccd76b Utils: Add output state util to utils 2021-12-21 01:32:12 -08:00
1e6a60f545 Utils: Rename ListHelper to ArrayHelper 2021-12-21 01:32:12 -08:00
5cd1af426a Utils: Rename DataHelper to ObjectHelper 2021-12-21 01:32:12 -08:00
f66080a031 Utils: Split Obs utils into individual files 2021-12-21 01:32:12 -08:00
a40e79e987 Utils/Obs: Fix build (again) 2021-12-17 15:48:59 -08:00
c4ab69481b Base: Move AutoRelease helpers to utils + build fix
- Moves the AutoRelease helpers to utils/Obs.h
- Fixes build using obsproject/obs-studio/pull/5580
2021-12-17 14:35:19 -08:00
d48ddef031 EventHandler: Implement InputVolumeMeters
This is probably one of the most requested features for obs-websocket.
This currently works by firing an event to all explicit subscribers
with an array of all active audio sources every **60 milliseconds.**

The `inputLevelsMul` field follows this data format:

Base: [Channel, Channel]
Channel: [magnitude (mul), peak (mul), input_peak (mul)]

           *Not Muted*         *Muted*
Example: [[0.3, 0.5, 0.9], [0.0, 0.0, 0.0]]

(input_peak is the actual peak value, before volume adjustment.)

You may notice that the values are only in mul. This is because we are
trying to cut down on bandwidth. dB values can be calculated using this
formula:

`dB = 20.0 * log10(mul)`
2021-11-22 03:37:56 -08:00
bd6c663775 Base: Add copyright header to source 2021-11-19 17:32:22 -08:00
01013c1b27 Base: Fix compile error
I literally could have sworn I remember json::null() being valid, but
I guess not. Oops
2021-11-17 02:58:11 -08:00
0f17d3d6f8 Utils/Obs: Update StringHelper function names
I hated having `String` appended to half of the utils since it was
extra
2021-11-17 01:23:23 -08:00
7403264d42 Requests/Utils: Modify utils naming/usage
A bit too niche to have a util that takes an output and returns a
timecode string. Let's just make it take a duration in milliseconds.
2021-11-17 01:07:04 -08:00
0671ded7d1 Requests: Add recording requests 2021-11-17 00:30:17 -08:00
5faadc12de Utils/Obs: Add scaleX and scaleY plus new util 2021-11-12 23:23:51 -08:00
af52a26e68 Utils: Add ability to specify transform/crop for scene item creation 2021-11-12 17:29:43 -08:00
aa0ba78e46 Base: Use more refcounts
Use refcounts more effectively
2021-09-25 17:52:08 -07:00
4e0b8c5f11 Utils/Obs: Add GetSceneItemByName
Simple, didn't really need to be a util tbh. But I added it anyway
and there's nothing you can do to stop me
2021-09-25 17:21:00 -07:00
3d2fb65357 Utils: Add GetSceneItemTransform 2021-09-03 15:58:34 -07:00
82d8a3d7ce Utils: Add stuff to Obs 2021-09-02 19:28:55 -07:00
8a45560297 Utils: Add GetSceneCount() 2021-09-01 10:43:24 -07:00
0547e1f2da Base: Lots of changes 2021-08-27 04:19:42 -07:00
4d8b80a5a7 Utils: Fix missing header file newlines 2021-08-26 20:33:06 -07:00
43a889c1d4 Utils: Refactor into dedicated components 2021-08-26 19:00:48 -07:00