Skip to content

Commit fd56278

Browse files
Bump OBS websocket protocol to 5.6.0
1 parent 73d444a commit fd56278

9 files changed

+280
-7
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.5.6-blue?logo=obs-studio&style=flat-square
9-
[protocol-url]: https://github.com/obsproject/obs-websocket/blob/5.5.6/docs/generated/protocol.md
8+
[protocol-img]: https://img.shields.io/badge/obs--websocket-v5.6.0-blue?logo=obs-studio&style=flat-square
9+
[protocol-url]: https://github.com/obsproject/obs-websocket/blob/5.6.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: 31.0.1
70-
Server protocol version: 5.5.4
71-
Client protocol version: 5.5.6
72-
Client library version: 1.5.6
69+
OBS Studio version: 31.1.0
70+
Server protocol version: 5.5.3
71+
Client protocol version: 5.6.0
72+
Client library version: 1.6.0
7373
```
7474
[//]: # (snippet-2-end)

api/events/xx_generated.inputs.inputcreated.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ type InputCreated struct {
1414
// The kind of the input
1515
InputKind string `json:"inputKind,omitempty"`
1616

17+
// Bitflag value for the caps that an input supports. See obs_source_info.output_flags in the libobs docs
18+
InputKindCaps float64 `json:"inputKindCaps,omitempty"`
19+
1720
// Name of the input
1821
InputName string `json:"inputName,omitempty"`
1922

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// This file has been automatically generated. Don't edit it.
2+
3+
package inputs
4+
5+
// Represents the request body for the GetInputDeinterlaceFieldOrder request.
6+
type GetInputDeinterlaceFieldOrderParams struct {
7+
// Name of the input
8+
InputName *string `json:"inputName,omitempty"`
9+
10+
// UUID of the input
11+
InputUuid *string `json:"inputUuid,omitempty"`
12+
}
13+
14+
func NewGetInputDeinterlaceFieldOrderParams() *GetInputDeinterlaceFieldOrderParams {
15+
return &GetInputDeinterlaceFieldOrderParams{}
16+
}
17+
func (o *GetInputDeinterlaceFieldOrderParams) WithInputName(x string) *GetInputDeinterlaceFieldOrderParams {
18+
o.InputName = &x
19+
return o
20+
}
21+
func (o *GetInputDeinterlaceFieldOrderParams) WithInputUuid(x string) *GetInputDeinterlaceFieldOrderParams {
22+
o.InputUuid = &x
23+
return o
24+
}
25+
26+
// Returns the associated request.
27+
func (o *GetInputDeinterlaceFieldOrderParams) GetRequestName() string {
28+
return "GetInputDeinterlaceFieldOrder"
29+
}
30+
31+
// Represents the response body for the GetInputDeinterlaceFieldOrder request.
32+
type GetInputDeinterlaceFieldOrderResponse struct {
33+
_response
34+
35+
// Deinterlace field order of the input
36+
InputDeinterlaceFieldOrder string `json:"inputDeinterlaceFieldOrder,omitempty"`
37+
}
38+
39+
/*
40+
Gets the deinterlace field order of an input.
41+
42+
Deinterlace Field Orders:
43+
44+
- `OBS_DEINTERLACE_FIELD_ORDER_TOP`
45+
- `OBS_DEINTERLACE_FIELD_ORDER_BOTTOM`
46+
47+
Note: Deinterlacing functionality is restricted to async inputs only.
48+
*/
49+
func (c *Client) GetInputDeinterlaceFieldOrder(
50+
paramss ...*GetInputDeinterlaceFieldOrderParams,
51+
) (*GetInputDeinterlaceFieldOrderResponse, error) {
52+
if len(paramss) == 0 {
53+
paramss = []*GetInputDeinterlaceFieldOrderParams{{}}
54+
}
55+
params := paramss[0]
56+
data := &GetInputDeinterlaceFieldOrderResponse{}
57+
return data, c.client.SendRequest(params, data)
58+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// This file has been automatically generated. Don't edit it.
2+
3+
package inputs
4+
5+
// Represents the request body for the GetInputDeinterlaceMode request.
6+
type GetInputDeinterlaceModeParams struct {
7+
// Name of the input
8+
InputName *string `json:"inputName,omitempty"`
9+
10+
// UUID of the input
11+
InputUuid *string `json:"inputUuid,omitempty"`
12+
}
13+
14+
func NewGetInputDeinterlaceModeParams() *GetInputDeinterlaceModeParams {
15+
return &GetInputDeinterlaceModeParams{}
16+
}
17+
func (o *GetInputDeinterlaceModeParams) WithInputName(x string) *GetInputDeinterlaceModeParams {
18+
o.InputName = &x
19+
return o
20+
}
21+
func (o *GetInputDeinterlaceModeParams) WithInputUuid(x string) *GetInputDeinterlaceModeParams {
22+
o.InputUuid = &x
23+
return o
24+
}
25+
26+
// Returns the associated request.
27+
func (o *GetInputDeinterlaceModeParams) GetRequestName() string {
28+
return "GetInputDeinterlaceMode"
29+
}
30+
31+
// Represents the response body for the GetInputDeinterlaceMode request.
32+
type GetInputDeinterlaceModeResponse struct {
33+
_response
34+
35+
// Deinterlace mode of the input
36+
InputDeinterlaceMode string `json:"inputDeinterlaceMode,omitempty"`
37+
}
38+
39+
/*
40+
Gets the deinterlace mode of an input.
41+
42+
Deinterlace Modes:
43+
44+
- `OBS_DEINTERLACE_MODE_DISABLE`
45+
- `OBS_DEINTERLACE_MODE_DISCARD`
46+
- `OBS_DEINTERLACE_MODE_RETRO`
47+
- `OBS_DEINTERLACE_MODE_BLEND`
48+
- `OBS_DEINTERLACE_MODE_BLEND_2X`
49+
- `OBS_DEINTERLACE_MODE_LINEAR`
50+
- `OBS_DEINTERLACE_MODE_LINEAR_2X`
51+
- `OBS_DEINTERLACE_MODE_YADIF`
52+
- `OBS_DEINTERLACE_MODE_YADIF_2X`
53+
54+
Note: Deinterlacing functionality is restricted to async inputs only.
55+
*/
56+
func (c *Client) GetInputDeinterlaceMode(
57+
paramss ...*GetInputDeinterlaceModeParams,
58+
) (*GetInputDeinterlaceModeResponse, error) {
59+
if len(paramss) == 0 {
60+
paramss = []*GetInputDeinterlaceModeParams{{}}
61+
}
62+
params := paramss[0]
63+
data := &GetInputDeinterlaceModeResponse{}
64+
return data, c.client.SendRequest(params, data)
65+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// This file has been automatically generated. Don't edit it.
2+
3+
package inputs
4+
5+
// Represents the request body for the SetInputDeinterlaceFieldOrder request.
6+
type SetInputDeinterlaceFieldOrderParams struct {
7+
// Deinterlace field order for the input
8+
InputDeinterlaceFieldOrder *string `json:"inputDeinterlaceFieldOrder,omitempty"`
9+
10+
// Name of the input
11+
InputName *string `json:"inputName,omitempty"`
12+
13+
// UUID of the input
14+
InputUuid *string `json:"inputUuid,omitempty"`
15+
}
16+
17+
func NewSetInputDeinterlaceFieldOrderParams() *SetInputDeinterlaceFieldOrderParams {
18+
return &SetInputDeinterlaceFieldOrderParams{}
19+
}
20+
21+
func (o *SetInputDeinterlaceFieldOrderParams) WithInputDeinterlaceFieldOrder(
22+
x string,
23+
) *SetInputDeinterlaceFieldOrderParams {
24+
o.InputDeinterlaceFieldOrder = &x
25+
return o
26+
}
27+
func (o *SetInputDeinterlaceFieldOrderParams) WithInputName(x string) *SetInputDeinterlaceFieldOrderParams {
28+
o.InputName = &x
29+
return o
30+
}
31+
func (o *SetInputDeinterlaceFieldOrderParams) WithInputUuid(x string) *SetInputDeinterlaceFieldOrderParams {
32+
o.InputUuid = &x
33+
return o
34+
}
35+
36+
// Returns the associated request.
37+
func (o *SetInputDeinterlaceFieldOrderParams) GetRequestName() string {
38+
return "SetInputDeinterlaceFieldOrder"
39+
}
40+
41+
// Represents the response body for the SetInputDeinterlaceFieldOrder request.
42+
type SetInputDeinterlaceFieldOrderResponse struct {
43+
_response
44+
}
45+
46+
/*
47+
Sets the deinterlace field order of an input.
48+
49+
Note: Deinterlacing functionality is restricted to async inputs only.
50+
*/
51+
func (c *Client) SetInputDeinterlaceFieldOrder(
52+
params *SetInputDeinterlaceFieldOrderParams,
53+
) (*SetInputDeinterlaceFieldOrderResponse, error) {
54+
data := &SetInputDeinterlaceFieldOrderResponse{}
55+
return data, c.client.SendRequest(params, data)
56+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// This file has been automatically generated. Don't edit it.
2+
3+
package inputs
4+
5+
// Represents the request body for the SetInputDeinterlaceMode request.
6+
type SetInputDeinterlaceModeParams struct {
7+
// Deinterlace mode for the input
8+
InputDeinterlaceMode *string `json:"inputDeinterlaceMode,omitempty"`
9+
10+
// Name of the input
11+
InputName *string `json:"inputName,omitempty"`
12+
13+
// UUID of the input
14+
InputUuid *string `json:"inputUuid,omitempty"`
15+
}
16+
17+
func NewSetInputDeinterlaceModeParams() *SetInputDeinterlaceModeParams {
18+
return &SetInputDeinterlaceModeParams{}
19+
}
20+
func (o *SetInputDeinterlaceModeParams) WithInputDeinterlaceMode(x string) *SetInputDeinterlaceModeParams {
21+
o.InputDeinterlaceMode = &x
22+
return o
23+
}
24+
func (o *SetInputDeinterlaceModeParams) WithInputName(x string) *SetInputDeinterlaceModeParams {
25+
o.InputName = &x
26+
return o
27+
}
28+
func (o *SetInputDeinterlaceModeParams) WithInputUuid(x string) *SetInputDeinterlaceModeParams {
29+
o.InputUuid = &x
30+
return o
31+
}
32+
33+
// Returns the associated request.
34+
func (o *SetInputDeinterlaceModeParams) GetRequestName() string {
35+
return "SetInputDeinterlaceMode"
36+
}
37+
38+
// Represents the response body for the SetInputDeinterlaceMode request.
39+
type SetInputDeinterlaceModeResponse struct {
40+
_response
41+
}
42+
43+
/*
44+
Sets the deinterlace mode of an input.
45+
46+
Note: Deinterlacing functionality is restricted to async inputs only.
47+
*/
48+
func (c *Client) SetInputDeinterlaceMode(
49+
params *SetInputDeinterlaceModeParams,
50+
) (*SetInputDeinterlaceModeResponse, error) {
51+
data := &SetInputDeinterlaceModeResponse{}
52+
return data, c.client.SendRequest(params, data)
53+
}

docs/request-mapping.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ The following tables show how to make the appropriate `goobs` request for any gi
6464
| GetInputAudioSyncOffset | `client.Inputs.GetInputAudioSyncOffset(...)` |
6565
| GetInputAudioTracks | `client.Inputs.GetInputAudioTracks(...)` |
6666
| GetInputDefaultSettings | `client.Inputs.GetInputDefaultSettings(...)` |
67+
| GetInputDeinterlaceFieldOrder | `client.Inputs.GetInputDeinterlaceFieldOrder(...)` |
68+
| GetInputDeinterlaceMode | `client.Inputs.GetInputDeinterlaceMode(...)` |
6769
| GetInputKindList | `client.Inputs.GetInputKindList(...)` |
6870
| GetInputList | `client.Inputs.GetInputList(...)` |
6971
| GetInputMute | `client.Inputs.GetInputMute(...)` |
@@ -77,6 +79,8 @@ The following tables show how to make the appropriate `goobs` request for any gi
7779
| SetInputAudioMonitorType | `client.Inputs.SetInputAudioMonitorType(...)` |
7880
| SetInputAudioSyncOffset | `client.Inputs.SetInputAudioSyncOffset(...)` |
7981
| SetInputAudioTracks | `client.Inputs.SetInputAudioTracks(...)` |
82+
| SetInputDeinterlaceFieldOrder | `client.Inputs.SetInputDeinterlaceFieldOrder(...)` |
83+
| SetInputDeinterlaceMode | `client.Inputs.SetInputDeinterlaceMode(...)` |
8084
| SetInputMute | `client.Inputs.SetInputMute(...)` |
8185
| SetInputName | `client.Inputs.SetInputName(...)` |
8286
| SetInputSettings | `client.Inputs.SetInputSettings(...)` |

version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
const lib = "github.com/andreykaipov/goobs"
99

10-
var ProtocolVersion = "5.5.6"
10+
var ProtocolVersion = "5.6.0"
1111

1212
var LibraryVersion = func() string {
1313
bi, ok := debug.ReadBuildInfo()

zz_generated._test.go

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,22 @@ func Test_inputs(t *testing.T) {
384384
t.Logf("%s", err)
385385
}
386386
assert.NoError(t, err)
387+
_, err = client.Inputs.GetInputDeinterlaceFieldOrder(&inputs.GetInputDeinterlaceFieldOrderParams{
388+
InputName: &[]string{"test2"}[0],
389+
InputUuid: &[]string{"test2"}[0],
390+
})
391+
if err != nil {
392+
t.Logf("%s", err)
393+
}
394+
assert.NoError(t, err)
395+
_, err = client.Inputs.GetInputDeinterlaceMode(&inputs.GetInputDeinterlaceModeParams{
396+
InputName: &[]string{"test2"}[0],
397+
InputUuid: &[]string{"test2"}[0],
398+
})
399+
if err != nil {
400+
t.Logf("%s", err)
401+
}
402+
assert.NoError(t, err)
387403
_, err = client.Inputs.GetInputKindList(&inputs.GetInputKindListParams{Unversioned: &[]bool{true}[0]})
388404
if err != nil {
389405
t.Logf("%s", err)
@@ -477,6 +493,24 @@ func Test_inputs(t *testing.T) {
477493
t.Logf("%s", err)
478494
}
479495
assert.NoError(t, err)
496+
_, err = client.Inputs.SetInputDeinterlaceFieldOrder(&inputs.SetInputDeinterlaceFieldOrderParams{
497+
InputDeinterlaceFieldOrder: &[]string{"test2"}[0],
498+
InputName: &[]string{"test2"}[0],
499+
InputUuid: &[]string{"test2"}[0],
500+
})
501+
if err != nil {
502+
t.Logf("%s", err)
503+
}
504+
assert.NoError(t, err)
505+
_, err = client.Inputs.SetInputDeinterlaceMode(&inputs.SetInputDeinterlaceModeParams{
506+
InputDeinterlaceMode: &[]string{"test2"}[0],
507+
InputName: &[]string{"test2"}[0],
508+
InputUuid: &[]string{"test2"}[0],
509+
})
510+
if err != nil {
511+
t.Logf("%s", err)
512+
}
513+
assert.NoError(t, err)
480514
_, err = client.Inputs.SetInputMute(&inputs.SetInputMuteParams{
481515
InputMuted: &[]bool{true}[0],
482516
InputName: &[]string{"test2"}[0],

0 commit comments

Comments
 (0)