noobs 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COPYING +339 -0
- package/README.md +46 -0
- package/bin/64bit/obs.lib +0 -0
- package/binding.gyp +23 -0
- package/dist/bin/Qt6Core.dll +0 -0
- package/dist/bin/Qt6Gui.dll +0 -0
- package/dist/bin/Qt6Network.dll +0 -0
- package/dist/bin/Qt6Svg.dll +0 -0
- package/dist/bin/Qt6Widgets.dll +0 -0
- package/dist/bin/Qt6Xml.dll +0 -0
- package/dist/bin/avcodec-61.dll +0 -0
- package/dist/bin/avdevice-61.dll +0 -0
- package/dist/bin/avfilter-10.dll +0 -0
- package/dist/bin/avformat-61.dll +0 -0
- package/dist/bin/avutil-59.dll +0 -0
- package/dist/bin/datachannel.dll +0 -0
- package/dist/bin/libcurl.dll +0 -0
- package/dist/bin/libobs-d3d11.dll +0 -0
- package/dist/bin/libobs-opengl.dll +0 -0
- package/dist/bin/libobs-winrt.dll +0 -0
- package/dist/bin/librist.dll +0 -0
- package/dist/bin/libx264-164.dll +0 -0
- package/dist/bin/lua51.dll +0 -0
- package/dist/bin/obs-amf-test.exe +0 -0
- package/dist/bin/obs-ffmpeg-mux.exe +0 -0
- package/dist/bin/obs-frontend-api.dll +0 -0
- package/dist/bin/obs-scripting.dll +0 -0
- package/dist/bin/obs.dll +0 -0
- package/dist/bin/srt.dll +0 -0
- package/dist/bin/swresample-5.dll +0 -0
- package/dist/bin/swscale-8.dll +0 -0
- package/dist/bin/w32-pthreads.dll +0 -0
- package/dist/bin/zlib.dll +0 -0
- package/dist/effects/area.effect +250 -0
- package/dist/effects/bicubic_scale.effect +236 -0
- package/dist/effects/bilinear_lowres_scale.effect +123 -0
- package/dist/effects/color.effect +172 -0
- package/dist/effects/default.effect +254 -0
- package/dist/effects/default_rect.effect +84 -0
- package/dist/effects/deinterlace_base.effect +325 -0
- package/dist/effects/deinterlace_blend.effect +21 -0
- package/dist/effects/deinterlace_blend_2x.effect +21 -0
- package/dist/effects/deinterlace_discard.effect +21 -0
- package/dist/effects/deinterlace_discard_2x.effect +21 -0
- package/dist/effects/deinterlace_linear.effect +21 -0
- package/dist/effects/deinterlace_linear_2x.effect +21 -0
- package/dist/effects/deinterlace_yadif.effect +21 -0
- package/dist/effects/deinterlace_yadif_2x.effect +21 -0
- package/dist/effects/format_conversion.effect +1823 -0
- package/dist/effects/lanczos_scale.effect +292 -0
- package/dist/effects/opaque.effect +159 -0
- package/dist/effects/premultiplied_alpha.effect +38 -0
- package/dist/effects/repeat.effect +36 -0
- package/dist/effects/solid.effect +80 -0
- package/dist/noobs.node +0 -0
- package/dist/plugins/obs-ffmpeg.dll +0 -0
- package/dist/plugins/obs-x264.dll +0 -0
- package/dist/plugins/win-capture.dll +0 -0
- package/include/audio-monitoring/osx/mac-helpers.h +13 -0
- package/include/audio-monitoring/pulse/pulseaudio-wrapper.h +212 -0
- package/include/audio-monitoring/win32/wasapi-output.h +22 -0
- package/include/callback/calldata.h +195 -0
- package/include/callback/decl.h +61 -0
- package/include/callback/proc.h +52 -0
- package/include/callback/signal.h +73 -0
- package/include/graphics/axisang.h +65 -0
- package/include/graphics/bounds.h +108 -0
- package/include/graphics/device-exports.h +177 -0
- package/include/graphics/effect-parser.h +290 -0
- package/include/graphics/effect.h +190 -0
- package/include/graphics/graphics-internal.h +335 -0
- package/include/graphics/graphics.h +1024 -0
- package/include/graphics/half.h +100 -0
- package/include/graphics/image-file.h +124 -0
- package/include/graphics/input.h +34 -0
- package/include/graphics/libnsgif/libnsgif.h +142 -0
- package/include/graphics/math-defs.h +45 -0
- package/include/graphics/math-extra.h +61 -0
- package/include/graphics/matrix3.h +98 -0
- package/include/graphics/matrix4.h +102 -0
- package/include/graphics/plane.h +85 -0
- package/include/graphics/quat.h +170 -0
- package/include/graphics/shader-parser.h +273 -0
- package/include/graphics/srgb.h +177 -0
- package/include/graphics/vec2.h +148 -0
- package/include/graphics/vec3.h +224 -0
- package/include/graphics/vec4.h +241 -0
- package/include/media-io/audio-io.h +228 -0
- package/include/media-io/audio-math.h +43 -0
- package/include/media-io/audio-resampler.h +44 -0
- package/include/media-io/format-conversion.h +50 -0
- package/include/media-io/frame-rate.h +29 -0
- package/include/media-io/media-io-defs.h +20 -0
- package/include/media-io/media-remux.h +37 -0
- package/include/media-io/video-frame.h +64 -0
- package/include/media-io/video-io.h +338 -0
- package/include/media-io/video-scaler.h +43 -0
- package/include/obs-audio-controls.h +250 -0
- package/include/obs-av1.h +47 -0
- package/include/obs-avc.h +55 -0
- package/include/obs-config.h +52 -0
- package/include/obs-data.h +311 -0
- package/include/obs-defs.h +52 -0
- package/include/obs-encoder.h +361 -0
- package/include/obs-ffmpeg-compat.h +13 -0
- package/include/obs-hevc.h +81 -0
- package/include/obs-hotkey.h +271 -0
- package/include/obs-hotkeys.h +653 -0
- package/include/obs-interaction.h +56 -0
- package/include/obs-internal.h +1459 -0
- package/include/obs-missing-files.h +53 -0
- package/include/obs-module.h +181 -0
- package/include/obs-nal.h +37 -0
- package/include/obs-nix-platform.h +53 -0
- package/include/obs-nix-wayland.h +24 -0
- package/include/obs-nix-x11.h +22 -0
- package/include/obs-nix.h +42 -0
- package/include/obs-output.h +96 -0
- package/include/obs-properties.h +364 -0
- package/include/obs-scene.h +127 -0
- package/include/obs-service.h +115 -0
- package/include/obs-source.h +568 -0
- package/include/obs.h +2608 -0
- package/include/obsconfig.h +13 -0
- package/include/obsversion.h +5 -0
- package/include/util/apple/cfstring-utils.h +16 -0
- package/include/util/array-serializer.h +37 -0
- package/include/util/base.h +97 -0
- package/include/util/bitstream.h +28 -0
- package/include/util/bmem.h +94 -0
- package/include/util/buffered-file-serializer.h +32 -0
- package/include/util/c99defs.h +75 -0
- package/include/util/cf-lexer.h +199 -0
- package/include/util/cf-parser.h +281 -0
- package/include/util/circlebuf.h +319 -0
- package/include/util/config-file.h +103 -0
- package/include/util/crc32.h +29 -0
- package/include/util/curl/curl-helper.h +35 -0
- package/include/util/darray.h +606 -0
- package/include/util/deque.h +319 -0
- package/include/util/dstr.h +320 -0
- package/include/util/file-serializer.h +34 -0
- package/include/util/lexer.h +273 -0
- package/include/util/pipe.h +52 -0
- package/include/util/platform.h +223 -0
- package/include/util/profiler.h +97 -0
- package/include/util/serializer.h +158 -0
- package/include/util/simde/check.h +285 -0
- package/include/util/simde/debug-trap.h +117 -0
- package/include/util/simde/hedley.h +2123 -0
- package/include/util/simde/simde-align.h +481 -0
- package/include/util/simde/simde-arch.h +537 -0
- package/include/util/simde/simde-common.h +918 -0
- package/include/util/simde/simde-constify.h +925 -0
- package/include/util/simde/simde-detect-clang.h +114 -0
- package/include/util/simde/simde-diagnostic.h +447 -0
- package/include/util/simde/simde-features.h +550 -0
- package/include/util/simde/simde-math.h +1858 -0
- package/include/util/simde/x86/mmx.h +2456 -0
- package/include/util/simde/x86/sse.h +4479 -0
- package/include/util/simde/x86/sse2.h +7549 -0
- package/include/util/source-profiler.h +66 -0
- package/include/util/sse-intrin.h +32 -0
- package/include/util/task.h +22 -0
- package/include/util/text-lookup.h +45 -0
- package/include/util/threading-posix.h +77 -0
- package/include/util/threading-windows.h +142 -0
- package/include/util/threading.h +103 -0
- package/include/util/utf8.h +35 -0
- package/include/util/uthash.h +34 -0
- package/include/util/util_uint128.h +108 -0
- package/include/util/util_uint64.h +34 -0
- package/include/util/windows/device-enum.h +14 -0
- package/include/util/windows/obfuscate.h +16 -0
- package/include/util/windows/win-registry.h +37 -0
- package/include/util/windows/win-version.h +57 -0
- package/include/util/windows/window-helpers.h +47 -0
- package/index.d.ts +38 -0
- package/index.js +8 -0
- package/package.json +31 -0
- package/src/main.cpp +321 -0
- package/src/obs_interface.cpp +605 -0
- package/src/obs_interface.h +74 -0
- package/src/utils.cpp +80 -0
- package/src/utils.h +3 -0
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
Copyright (C) 2023 by Lain Bailey <lain@obsproject.com>
|
|
3
|
+
|
|
4
|
+
This program is free software: you can redistribute it and/or modify
|
|
5
|
+
it under the terms of the GNU General Public License as published by
|
|
6
|
+
the Free Software Foundation, either version 2 of the License, or
|
|
7
|
+
(at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU General Public License
|
|
15
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
******************************************************************************/
|
|
17
|
+
|
|
18
|
+
#pragma once
|
|
19
|
+
|
|
20
|
+
#include "util/c99defs.h"
|
|
21
|
+
#include "obs-data.h"
|
|
22
|
+
#include "media-io/frame-rate.h"
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @file
|
|
26
|
+
* @brief libobs header for the properties system used in libobs
|
|
27
|
+
*
|
|
28
|
+
* @page properties Properties
|
|
29
|
+
* @brief Platform and Toolkit independent settings implementation
|
|
30
|
+
*
|
|
31
|
+
* @section prop_overview_sec Overview
|
|
32
|
+
*
|
|
33
|
+
* libobs uses a property system which lets for example sources specify
|
|
34
|
+
* settings that can be displayed to the user by the UI.
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
#ifdef __cplusplus
|
|
39
|
+
extern "C" {
|
|
40
|
+
#endif
|
|
41
|
+
|
|
42
|
+
/** Only update when the user presses OK or Apply */
|
|
43
|
+
#define OBS_PROPERTIES_DEFER_UPDATE (1 << 0)
|
|
44
|
+
|
|
45
|
+
enum obs_property_type {
|
|
46
|
+
OBS_PROPERTY_INVALID,
|
|
47
|
+
OBS_PROPERTY_BOOL,
|
|
48
|
+
OBS_PROPERTY_INT,
|
|
49
|
+
OBS_PROPERTY_FLOAT,
|
|
50
|
+
OBS_PROPERTY_TEXT,
|
|
51
|
+
OBS_PROPERTY_PATH,
|
|
52
|
+
OBS_PROPERTY_LIST,
|
|
53
|
+
OBS_PROPERTY_COLOR,
|
|
54
|
+
OBS_PROPERTY_BUTTON,
|
|
55
|
+
OBS_PROPERTY_FONT,
|
|
56
|
+
OBS_PROPERTY_EDITABLE_LIST,
|
|
57
|
+
OBS_PROPERTY_FRAME_RATE,
|
|
58
|
+
OBS_PROPERTY_GROUP,
|
|
59
|
+
OBS_PROPERTY_COLOR_ALPHA,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
enum obs_combo_format {
|
|
63
|
+
OBS_COMBO_FORMAT_INVALID,
|
|
64
|
+
OBS_COMBO_FORMAT_INT,
|
|
65
|
+
OBS_COMBO_FORMAT_FLOAT,
|
|
66
|
+
OBS_COMBO_FORMAT_STRING,
|
|
67
|
+
OBS_COMBO_FORMAT_BOOL,
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
enum obs_combo_type {
|
|
71
|
+
OBS_COMBO_TYPE_INVALID,
|
|
72
|
+
OBS_COMBO_TYPE_EDITABLE,
|
|
73
|
+
OBS_COMBO_TYPE_LIST,
|
|
74
|
+
OBS_COMBO_TYPE_RADIO,
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
enum obs_editable_list_type {
|
|
78
|
+
OBS_EDITABLE_LIST_TYPE_STRINGS,
|
|
79
|
+
OBS_EDITABLE_LIST_TYPE_FILES,
|
|
80
|
+
OBS_EDITABLE_LIST_TYPE_FILES_AND_URLS,
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
enum obs_path_type {
|
|
84
|
+
OBS_PATH_FILE,
|
|
85
|
+
OBS_PATH_FILE_SAVE,
|
|
86
|
+
OBS_PATH_DIRECTORY,
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
enum obs_text_type {
|
|
90
|
+
OBS_TEXT_DEFAULT,
|
|
91
|
+
OBS_TEXT_PASSWORD,
|
|
92
|
+
OBS_TEXT_MULTILINE,
|
|
93
|
+
OBS_TEXT_INFO,
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
enum obs_text_info_type {
|
|
97
|
+
OBS_TEXT_INFO_NORMAL,
|
|
98
|
+
OBS_TEXT_INFO_WARNING,
|
|
99
|
+
OBS_TEXT_INFO_ERROR,
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
enum obs_number_type {
|
|
103
|
+
OBS_NUMBER_SCROLLER,
|
|
104
|
+
OBS_NUMBER_SLIDER,
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
enum obs_group_type {
|
|
108
|
+
OBS_COMBO_INVALID,
|
|
109
|
+
OBS_GROUP_NORMAL,
|
|
110
|
+
OBS_GROUP_CHECKABLE,
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
enum obs_button_type {
|
|
114
|
+
OBS_BUTTON_DEFAULT,
|
|
115
|
+
OBS_BUTTON_URL,
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
#define OBS_FONT_BOLD (1 << 0)
|
|
119
|
+
#define OBS_FONT_ITALIC (1 << 1)
|
|
120
|
+
#define OBS_FONT_UNDERLINE (1 << 2)
|
|
121
|
+
#define OBS_FONT_STRIKEOUT (1 << 3)
|
|
122
|
+
|
|
123
|
+
struct obs_properties;
|
|
124
|
+
struct obs_property;
|
|
125
|
+
typedef struct obs_properties obs_properties_t;
|
|
126
|
+
typedef struct obs_property obs_property_t;
|
|
127
|
+
|
|
128
|
+
/* ------------------------------------------------------------------------- */
|
|
129
|
+
|
|
130
|
+
EXPORT obs_properties_t *obs_properties_create(void);
|
|
131
|
+
EXPORT obs_properties_t *obs_properties_create_param(void *param, void (*destroy)(void *param));
|
|
132
|
+
EXPORT void obs_properties_destroy(obs_properties_t *props);
|
|
133
|
+
|
|
134
|
+
EXPORT void obs_properties_set_flags(obs_properties_t *props, uint32_t flags);
|
|
135
|
+
EXPORT uint32_t obs_properties_get_flags(obs_properties_t *props);
|
|
136
|
+
|
|
137
|
+
EXPORT void obs_properties_set_param(obs_properties_t *props, void *param, void (*destroy)(void *param));
|
|
138
|
+
EXPORT void *obs_properties_get_param(obs_properties_t *props);
|
|
139
|
+
|
|
140
|
+
EXPORT obs_property_t *obs_properties_first(obs_properties_t *props);
|
|
141
|
+
|
|
142
|
+
EXPORT obs_property_t *obs_properties_get(obs_properties_t *props, const char *property);
|
|
143
|
+
|
|
144
|
+
EXPORT obs_properties_t *obs_properties_get_parent(obs_properties_t *props);
|
|
145
|
+
|
|
146
|
+
/** Remove a property from a properties list.
|
|
147
|
+
*
|
|
148
|
+
* Removes a property from a properties list. Only valid in either
|
|
149
|
+
* get_properties or modified_callback(2). modified_callback(2) must return
|
|
150
|
+
* true so that all UI properties are rebuilt and returning false is undefined
|
|
151
|
+
* behavior.
|
|
152
|
+
*
|
|
153
|
+
* @param props Properties to remove from.
|
|
154
|
+
* @param property Name of the property to remove.
|
|
155
|
+
*/
|
|
156
|
+
EXPORT void obs_properties_remove_by_name(obs_properties_t *props, const char *property);
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Applies settings to the properties by calling all the necessary
|
|
160
|
+
* modification callbacks
|
|
161
|
+
*/
|
|
162
|
+
EXPORT void obs_properties_apply_settings(obs_properties_t *props, obs_data_t *settings);
|
|
163
|
+
|
|
164
|
+
/* ------------------------------------------------------------------------- */
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Callback for when a button property is clicked. If the properties
|
|
168
|
+
* need to be refreshed due to changes to the property layout, return true,
|
|
169
|
+
* otherwise return false.
|
|
170
|
+
*/
|
|
171
|
+
typedef bool (*obs_property_clicked_t)(obs_properties_t *props, obs_property_t *property, void *data);
|
|
172
|
+
|
|
173
|
+
EXPORT obs_property_t *obs_properties_add_bool(obs_properties_t *props, const char *name, const char *description);
|
|
174
|
+
|
|
175
|
+
EXPORT obs_property_t *obs_properties_add_int(obs_properties_t *props, const char *name, const char *description,
|
|
176
|
+
int min, int max, int step);
|
|
177
|
+
|
|
178
|
+
EXPORT obs_property_t *obs_properties_add_float(obs_properties_t *props, const char *name, const char *description,
|
|
179
|
+
double min, double max, double step);
|
|
180
|
+
|
|
181
|
+
EXPORT obs_property_t *obs_properties_add_int_slider(obs_properties_t *props, const char *name, const char *description,
|
|
182
|
+
int min, int max, int step);
|
|
183
|
+
|
|
184
|
+
EXPORT obs_property_t *obs_properties_add_float_slider(obs_properties_t *props, const char *name,
|
|
185
|
+
const char *description, double min, double max, double step);
|
|
186
|
+
|
|
187
|
+
EXPORT obs_property_t *obs_properties_add_text(obs_properties_t *props, const char *name, const char *description,
|
|
188
|
+
enum obs_text_type type);
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Adds a 'path' property. Can be a directory or a file.
|
|
192
|
+
*
|
|
193
|
+
* If target is a file path, the filters should be this format, separated by
|
|
194
|
+
* double semicolons, and extensions separated by space:
|
|
195
|
+
* "Example types 1 and 2 (*.ex1 *.ex2);;Example type 3 (*.ex3)"
|
|
196
|
+
*
|
|
197
|
+
* @param props Properties object
|
|
198
|
+
* @param name Settings name
|
|
199
|
+
* @param description Description (display name) of the property
|
|
200
|
+
* @param type Type of path (directory or file)
|
|
201
|
+
* @param filter If type is a file path, then describes the file filter
|
|
202
|
+
* that the user can browse. Items are separated via
|
|
203
|
+
* double semicolons. If multiple file types in a
|
|
204
|
+
* filter, separate with space.
|
|
205
|
+
*/
|
|
206
|
+
EXPORT obs_property_t *obs_properties_add_path(obs_properties_t *props, const char *name, const char *description,
|
|
207
|
+
enum obs_path_type type, const char *filter, const char *default_path);
|
|
208
|
+
|
|
209
|
+
EXPORT obs_property_t *obs_properties_add_list(obs_properties_t *props, const char *name, const char *description,
|
|
210
|
+
enum obs_combo_type type, enum obs_combo_format format);
|
|
211
|
+
|
|
212
|
+
EXPORT obs_property_t *obs_properties_add_color(obs_properties_t *props, const char *name, const char *description);
|
|
213
|
+
|
|
214
|
+
EXPORT obs_property_t *obs_properties_add_color_alpha(obs_properties_t *props, const char *name,
|
|
215
|
+
const char *description);
|
|
216
|
+
|
|
217
|
+
EXPORT obs_property_t *obs_properties_add_button(obs_properties_t *props, const char *name, const char *text,
|
|
218
|
+
obs_property_clicked_t callback);
|
|
219
|
+
|
|
220
|
+
EXPORT obs_property_t *obs_properties_add_button2(obs_properties_t *props, const char *name, const char *text,
|
|
221
|
+
obs_property_clicked_t callback, void *priv);
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Adds a font selection property.
|
|
225
|
+
*
|
|
226
|
+
* A font is an obs_data sub-object which contains the following items:
|
|
227
|
+
* face: face name string
|
|
228
|
+
* style: style name string
|
|
229
|
+
* size: size integer
|
|
230
|
+
* flags: font flags integer (OBS_FONT_* defined above)
|
|
231
|
+
*/
|
|
232
|
+
EXPORT obs_property_t *obs_properties_add_font(obs_properties_t *props, const char *name, const char *description);
|
|
233
|
+
|
|
234
|
+
EXPORT obs_property_t *obs_properties_add_editable_list(obs_properties_t *props, const char *name,
|
|
235
|
+
const char *description, enum obs_editable_list_type type,
|
|
236
|
+
const char *filter, const char *default_path);
|
|
237
|
+
|
|
238
|
+
EXPORT obs_property_t *obs_properties_add_frame_rate(obs_properties_t *props, const char *name,
|
|
239
|
+
const char *description);
|
|
240
|
+
|
|
241
|
+
EXPORT obs_property_t *obs_properties_add_group(obs_properties_t *props, const char *name, const char *description,
|
|
242
|
+
enum obs_group_type type, obs_properties_t *group);
|
|
243
|
+
|
|
244
|
+
/* ------------------------------------------------------------------------- */
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Optional callback for when a property is modified. If the properties
|
|
248
|
+
* need to be refreshed due to changes to the property layout, return true,
|
|
249
|
+
* otherwise return false.
|
|
250
|
+
*/
|
|
251
|
+
typedef bool (*obs_property_modified_t)(obs_properties_t *props, obs_property_t *property, obs_data_t *settings);
|
|
252
|
+
typedef bool (*obs_property_modified2_t)(void *priv, obs_properties_t *props, obs_property_t *property,
|
|
253
|
+
obs_data_t *settings);
|
|
254
|
+
|
|
255
|
+
EXPORT void obs_property_set_modified_callback(obs_property_t *p, obs_property_modified_t modified);
|
|
256
|
+
EXPORT void obs_property_set_modified_callback2(obs_property_t *p, obs_property_modified2_t modified, void *priv);
|
|
257
|
+
|
|
258
|
+
EXPORT bool obs_property_modified(obs_property_t *p, obs_data_t *settings);
|
|
259
|
+
EXPORT bool obs_property_button_clicked(obs_property_t *p, void *obj);
|
|
260
|
+
|
|
261
|
+
EXPORT void obs_property_set_visible(obs_property_t *p, bool visible);
|
|
262
|
+
EXPORT void obs_property_set_enabled(obs_property_t *p, bool enabled);
|
|
263
|
+
|
|
264
|
+
EXPORT void obs_property_set_description(obs_property_t *p, const char *description);
|
|
265
|
+
EXPORT void obs_property_set_long_description(obs_property_t *p, const char *long_description);
|
|
266
|
+
|
|
267
|
+
EXPORT const char *obs_property_name(obs_property_t *p);
|
|
268
|
+
EXPORT const char *obs_property_description(obs_property_t *p);
|
|
269
|
+
EXPORT const char *obs_property_long_description(obs_property_t *p);
|
|
270
|
+
EXPORT enum obs_property_type obs_property_get_type(obs_property_t *p);
|
|
271
|
+
EXPORT bool obs_property_enabled(obs_property_t *p);
|
|
272
|
+
EXPORT bool obs_property_visible(obs_property_t *p);
|
|
273
|
+
|
|
274
|
+
EXPORT bool obs_property_next(obs_property_t **p);
|
|
275
|
+
|
|
276
|
+
EXPORT int obs_property_int_min(obs_property_t *p);
|
|
277
|
+
EXPORT int obs_property_int_max(obs_property_t *p);
|
|
278
|
+
EXPORT int obs_property_int_step(obs_property_t *p);
|
|
279
|
+
EXPORT enum obs_number_type obs_property_int_type(obs_property_t *p);
|
|
280
|
+
EXPORT const char *obs_property_int_suffix(obs_property_t *p);
|
|
281
|
+
EXPORT double obs_property_float_min(obs_property_t *p);
|
|
282
|
+
EXPORT double obs_property_float_max(obs_property_t *p);
|
|
283
|
+
EXPORT double obs_property_float_step(obs_property_t *p);
|
|
284
|
+
EXPORT enum obs_number_type obs_property_float_type(obs_property_t *p);
|
|
285
|
+
EXPORT const char *obs_property_float_suffix(obs_property_t *p);
|
|
286
|
+
EXPORT enum obs_text_type obs_property_text_type(obs_property_t *p);
|
|
287
|
+
EXPORT bool obs_property_text_monospace(obs_property_t *p);
|
|
288
|
+
EXPORT enum obs_text_info_type obs_property_text_info_type(obs_property_t *p);
|
|
289
|
+
EXPORT bool obs_property_text_info_word_wrap(obs_property_t *p);
|
|
290
|
+
EXPORT enum obs_path_type obs_property_path_type(obs_property_t *p);
|
|
291
|
+
EXPORT const char *obs_property_path_filter(obs_property_t *p);
|
|
292
|
+
EXPORT const char *obs_property_path_default_path(obs_property_t *p);
|
|
293
|
+
EXPORT enum obs_combo_type obs_property_list_type(obs_property_t *p);
|
|
294
|
+
EXPORT enum obs_combo_format obs_property_list_format(obs_property_t *p);
|
|
295
|
+
|
|
296
|
+
EXPORT void obs_property_int_set_limits(obs_property_t *p, int min, int max, int step);
|
|
297
|
+
EXPORT void obs_property_float_set_limits(obs_property_t *p, double min, double max, double step);
|
|
298
|
+
EXPORT void obs_property_int_set_suffix(obs_property_t *p, const char *suffix);
|
|
299
|
+
EXPORT void obs_property_float_set_suffix(obs_property_t *p, const char *suffix);
|
|
300
|
+
EXPORT void obs_property_text_set_monospace(obs_property_t *p, bool monospace);
|
|
301
|
+
EXPORT void obs_property_text_set_info_type(obs_property_t *p, enum obs_text_info_type type);
|
|
302
|
+
EXPORT void obs_property_text_set_info_word_wrap(obs_property_t *p, bool word_wrap);
|
|
303
|
+
|
|
304
|
+
EXPORT void obs_property_button_set_type(obs_property_t *p, enum obs_button_type type);
|
|
305
|
+
EXPORT void obs_property_button_set_url(obs_property_t *p, char *url);
|
|
306
|
+
|
|
307
|
+
EXPORT void obs_property_list_clear(obs_property_t *p);
|
|
308
|
+
|
|
309
|
+
EXPORT size_t obs_property_list_add_string(obs_property_t *p, const char *name, const char *val);
|
|
310
|
+
EXPORT size_t obs_property_list_add_int(obs_property_t *p, const char *name, long long val);
|
|
311
|
+
EXPORT size_t obs_property_list_add_float(obs_property_t *p, const char *name, double val);
|
|
312
|
+
EXPORT size_t obs_property_list_add_bool(obs_property_t *p, const char *name, bool val);
|
|
313
|
+
|
|
314
|
+
EXPORT void obs_property_list_insert_string(obs_property_t *p, size_t idx, const char *name, const char *val);
|
|
315
|
+
EXPORT void obs_property_list_insert_int(obs_property_t *p, size_t idx, const char *name, long long val);
|
|
316
|
+
EXPORT void obs_property_list_insert_float(obs_property_t *p, size_t idx, const char *name, double val);
|
|
317
|
+
EXPORT void obs_property_list_insert_bool(obs_property_t *p, size_t idx, const char *name, bool val);
|
|
318
|
+
|
|
319
|
+
EXPORT void obs_property_list_item_disable(obs_property_t *p, size_t idx, bool disabled);
|
|
320
|
+
EXPORT bool obs_property_list_item_disabled(obs_property_t *p, size_t idx);
|
|
321
|
+
|
|
322
|
+
EXPORT void obs_property_list_item_remove(obs_property_t *p, size_t idx);
|
|
323
|
+
|
|
324
|
+
EXPORT size_t obs_property_list_item_count(obs_property_t *p);
|
|
325
|
+
EXPORT const char *obs_property_list_item_name(obs_property_t *p, size_t idx);
|
|
326
|
+
EXPORT const char *obs_property_list_item_string(obs_property_t *p, size_t idx);
|
|
327
|
+
EXPORT long long obs_property_list_item_int(obs_property_t *p, size_t idx);
|
|
328
|
+
EXPORT double obs_property_list_item_float(obs_property_t *p, size_t idx);
|
|
329
|
+
EXPORT bool obs_property_list_item_bool(obs_property_t *p, size_t idx);
|
|
330
|
+
|
|
331
|
+
EXPORT enum obs_editable_list_type obs_property_editable_list_type(obs_property_t *p);
|
|
332
|
+
EXPORT const char *obs_property_editable_list_filter(obs_property_t *p);
|
|
333
|
+
EXPORT const char *obs_property_editable_list_default_path(obs_property_t *p);
|
|
334
|
+
|
|
335
|
+
EXPORT void obs_property_frame_rate_clear(obs_property_t *p);
|
|
336
|
+
EXPORT void obs_property_frame_rate_options_clear(obs_property_t *p);
|
|
337
|
+
EXPORT void obs_property_frame_rate_fps_ranges_clear(obs_property_t *p);
|
|
338
|
+
|
|
339
|
+
EXPORT size_t obs_property_frame_rate_option_add(obs_property_t *p, const char *name, const char *description);
|
|
340
|
+
EXPORT size_t obs_property_frame_rate_fps_range_add(obs_property_t *p, struct media_frames_per_second min,
|
|
341
|
+
struct media_frames_per_second max);
|
|
342
|
+
|
|
343
|
+
EXPORT void obs_property_frame_rate_option_insert(obs_property_t *p, size_t idx, const char *name,
|
|
344
|
+
const char *description);
|
|
345
|
+
EXPORT void obs_property_frame_rate_fps_range_insert(obs_property_t *p, size_t idx, struct media_frames_per_second min,
|
|
346
|
+
struct media_frames_per_second max);
|
|
347
|
+
|
|
348
|
+
EXPORT size_t obs_property_frame_rate_options_count(obs_property_t *p);
|
|
349
|
+
EXPORT const char *obs_property_frame_rate_option_name(obs_property_t *p, size_t idx);
|
|
350
|
+
EXPORT const char *obs_property_frame_rate_option_description(obs_property_t *p, size_t idx);
|
|
351
|
+
|
|
352
|
+
EXPORT size_t obs_property_frame_rate_fps_ranges_count(obs_property_t *p);
|
|
353
|
+
EXPORT struct media_frames_per_second obs_property_frame_rate_fps_range_min(obs_property_t *p, size_t idx);
|
|
354
|
+
EXPORT struct media_frames_per_second obs_property_frame_rate_fps_range_max(obs_property_t *p, size_t idx);
|
|
355
|
+
|
|
356
|
+
EXPORT enum obs_group_type obs_property_group_type(obs_property_t *p);
|
|
357
|
+
EXPORT obs_properties_t *obs_property_group_content(obs_property_t *p);
|
|
358
|
+
|
|
359
|
+
EXPORT enum obs_button_type obs_property_button_type(obs_property_t *p);
|
|
360
|
+
EXPORT const char *obs_property_button_url(obs_property_t *p);
|
|
361
|
+
|
|
362
|
+
#ifdef __cplusplus
|
|
363
|
+
}
|
|
364
|
+
#endif
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
Copyright (C) 2023 by Lain Bailey <lain@obsproject.com>
|
|
3
|
+
|
|
4
|
+
This program is free software: you can redistribute it and/or modify
|
|
5
|
+
it under the terms of the GNU General Public License as published by
|
|
6
|
+
the Free Software Foundation, either version 2 of the License, or
|
|
7
|
+
(at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU General Public License
|
|
15
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
******************************************************************************/
|
|
17
|
+
|
|
18
|
+
#pragma once
|
|
19
|
+
|
|
20
|
+
#include "obs.h"
|
|
21
|
+
#include "graphics/matrix4.h"
|
|
22
|
+
|
|
23
|
+
/* how obs scene! */
|
|
24
|
+
|
|
25
|
+
struct item_action {
|
|
26
|
+
bool visible;
|
|
27
|
+
uint64_t timestamp;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
struct obs_scene_item {
|
|
31
|
+
volatile long ref;
|
|
32
|
+
volatile bool removed;
|
|
33
|
+
|
|
34
|
+
bool is_group;
|
|
35
|
+
bool is_scene;
|
|
36
|
+
bool update_transform;
|
|
37
|
+
bool update_group_resize;
|
|
38
|
+
|
|
39
|
+
int64_t id;
|
|
40
|
+
|
|
41
|
+
struct obs_scene *parent;
|
|
42
|
+
struct obs_source *source;
|
|
43
|
+
volatile long active_refs;
|
|
44
|
+
volatile long defer_update;
|
|
45
|
+
volatile long defer_group_resize;
|
|
46
|
+
bool user_visible;
|
|
47
|
+
bool visible;
|
|
48
|
+
bool selected;
|
|
49
|
+
bool locked;
|
|
50
|
+
|
|
51
|
+
gs_texrender_t *item_render;
|
|
52
|
+
struct obs_sceneitem_crop crop;
|
|
53
|
+
|
|
54
|
+
bool absolute_coordinates;
|
|
55
|
+
struct vec2 pos;
|
|
56
|
+
struct vec2 scale;
|
|
57
|
+
struct vec2 scale_ref;
|
|
58
|
+
float rot;
|
|
59
|
+
uint32_t align;
|
|
60
|
+
|
|
61
|
+
/* last width/height of the source, this is used to check whether
|
|
62
|
+
* the transform needs updating */
|
|
63
|
+
uint32_t last_width;
|
|
64
|
+
uint32_t last_height;
|
|
65
|
+
|
|
66
|
+
struct vec2 output_scale;
|
|
67
|
+
enum obs_scale_type scale_filter;
|
|
68
|
+
|
|
69
|
+
enum obs_blending_method blend_method;
|
|
70
|
+
enum obs_blending_type blend_type;
|
|
71
|
+
|
|
72
|
+
struct matrix4 box_transform;
|
|
73
|
+
struct vec2 box_scale;
|
|
74
|
+
struct matrix4 draw_transform;
|
|
75
|
+
|
|
76
|
+
enum obs_bounds_type bounds_type;
|
|
77
|
+
uint32_t bounds_align;
|
|
78
|
+
struct vec2 bounds;
|
|
79
|
+
bool crop_to_bounds;
|
|
80
|
+
struct obs_sceneitem_crop bounds_crop;
|
|
81
|
+
|
|
82
|
+
obs_hotkey_pair_id toggle_visibility;
|
|
83
|
+
|
|
84
|
+
obs_data_t *private_settings;
|
|
85
|
+
|
|
86
|
+
pthread_mutex_t actions_mutex;
|
|
87
|
+
DARRAY(struct item_action) audio_actions;
|
|
88
|
+
|
|
89
|
+
struct obs_source *show_transition;
|
|
90
|
+
struct obs_source *hide_transition;
|
|
91
|
+
uint32_t show_transition_duration;
|
|
92
|
+
uint32_t hide_transition_duration;
|
|
93
|
+
|
|
94
|
+
/* would do **prev_next, but not really great for reordering */
|
|
95
|
+
struct obs_scene_item *prev;
|
|
96
|
+
struct obs_scene_item *next;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
struct scene_source_mix {
|
|
100
|
+
obs_source_t *source;
|
|
101
|
+
obs_source_t *transition;
|
|
102
|
+
size_t pos;
|
|
103
|
+
size_t count;
|
|
104
|
+
bool apply_buf;
|
|
105
|
+
float buf[AUDIO_OUTPUT_FRAMES];
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
struct obs_scene {
|
|
109
|
+
struct obs_source *source;
|
|
110
|
+
|
|
111
|
+
bool is_group;
|
|
112
|
+
bool custom_size;
|
|
113
|
+
uint32_t cx;
|
|
114
|
+
uint32_t cy;
|
|
115
|
+
|
|
116
|
+
bool absolute_coordinates;
|
|
117
|
+
uint32_t last_width;
|
|
118
|
+
uint32_t last_height;
|
|
119
|
+
|
|
120
|
+
int64_t id_counter;
|
|
121
|
+
|
|
122
|
+
pthread_mutex_t video_mutex;
|
|
123
|
+
pthread_mutex_t audio_mutex;
|
|
124
|
+
struct obs_scene_item *first_item;
|
|
125
|
+
|
|
126
|
+
DARRAY(struct scene_source_mix) mix_sources;
|
|
127
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
Copyright (C) 2023 by Lain Bailey <lain@obsproject.com>
|
|
3
|
+
|
|
4
|
+
This program is free software: you can redistribute it and/or modify
|
|
5
|
+
it under the terms of the GNU General Public License as published by
|
|
6
|
+
the Free Software Foundation, either version 2 of the License, or
|
|
7
|
+
(at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU General Public License
|
|
15
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
******************************************************************************/
|
|
17
|
+
|
|
18
|
+
#pragma once
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @file
|
|
22
|
+
* @brief header for modules implementing services.
|
|
23
|
+
*
|
|
24
|
+
* Services are modules that implement provider specific settings for outputs.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
#ifdef __cplusplus
|
|
28
|
+
extern "C" {
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
struct obs_service_resolution {
|
|
32
|
+
int cx;
|
|
33
|
+
int cy;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/* NOTE: Odd numbers are reserved for custom info from third-party protocols */
|
|
37
|
+
enum obs_service_connect_info {
|
|
38
|
+
OBS_SERVICE_CONNECT_INFO_SERVER_URL = 0,
|
|
39
|
+
OBS_SERVICE_CONNECT_INFO_STREAM_ID = 2,
|
|
40
|
+
OBS_SERVICE_CONNECT_INFO_STREAM_KEY = 2, // Alias of OBS_SERVICE_CONNECT_INFO_STREAM_ID
|
|
41
|
+
OBS_SERVICE_CONNECT_INFO_USERNAME = 4,
|
|
42
|
+
OBS_SERVICE_CONNECT_INFO_PASSWORD = 6,
|
|
43
|
+
OBS_SERVICE_CONNECT_INFO_ENCRYPT_PASSPHRASE = 8,
|
|
44
|
+
OBS_SERVICE_CONNECT_INFO_BEARER_TOKEN = 10,
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
struct obs_service_info {
|
|
48
|
+
/* required */
|
|
49
|
+
const char *id;
|
|
50
|
+
|
|
51
|
+
const char *(*get_name)(void *type_data);
|
|
52
|
+
void *(*create)(obs_data_t *settings, obs_service_t *service);
|
|
53
|
+
void (*destroy)(void *data);
|
|
54
|
+
|
|
55
|
+
/* optional */
|
|
56
|
+
void (*activate)(void *data, obs_data_t *settings);
|
|
57
|
+
void (*deactivate)(void *data);
|
|
58
|
+
|
|
59
|
+
void (*update)(void *data, obs_data_t *settings);
|
|
60
|
+
|
|
61
|
+
void (*get_defaults)(obs_data_t *settings);
|
|
62
|
+
|
|
63
|
+
obs_properties_t *(*get_properties)(void *data);
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Called when getting ready to start up an output, before the encoders
|
|
67
|
+
* and output are initialized
|
|
68
|
+
*
|
|
69
|
+
* @param data Internal service data
|
|
70
|
+
* @param output Output context
|
|
71
|
+
* @return true to allow the output to start up,
|
|
72
|
+
* false to prevent output from starting up
|
|
73
|
+
*/
|
|
74
|
+
bool (*initialize)(void *data, obs_output_t *output);
|
|
75
|
+
|
|
76
|
+
const char *(*get_url)(void *data);
|
|
77
|
+
const char *(*get_key)(void *data);
|
|
78
|
+
|
|
79
|
+
const char *(*get_username)(void *data);
|
|
80
|
+
const char *(*get_password)(void *data);
|
|
81
|
+
|
|
82
|
+
bool (*deprecated_1)();
|
|
83
|
+
|
|
84
|
+
void (*apply_encoder_settings)(void *data, obs_data_t *video_encoder_settings,
|
|
85
|
+
obs_data_t *audio_encoder_settings);
|
|
86
|
+
|
|
87
|
+
void *type_data;
|
|
88
|
+
void (*free_type_data)(void *type_data);
|
|
89
|
+
|
|
90
|
+
/* TODO: Rename to 'get_preferred_output_type' once a API/ABI break happen */
|
|
91
|
+
const char *(*get_output_type)(void *data);
|
|
92
|
+
|
|
93
|
+
void (*get_supported_resolutions)(void *data, struct obs_service_resolution **resolutions, size_t *count);
|
|
94
|
+
void (*get_max_fps)(void *data, int *fps);
|
|
95
|
+
|
|
96
|
+
void (*get_max_bitrate)(void *data, int *video_bitrate, int *audio_bitrate);
|
|
97
|
+
|
|
98
|
+
const char **(*get_supported_video_codecs)(void *data);
|
|
99
|
+
|
|
100
|
+
const char *(*get_protocol)(void *data);
|
|
101
|
+
|
|
102
|
+
const char **(*get_supported_audio_codecs)(void *data);
|
|
103
|
+
|
|
104
|
+
const char *(*get_connect_info)(void *data, uint32_t type);
|
|
105
|
+
|
|
106
|
+
bool (*can_try_to_connect)(void *data);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
EXPORT void obs_register_service_s(const struct obs_service_info *info, size_t size);
|
|
110
|
+
|
|
111
|
+
#define obs_register_service(info) obs_register_service_s(info, sizeof(struct obs_service_info))
|
|
112
|
+
|
|
113
|
+
#ifdef __cplusplus
|
|
114
|
+
}
|
|
115
|
+
#endif
|