Skip to content

Commit c29092f

Browse files
Bump OBS websocket protocol to 5.4.0 (#134)
Co-authored-by: cathy-cloud[bot] <154095190+cathy-cloud[bot]@users.noreply.github.com>
1 parent db85c53 commit c29092f

File tree

110 files changed

+1035
-85
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+1035
-85
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
[![Build Status][build-img]][build-url]
66
[![Go Report][goreport-img]][goreport-url]
77

8-
[protocol-img]: https://img.shields.io/badge/obs--websocket-v5.3.5-blue?logo=obs-studio&style=flat-square
9-
[protocol-url]: https://github.com/obsproject/obs-websocket/blob/5.3.5/docs/generated/protocol.md
8+
[protocol-img]: https://img.shields.io/badge/obs--websocket-v5.4.0-blue?logo=obs-studio&style=flat-square
9+
[protocol-url]: https://github.com/obsproject/obs-websocket/blob/5.4.0/docs/generated/protocol.md
1010
[doc-img]: https://img.shields.io/badge/pkg.go.dev-reference-blue?logo=go&logoColor=white&style=flat-square
1111
[doc-url]: https://pkg.go.dev/github.com/andreykaipov/goobs
1212
[build-img]: https://img.shields.io/github/actions/workflow/status/andreykaipov/goobs/ci.yml?logo=github&style=flat-square&branch=main
@@ -66,9 +66,9 @@ The corresponding output:
6666
[//]: # (snippet-2-begin)
6767
```console
6868
go run _examples/basic/main.go
69-
OBS Studio version: 30.0.1
70-
Server protocol version: 5.3.4
71-
Client protocol version: 5.3.5
72-
Client library version: 1.1.5
69+
OBS Studio version: 30.0.2
70+
Server protocol version: 5.4.0
71+
Client protocol version: 5.4.0
72+
Client library version: 1.2.0
7373
```
7474
[//]: # (snippet-2-end)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// This file has been automatically generated. Don't edit it.
2+
3+
package events
4+
5+
/*
6+
Represents the event body for the SourceFilterSettingsChanged event.
7+
8+
An source filter's settings have changed (been updated).
9+
*/
10+
type SourceFilterSettingsChanged struct {
11+
// Name of the filter
12+
FilterName string `json:"filterName,omitempty"`
13+
14+
// New settings object of the filter
15+
FilterSettings map[string]any `json:"filterSettings,omitempty"`
16+
17+
// Name of the source the filter is on
18+
SourceName string `json:"sourceName,omitempty"`
19+
}

api/events/xx_generated.inputs.inputactivestatechanged.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ type InputActiveStateChanged struct {
1313
// Name of the input
1414
InputName string `json:"inputName,omitempty"`
1515

16+
// UUID of the input
17+
InputUuid string `json:"inputUuid,omitempty"`
18+
1619
// Whether the input is active
1720
VideoActive bool `json:"videoActive,omitempty"`
1821
}

api/events/xx_generated.inputs.inputaudiobalancechanged.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ type InputAudioBalanceChanged struct {
1111
// New audio balance value of the input
1212
InputAudioBalance float64 `json:"inputAudioBalance,omitempty"`
1313

14-
// Name of the affected input
14+
// Name of the input
1515
InputName string `json:"inputName,omitempty"`
16+
17+
// UUID of the input
18+
InputUuid string `json:"inputUuid,omitempty"`
1619
}

api/events/xx_generated.inputs.inputaudiomonitortypechanged.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ type InputAudioMonitorTypeChanged struct {
1717
// Name of the input
1818
InputName string `json:"inputName,omitempty"`
1919

20+
// UUID of the input
21+
InputUuid string `json:"inputUuid,omitempty"`
22+
2023
// New monitor type of the input
2124
MonitorType string `json:"monitorType,omitempty"`
2225
}

api/events/xx_generated.inputs.inputaudiosyncoffsetchanged.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ type InputAudioSyncOffsetChanged struct {
1313

1414
// Name of the input
1515
InputName string `json:"inputName,omitempty"`
16+
17+
// UUID of the input
18+
InputUuid string `json:"inputUuid,omitempty"`
1619
}

api/events/xx_generated.inputs.inputaudiotrackschanged.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ type InputAudioTracksChanged struct {
1515

1616
// Name of the input
1717
InputName string `json:"inputName,omitempty"`
18+
19+
// UUID of the input
20+
InputUuid string `json:"inputUuid,omitempty"`
1821
}

api/events/xx_generated.inputs.inputcreated.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ type InputCreated struct {
2020
// The settings configured to the input when it was created
2121
InputSettings map[string]any `json:"inputSettings,omitempty"`
2222

23+
// UUID of the input
24+
InputUuid string `json:"inputUuid,omitempty"`
25+
2326
// The unversioned kind of input (aka no `_v2` stuff)
2427
UnversionedInputKind string `json:"unversionedInputKind,omitempty"`
2528
}

api/events/xx_generated.inputs.inputmutestatechanged.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ type InputMuteStateChanged struct {
1313

1414
// Name of the input
1515
InputName string `json:"inputName,omitempty"`
16+
17+
// UUID of the input
18+
InputUuid string `json:"inputUuid,omitempty"`
1619
}

api/events/xx_generated.inputs.inputnamechanged.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ type InputNameChanged struct {
1111
// New name of the input
1212
InputName string `json:"inputName,omitempty"`
1313

14+
// UUID of the input
15+
InputUuid string `json:"inputUuid,omitempty"`
16+
1417
// Old name of the input
1518
OldInputName string `json:"oldInputName,omitempty"`
1619
}

api/events/xx_generated.inputs.inputremoved.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ An input has been removed.
1010
type InputRemoved struct {
1111
// Name of the input
1212
InputName string `json:"inputName,omitempty"`
13+
14+
// UUID of the input
15+
InputUuid string `json:"inputUuid,omitempty"`
1316
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// This file has been automatically generated. Don't edit it.
2+
3+
package events
4+
5+
/*
6+
Represents the event body for the InputSettingsChanged event.
7+
8+
An input's settings have changed (been updated).
9+
10+
Note: On some inputs, changing values in the properties dialog will cause an immediate update. Pressing the "Cancel" button will revert the settings, resulting in another event being fired.
11+
*/
12+
type InputSettingsChanged struct {
13+
// Name of the input
14+
InputName string `json:"inputName,omitempty"`
15+
16+
// New settings object of the input
17+
InputSettings map[string]any `json:"inputSettings,omitempty"`
18+
19+
// UUID of the input
20+
InputUuid string `json:"inputUuid,omitempty"`
21+
}

api/events/xx_generated.inputs.inputshowstatechanged.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ type InputShowStateChanged struct {
1313
// Name of the input
1414
InputName string `json:"inputName,omitempty"`
1515

16+
// UUID of the input
17+
InputUuid string `json:"inputUuid,omitempty"`
18+
1619
// Whether the input is showing
1720
VideoShowing bool `json:"videoShowing,omitempty"`
1821
}

api/events/xx_generated.inputs.inputvolumechanged.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ type InputVolumeChanged struct {
1111
// Name of the input
1212
InputName string `json:"inputName,omitempty"`
1313

14+
// UUID of the input
15+
InputUuid string `json:"inputUuid,omitempty"`
16+
1417
// New volume level in dB
1518
InputVolumeDb float64 `json:"inputVolumeDb,omitempty"`
1619

api/events/xx_generated.mediainputs.mediainputactiontriggered.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ type MediaInputActionTriggered struct {
1111
// Name of the input
1212
InputName string `json:"inputName,omitempty"`
1313

14+
// UUID of the input
15+
InputUuid string `json:"inputUuid,omitempty"`
16+
1417
// Action performed on the input. See `ObsMediaInputAction` enum
1518
MediaAction string `json:"mediaAction,omitempty"`
1619
}

api/events/xx_generated.mediainputs.mediainputplaybackended.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ A media input has finished playing.
1010
type MediaInputPlaybackEnded struct {
1111
// Name of the input
1212
InputName string `json:"inputName,omitempty"`
13+
14+
// UUID of the input
15+
InputUuid string `json:"inputUuid,omitempty"`
1316
}

api/events/xx_generated.mediainputs.mediainputplaybackstarted.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ A media input has started playing.
1010
type MediaInputPlaybackStarted struct {
1111
// Name of the input
1212
InputName string `json:"inputName,omitempty"`
13+
14+
// UUID of the input
15+
InputUuid string `json:"inputUuid,omitempty"`
1316
}

api/events/xx_generated.sceneitems.sceneitemcreated.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ type SceneItemCreated struct {
1717
// Name of the scene the item was added to
1818
SceneName string `json:"sceneName,omitempty"`
1919

20+
// UUID of the scene the item was added to
21+
SceneUuid string `json:"sceneUuid,omitempty"`
22+
2023
// Name of the underlying source (input/scene)
2124
SourceName string `json:"sourceName,omitempty"`
25+
26+
// UUID of the underlying source (input/scene)
27+
SourceUuid string `json:"sourceUuid,omitempty"`
2228
}

api/events/xx_generated.sceneitems.sceneitemenablestatechanged.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ type SceneItemEnableStateChanged struct {
1616

1717
// Name of the scene the item is in
1818
SceneName string `json:"sceneName,omitempty"`
19+
20+
// UUID of the scene the item is in
21+
SceneUuid string `json:"sceneUuid,omitempty"`
1922
}

api/events/xx_generated.sceneitems.sceneitemlistreindexed.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ type SceneItemListReindexed struct {
1515

1616
// Name of the scene
1717
SceneName string `json:"sceneName,omitempty"`
18+
19+
// UUID of the scene
20+
SceneUuid string `json:"sceneUuid,omitempty"`
1821
}

api/events/xx_generated.sceneitems.sceneitemlockstatechanged.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ type SceneItemLockStateChanged struct {
1616

1717
// Name of the scene the item is in
1818
SceneName string `json:"sceneName,omitempty"`
19+
20+
// UUID of the scene the item is in
21+
SceneUuid string `json:"sceneUuid,omitempty"`
1922
}

api/events/xx_generated.sceneitems.sceneitemremoved.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ type SceneItemRemoved struct {
1616
// Name of the scene the item was removed from
1717
SceneName string `json:"sceneName,omitempty"`
1818

19+
// UUID of the scene the item was removed from
20+
SceneUuid string `json:"sceneUuid,omitempty"`
21+
1922
// Name of the underlying source (input/scene)
2023
SourceName string `json:"sourceName,omitempty"`
24+
25+
// UUID of the underlying source (input/scene)
26+
SourceUuid string `json:"sourceUuid,omitempty"`
2127
}

api/events/xx_generated.sceneitems.sceneitemselected.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ type SceneItemSelected struct {
1313

1414
// Name of the scene the item is in
1515
SceneName string `json:"sceneName,omitempty"`
16+
17+
// UUID of the scene the item is in
18+
SceneUuid string `json:"sceneUuid,omitempty"`
1619
}

api/events/xx_generated.sceneitems.sceneitemtransformchanged.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@ type SceneItemTransformChanged struct {
1818

1919
// The name of the scene the item is in
2020
SceneName string `json:"sceneName,omitempty"`
21+
22+
// The UUID of the scene the item is in
23+
SceneUuid string `json:"sceneUuid,omitempty"`
2124
}

api/events/xx_generated.scenes.currentpreviewscenechanged.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ The current preview scene has changed.
1010
type CurrentPreviewSceneChanged struct {
1111
// Name of the scene that was switched to
1212
SceneName string `json:"sceneName,omitempty"`
13+
14+
// UUID of the scene that was switched to
15+
SceneUuid string `json:"sceneUuid,omitempty"`
1316
}

api/events/xx_generated.scenes.currentprogramscenechanged.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ The current program scene has changed.
1010
type CurrentProgramSceneChanged struct {
1111
// Name of the scene that was switched to
1212
SceneName string `json:"sceneName,omitempty"`
13+
14+
// UUID of the scene that was switched to
15+
SceneUuid string `json:"sceneUuid,omitempty"`
1316
}

api/events/xx_generated.scenes.scenecreated.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ type SceneCreated struct {
1313

1414
// Name of the new scene
1515
SceneName string `json:"sceneName,omitempty"`
16+
17+
// UUID of the new scene
18+
SceneUuid string `json:"sceneUuid,omitempty"`
1619
}

api/events/xx_generated.scenes.scenenamechanged.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ type SceneNameChanged struct {
1313

1414
// New name of the scene
1515
SceneName string `json:"sceneName,omitempty"`
16+
17+
// UUID of the scene
18+
SceneUuid string `json:"sceneUuid,omitempty"`
1619
}

api/events/xx_generated.scenes.sceneremoved.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ type SceneRemoved struct {
1313

1414
// Name of the removed scene
1515
SceneName string `json:"sceneName,omitempty"`
16+
17+
// UUID of the removed scene
18+
SceneUuid string `json:"sceneUuid,omitempty"`
1619
}

api/events/xx_generated.transitions.currentscenetransitionchanged.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ The current scene transition has changed.
1010
type CurrentSceneTransitionChanged struct {
1111
// Name of the new transition
1212
TransitionName string `json:"transitionName,omitempty"`
13+
14+
// UUID of the new transition
15+
TransitionUuid string `json:"transitionUuid,omitempty"`
1316
}

api/events/xx_generated.transitions.scenetransitionended.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ Note: Does not appear to trigger when the transition is interrupted by the user.
1212
type SceneTransitionEnded struct {
1313
// Scene transition name
1414
TransitionName string `json:"transitionName,omitempty"`
15+
16+
// Scene transition UUID
17+
TransitionUuid string `json:"transitionUuid,omitempty"`
1518
}

api/events/xx_generated.transitions.scenetransitionstarted.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ A scene transition has started.
1010
type SceneTransitionStarted struct {
1111
// Scene transition name
1212
TransitionName string `json:"transitionName,omitempty"`
13+
14+
// Scene transition UUID
15+
TransitionUuid string `json:"transitionUuid,omitempty"`
1316
}

api/events/xx_generated.transitions.scenetransitionvideoended.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ Note: Appears to be called by every transition, regardless of relevance.
1515
type SceneTransitionVideoEnded struct {
1616
// Scene transition name
1717
TransitionName string `json:"transitionName,omitempty"`
18+
19+
// Scene transition UUID
20+
TransitionUuid string `json:"transitionUuid,omitempty"`
1821
}

api/events/zz_generated.events.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ func GetType(name string) any {
2424
return &SourceFilterRemoved{}
2525
case "SourceFilterNameChanged":
2626
return &SourceFilterNameChanged{}
27+
case "SourceFilterSettingsChanged":
28+
return &SourceFilterSettingsChanged{}
2729
case "SourceFilterEnableStateChanged":
2830
return &SourceFilterEnableStateChanged{}
2931
case "ExitStarted":
@@ -34,6 +36,8 @@ func GetType(name string) any {
3436
return &InputRemoved{}
3537
case "InputNameChanged":
3638
return &InputNameChanged{}
39+
case "InputSettingsChanged":
40+
return &InputSettingsChanged{}
3741
case "InputActiveStateChanged":
3842
return &InputActiveStateChanged{}
3943
case "InputShowStateChanged":

api/requests/filters/xx_generated.createsourcefilter.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ type CreateSourceFilterParams struct {
1515

1616
// Name of the source to add the filter to
1717
SourceName *string `json:"sourceName,omitempty"`
18+
19+
// UUID of the source to add the filter to
20+
SourceUuid *string `json:"sourceUuid,omitempty"`
1821
}
1922

2023
func NewCreateSourceFilterParams() *CreateSourceFilterParams {
@@ -36,6 +39,10 @@ func (o *CreateSourceFilterParams) WithSourceName(x string) *CreateSourceFilterP
3639
o.SourceName = &x
3740
return o
3841
}
42+
func (o *CreateSourceFilterParams) WithSourceUuid(x string) *CreateSourceFilterParams {
43+
o.SourceUuid = &x
44+
return o
45+
}
3946

4047
// Returns the associated request.
4148
func (o *CreateSourceFilterParams) GetRequestName() string {

api/requests/filters/xx_generated.getsourcefilter.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ type GetSourceFilterParams struct {
99

1010
// Name of the source
1111
SourceName *string `json:"sourceName,omitempty"`
12+
13+
// UUID of the source
14+
SourceUuid *string `json:"sourceUuid,omitempty"`
1215
}
1316

1417
func NewGetSourceFilterParams() *GetSourceFilterParams {
@@ -22,6 +25,10 @@ func (o *GetSourceFilterParams) WithSourceName(x string) *GetSourceFilterParams
2225
o.SourceName = &x
2326
return o
2427
}
28+
func (o *GetSourceFilterParams) WithSourceUuid(x string) *GetSourceFilterParams {
29+
o.SourceUuid = &x
30+
return o
31+
}
2532

2633
// Returns the associated request.
2734
func (o *GetSourceFilterParams) GetRequestName() string {

0 commit comments

Comments
 (0)