This repository has been archived by the owner on Jan 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
events_sources.go
344 lines (325 loc) · 10.3 KB
/
events_sources.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
package obsws
// This file is automatically generated.
// https://github.com/christopher-dG/go-obs-websocket/blob/master/codegen/protocol.py
// SourceCreatedEvent : A source has been created
// A source can be an input, a scene or a transition.
//
// Since obs-websocket version: 4.6.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sourcecreated
type SourceCreatedEvent struct {
// Source name.
// Required: Yes.
SourceName string `json:"sourceName"`
// Source type.
// Can be "input", "scene", "transition" or "filter".
// Required: Yes.
SourceType string `json:"sourceType"`
// Source kind.
// Required: Yes.
SourceKind string `json:"sourceKind"`
// Source settings.
// Required: Yes.
SourceSettings map[string]interface{} `json:"sourceSettings"`
_event `json:",squash"`
}
// SourceDestroyedEvent : A source has been destroyed/removed
// A source can be an input, a scene or a transition.
//
// Since obs-websocket version: 4.6.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sourcedestroyed
type SourceDestroyedEvent struct {
// Source name.
// Required: Yes.
SourceName string `json:"sourceName"`
// Source type.
// Can be "input", "scene", "transition" or "filter".
// Required: Yes.
SourceType string `json:"sourceType"`
// Source kind.
// Required: Yes.
SourceKind string `json:"sourceKind"`
_event `json:",squash"`
}
// SourceVolumeChangedEvent : The volume of a source has changed.
//
// Since obs-websocket version: 4.6.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sourcevolumechanged
type SourceVolumeChangedEvent struct {
// Source name.
// Required: Yes.
SourceName string `json:"sourceName"`
// Source volume.
// Required: Yes.
Volume float64 `json:"volume"`
_event `json:",squash"`
}
// SourceMuteStateChangedEvent : A source has been muted or unmuted.
//
// Since obs-websocket version: 4.6.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sourcemutestatechanged
type SourceMuteStateChangedEvent struct {
// Source name.
// Required: Yes.
SourceName string `json:"sourceName"`
// Mute status of the source.
// Required: Yes.
Muted bool `json:"muted"`
_event `json:",squash"`
}
// SourceAudioSyncOffsetChangedEvent : The audio sync offset of a source has changed.
//
// Since obs-websocket version: 4.6.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sourceaudiosyncoffsetchanged
type SourceAudioSyncOffsetChangedEvent struct {
// Source name.
// Required: Yes.
SourceName string `json:"sourceName"`
// Audio sync offset of the source (in nanoseconds).
// Required: Yes.
SyncOffset int `json:"syncOffset"`
_event `json:",squash"`
}
// SourceAudioMixersChangedEvent : Audio mixer routing changed on a source.
//
// Since obs-websocket version: 4.6.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sourceaudiomixerschanged
type SourceAudioMixersChangedEvent struct {
// Source name.
// Required: Yes.
SourceName string `json:"sourceName"`
// Routing status of the source for each audio mixer (array of 6 values).
// Required: Yes.
Mixers []map[string]interface{} `json:"mixers"`
// Mixer number.
// Required: Yes.
MixersID int `json:"mixers.*.id"`
// Routing status.
// Required: Yes.
MixersEnabled bool `json:"mixers.*.enabled"`
// Raw mixer flags (little-endian, one bit per mixer) as an hexadecimal value.
// Required: Yes.
HexMixersValue string `json:"hexMixersValue"`
_event `json:",squash"`
}
// SourceRenamedEvent : A source has been renamed.
//
// Since obs-websocket version: 4.6.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sourcerenamed
type SourceRenamedEvent struct {
// Previous source name.
// Required: Yes.
PreviousName string `json:"previousName"`
// New source name.
// Required: Yes.
NewName string `json:"newName"`
_event `json:",squash"`
}
// SourceFilterAddedEvent : A filter was added to a source.
//
// Since obs-websocket version: 4.6.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sourcefilteradded
type SourceFilterAddedEvent struct {
// Source name.
// Required: Yes.
SourceName string `json:"sourceName"`
// Filter name.
// Required: Yes.
FilterName string `json:"filterName"`
// Filter type.
// Required: Yes.
FilterType string `json:"filterType"`
// Filter settings.
// Required: Yes.
FilterSettings map[string]interface{} `json:"filterSettings"`
_event `json:",squash"`
}
// SourceFilterRemovedEvent : A filter was removed from a source.
//
// Since obs-websocket version: 4.6.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sourcefilterremoved
type SourceFilterRemovedEvent struct {
// Source name.
// Required: Yes.
SourceName string `json:"sourceName"`
// Filter name.
// Required: Yes.
FilterName string `json:"filterName"`
// Filter type.
// Required: Yes.
FilterType string `json:"filterType"`
_event `json:",squash"`
}
// SourceFilterVisibilityChangedEvent : The visibility/enabled state of a filter changed.
//
// Since obs-websocket version: 4.7.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sourcefiltervisibilitychanged
type SourceFilterVisibilityChangedEvent struct {
// Source name.
// Required: Yes.
SourceName string `json:"sourceName"`
// Filter name.
// Required: Yes.
FilterName string `json:"filterName"`
// New filter state.
// Required: Yes.
FilterEnabled bool `json:"filterEnabled"`
_event `json:",squash"`
}
// SourceFiltersReorderedEvent : Filters in a source have been reordered.
//
// Since obs-websocket version: 4.6.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sourcefiltersreordered
type SourceFiltersReorderedEvent struct {
// Source name.
// Required: Yes.
SourceName string `json:"sourceName"`
// Ordered Filters list.
// Required: Yes.
Filters []map[string]interface{} `json:"filters"`
// Filter name.
// Required: Yes.
FiltersName string `json:"filters.*.name"`
// Filter type.
// Required: Yes.
FiltersType string `json:"filters.*.type"`
_event `json:",squash"`
}
// SourceOrderChangedEvent : Scene items have been reordered.
//
// Since obs-websocket version: 4.0.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sourceorderchanged
type SourceOrderChangedEvent struct {
// Name of the scene where items have been reordered.
// Required: Yes.
SceneName string `json:"scene-name"`
// Ordered list of scene items.
// Required: Yes.
SceneItems []map[string]interface{} `json:"scene-items"`
// Item source name.
// Required: Yes.
SceneItemsSourceName string `json:"scene-items.*.source-name"`
// Scene item unique ID.
// Required: Yes.
SceneItemsItemID int `json:"scene-items.*.item-id"`
_event `json:",squash"`
}
// SceneItemAddedEvent : An item has been added to the current scene.
//
// Since obs-websocket version: 4.0.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sceneitemadded
type SceneItemAddedEvent struct {
// Name of the scene.
// Required: Yes.
SceneName string `json:"scene-name"`
// Name of the item added to the scene.
// Required: Yes.
ItemName string `json:"item-name"`
// Scene item ID.
// Required: Yes.
ItemID int `json:"item-id"`
_event `json:",squash"`
}
// SceneItemRemovedEvent : An item has been removed from the current scene.
//
// Since obs-websocket version: 4.0.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sceneitemremoved
type SceneItemRemovedEvent struct {
// Name of the scene.
// Required: Yes.
SceneName string `json:"scene-name"`
// Name of the item removed from the scene.
// Required: Yes.
ItemName string `json:"item-name"`
// Scene item ID.
// Required: Yes.
ItemID int `json:"item-id"`
_event `json:",squash"`
}
// SceneItemVisibilityChangedEvent : An item's visibility has been toggled.
//
// Since obs-websocket version: 4.0.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sceneitemvisibilitychanged
type SceneItemVisibilityChangedEvent struct {
// Name of the scene.
// Required: Yes.
SceneName string `json:"scene-name"`
// Name of the item in the scene.
// Required: Yes.
ItemName string `json:"item-name"`
// Scene item ID.
// Required: Yes.
ItemID int `json:"item-id"`
// New visibility state of the item.
// Required: Yes.
ItemVisible bool `json:"item-visible"`
_event `json:",squash"`
}
// SceneItemTransformChangedEvent : An item's transform has been changed.
//
// Since obs-websocket version: 4.6.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sceneitemtransformchanged
type SceneItemTransformChangedEvent struct {
// Name of the scene.
// Required: Yes.
SceneName string `json:"scene-name"`
// Name of the item in the scene.
// Required: Yes.
ItemName string `json:"item-name"`
// Scene item ID.
// Required: Yes.
ItemID int `json:"item-id"`
// Scene item transform properties.
// Required: Yes.
Transform *SceneItemTransform `json:"transform"`
_event `json:",squash"`
}
// SceneItemSelectedEvent : A scene item is selected.
//
// Since obs-websocket version: 4.6.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sceneitemselected
type SceneItemSelectedEvent struct {
// Name of the scene.
// Required: Yes.
SceneName string `json:"scene-name"`
// Name of the item in the scene.
// Required: Yes.
ItemName string `json:"item-name"`
// Name of the item in the scene.
// Required: Yes.
ItemID int `json:"item-id"`
_event `json:",squash"`
}
// SceneItemDeselectedEvent : A scene item is deselected.
//
// Since obs-websocket version: 4.6.0.
//
// https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#sceneitemdeselected
type SceneItemDeselectedEvent struct {
// Name of the scene.
// Required: Yes.
SceneName string `json:"scene-name"`
// Name of the item in the scene.
// Required: Yes.
ItemName string `json:"item-name"`
// Name of the item in the scene.
// Required: Yes.
ItemID int `json:"item-id"`
_event `json:",squash"`
}