Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
[![Build Status][build-img]][build-url]
[![Go Report][goreport-img]][goreport-url]

[protocol-img]: https://img.shields.io/badge/obs--websocket-v5.5.6-blue?logo=obs-studio&style=flat-square
[protocol-url]: https://github.com/obsproject/obs-websocket/blob/5.5.6/docs/generated/protocol.md
[protocol-img]: https://img.shields.io/badge/obs--websocket-v5.6.0-blue?logo=obs-studio&style=flat-square
[protocol-url]: https://github.com/obsproject/obs-websocket/blob/5.6.0/docs/generated/protocol.md
[doc-img]: https://img.shields.io/badge/pkg.go.dev-reference-blue?logo=go&logoColor=white&style=flat-square
[doc-url]: https://pkg.go.dev/github.com/andreykaipov/goobs
[build-img]: https://img.shields.io/github/actions/workflow/status/andreykaipov/goobs/ci.yml?logo=github&style=flat-square&branch=main
Expand Down Expand Up @@ -66,9 +66,9 @@ The corresponding output:
[//]: # (snippet-2-begin)
```console
go run _examples/basic/main.go
OBS Studio version: 31.0.1
Server protocol version: 5.5.4
Client protocol version: 5.5.6
Client library version: 1.5.6
OBS Studio version: 32.0.0
Server protocol version: 5.6.2
Client protocol version: 5.6.0
Client library version: 1.6.0
```
[//]: # (snippet-2-end)
3 changes: 3 additions & 0 deletions api/events/xx_generated.inputs.inputcreated.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ type InputCreated struct {
// The kind of the input
InputKind string `json:"inputKind,omitempty"`

// Bitflag value for the caps that an input supports. See obs_source_info.output_flags in the libobs docs
InputKindCaps float64 `json:"inputKindCaps,omitempty"`

// Name of the input
InputName string `json:"inputName,omitempty"`

Expand Down
58 changes: 58 additions & 0 deletions api/requests/inputs/xx_generated.getinputdeinterlacefieldorder.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// This file has been automatically generated. Don't edit it.

package inputs

// Represents the request body for the GetInputDeinterlaceFieldOrder request.
type GetInputDeinterlaceFieldOrderParams struct {
// Name of the input
InputName *string `json:"inputName,omitempty"`

// UUID of the input
InputUuid *string `json:"inputUuid,omitempty"`
}

func NewGetInputDeinterlaceFieldOrderParams() *GetInputDeinterlaceFieldOrderParams {
return &GetInputDeinterlaceFieldOrderParams{}
}
func (o *GetInputDeinterlaceFieldOrderParams) WithInputName(x string) *GetInputDeinterlaceFieldOrderParams {
o.InputName = &x
return o
}
func (o *GetInputDeinterlaceFieldOrderParams) WithInputUuid(x string) *GetInputDeinterlaceFieldOrderParams {
o.InputUuid = &x
return o
}

// Returns the associated request.
func (o *GetInputDeinterlaceFieldOrderParams) GetRequestName() string {
return "GetInputDeinterlaceFieldOrder"
}

// Represents the response body for the GetInputDeinterlaceFieldOrder request.
type GetInputDeinterlaceFieldOrderResponse struct {
_response

// Deinterlace field order of the input
InputDeinterlaceFieldOrder string `json:"inputDeinterlaceFieldOrder,omitempty"`
}

/*
Gets the deinterlace field order of an input.
Deinterlace Field Orders:
- `OBS_DEINTERLACE_FIELD_ORDER_TOP`
- `OBS_DEINTERLACE_FIELD_ORDER_BOTTOM`
Note: Deinterlacing functionality is restricted to async inputs only.
*/
func (c *Client) GetInputDeinterlaceFieldOrder(
paramss ...*GetInputDeinterlaceFieldOrderParams,
) (*GetInputDeinterlaceFieldOrderResponse, error) {
if len(paramss) == 0 {
paramss = []*GetInputDeinterlaceFieldOrderParams{{}}
}
params := paramss[0]
data := &GetInputDeinterlaceFieldOrderResponse{}
return data, c.client.SendRequest(params, data)
}
65 changes: 65 additions & 0 deletions api/requests/inputs/xx_generated.getinputdeinterlacemode.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// This file has been automatically generated. Don't edit it.

package inputs

// Represents the request body for the GetInputDeinterlaceMode request.
type GetInputDeinterlaceModeParams struct {
// Name of the input
InputName *string `json:"inputName,omitempty"`

// UUID of the input
InputUuid *string `json:"inputUuid,omitempty"`
}

func NewGetInputDeinterlaceModeParams() *GetInputDeinterlaceModeParams {
return &GetInputDeinterlaceModeParams{}
}
func (o *GetInputDeinterlaceModeParams) WithInputName(x string) *GetInputDeinterlaceModeParams {
o.InputName = &x
return o
}
func (o *GetInputDeinterlaceModeParams) WithInputUuid(x string) *GetInputDeinterlaceModeParams {
o.InputUuid = &x
return o
}

// Returns the associated request.
func (o *GetInputDeinterlaceModeParams) GetRequestName() string {
return "GetInputDeinterlaceMode"
}

// Represents the response body for the GetInputDeinterlaceMode request.
type GetInputDeinterlaceModeResponse struct {
_response

// Deinterlace mode of the input
InputDeinterlaceMode string `json:"inputDeinterlaceMode,omitempty"`
}

/*
Gets the deinterlace mode of an input.
Deinterlace Modes:
- `OBS_DEINTERLACE_MODE_DISABLE`
- `OBS_DEINTERLACE_MODE_DISCARD`
- `OBS_DEINTERLACE_MODE_RETRO`
- `OBS_DEINTERLACE_MODE_BLEND`
- `OBS_DEINTERLACE_MODE_BLEND_2X`
- `OBS_DEINTERLACE_MODE_LINEAR`
- `OBS_DEINTERLACE_MODE_LINEAR_2X`
- `OBS_DEINTERLACE_MODE_YADIF`
- `OBS_DEINTERLACE_MODE_YADIF_2X`
Note: Deinterlacing functionality is restricted to async inputs only.
*/
func (c *Client) GetInputDeinterlaceMode(
paramss ...*GetInputDeinterlaceModeParams,
) (*GetInputDeinterlaceModeResponse, error) {
if len(paramss) == 0 {
paramss = []*GetInputDeinterlaceModeParams{{}}
}
params := paramss[0]
data := &GetInputDeinterlaceModeResponse{}
return data, c.client.SendRequest(params, data)
}
56 changes: 56 additions & 0 deletions api/requests/inputs/xx_generated.setinputdeinterlacefieldorder.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// This file has been automatically generated. Don't edit it.

package inputs

// Represents the request body for the SetInputDeinterlaceFieldOrder request.
type SetInputDeinterlaceFieldOrderParams struct {
// Deinterlace field order for the input
InputDeinterlaceFieldOrder *string `json:"inputDeinterlaceFieldOrder,omitempty"`

// Name of the input
InputName *string `json:"inputName,omitempty"`

// UUID of the input
InputUuid *string `json:"inputUuid,omitempty"`
}

func NewSetInputDeinterlaceFieldOrderParams() *SetInputDeinterlaceFieldOrderParams {
return &SetInputDeinterlaceFieldOrderParams{}
}

func (o *SetInputDeinterlaceFieldOrderParams) WithInputDeinterlaceFieldOrder(
x string,
) *SetInputDeinterlaceFieldOrderParams {
o.InputDeinterlaceFieldOrder = &x
return o
}
func (o *SetInputDeinterlaceFieldOrderParams) WithInputName(x string) *SetInputDeinterlaceFieldOrderParams {
o.InputName = &x
return o
}
func (o *SetInputDeinterlaceFieldOrderParams) WithInputUuid(x string) *SetInputDeinterlaceFieldOrderParams {
o.InputUuid = &x
return o
}

// Returns the associated request.
func (o *SetInputDeinterlaceFieldOrderParams) GetRequestName() string {
return "SetInputDeinterlaceFieldOrder"
}

// Represents the response body for the SetInputDeinterlaceFieldOrder request.
type SetInputDeinterlaceFieldOrderResponse struct {
_response
}

/*
Sets the deinterlace field order of an input.
Note: Deinterlacing functionality is restricted to async inputs only.
*/
func (c *Client) SetInputDeinterlaceFieldOrder(
params *SetInputDeinterlaceFieldOrderParams,
) (*SetInputDeinterlaceFieldOrderResponse, error) {
data := &SetInputDeinterlaceFieldOrderResponse{}
return data, c.client.SendRequest(params, data)
}
53 changes: 53 additions & 0 deletions api/requests/inputs/xx_generated.setinputdeinterlacemode.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// This file has been automatically generated. Don't edit it.

package inputs

// Represents the request body for the SetInputDeinterlaceMode request.
type SetInputDeinterlaceModeParams struct {
// Deinterlace mode for the input
InputDeinterlaceMode *string `json:"inputDeinterlaceMode,omitempty"`

// Name of the input
InputName *string `json:"inputName,omitempty"`

// UUID of the input
InputUuid *string `json:"inputUuid,omitempty"`
}

func NewSetInputDeinterlaceModeParams() *SetInputDeinterlaceModeParams {
return &SetInputDeinterlaceModeParams{}
}
func (o *SetInputDeinterlaceModeParams) WithInputDeinterlaceMode(x string) *SetInputDeinterlaceModeParams {
o.InputDeinterlaceMode = &x
return o
}
func (o *SetInputDeinterlaceModeParams) WithInputName(x string) *SetInputDeinterlaceModeParams {
o.InputName = &x
return o
}
func (o *SetInputDeinterlaceModeParams) WithInputUuid(x string) *SetInputDeinterlaceModeParams {
o.InputUuid = &x
return o
}

// Returns the associated request.
func (o *SetInputDeinterlaceModeParams) GetRequestName() string {
return "SetInputDeinterlaceMode"
}

// Represents the response body for the SetInputDeinterlaceMode request.
type SetInputDeinterlaceModeResponse struct {
_response
}

/*
Sets the deinterlace mode of an input.
Note: Deinterlacing functionality is restricted to async inputs only.
*/
func (c *Client) SetInputDeinterlaceMode(
params *SetInputDeinterlaceModeParams,
) (*SetInputDeinterlaceModeResponse, error) {
data := &SetInputDeinterlaceModeResponse{}
return data, c.client.SendRequest(params, data)
}
4 changes: 4 additions & 0 deletions docs/request-mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ The following tables show how to make the appropriate `goobs` request for any gi
| GetInputAudioSyncOffset | `client.Inputs.GetInputAudioSyncOffset(...)` |
| GetInputAudioTracks | `client.Inputs.GetInputAudioTracks(...)` |
| GetInputDefaultSettings | `client.Inputs.GetInputDefaultSettings(...)` |
| GetInputDeinterlaceFieldOrder | `client.Inputs.GetInputDeinterlaceFieldOrder(...)` |
| GetInputDeinterlaceMode | `client.Inputs.GetInputDeinterlaceMode(...)` |
| GetInputKindList | `client.Inputs.GetInputKindList(...)` |
| GetInputList | `client.Inputs.GetInputList(...)` |
| GetInputMute | `client.Inputs.GetInputMute(...)` |
Expand All @@ -77,6 +79,8 @@ The following tables show how to make the appropriate `goobs` request for any gi
| SetInputAudioMonitorType | `client.Inputs.SetInputAudioMonitorType(...)` |
| SetInputAudioSyncOffset | `client.Inputs.SetInputAudioSyncOffset(...)` |
| SetInputAudioTracks | `client.Inputs.SetInputAudioTracks(...)` |
| SetInputDeinterlaceFieldOrder | `client.Inputs.SetInputDeinterlaceFieldOrder(...)` |
| SetInputDeinterlaceMode | `client.Inputs.SetInputDeinterlaceMode(...)` |
| SetInputMute | `client.Inputs.SetInputMute(...)` |
| SetInputName | `client.Inputs.SetInputName(...)` |
| SetInputSettings | `client.Inputs.SetInputSettings(...)` |
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

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

var ProtocolVersion = "5.5.6"
var ProtocolVersion = "5.6.0"

var LibraryVersion = func() string {
bi, ok := debug.ReadBuildInfo()
Expand Down
34 changes: 34 additions & 0 deletions zz_generated._test.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,22 @@ func Test_inputs(t *testing.T) {
t.Logf("%s", err)
}
assert.NoError(t, err)
_, err = client.Inputs.GetInputDeinterlaceFieldOrder(&inputs.GetInputDeinterlaceFieldOrderParams{
InputName: &[]string{"test2"}[0],
InputUuid: &[]string{"test2"}[0],
})
if err != nil {
t.Logf("%s", err)
}
assert.NoError(t, err)
_, err = client.Inputs.GetInputDeinterlaceMode(&inputs.GetInputDeinterlaceModeParams{
InputName: &[]string{"test2"}[0],
InputUuid: &[]string{"test2"}[0],
})
if err != nil {
t.Logf("%s", err)
}
assert.NoError(t, err)
_, err = client.Inputs.GetInputKindList(&inputs.GetInputKindListParams{Unversioned: &[]bool{true}[0]})
if err != nil {
t.Logf("%s", err)
Expand Down Expand Up @@ -477,6 +493,24 @@ func Test_inputs(t *testing.T) {
t.Logf("%s", err)
}
assert.NoError(t, err)
_, err = client.Inputs.SetInputDeinterlaceFieldOrder(&inputs.SetInputDeinterlaceFieldOrderParams{
InputDeinterlaceFieldOrder: &[]string{"test2"}[0],
InputName: &[]string{"test2"}[0],
InputUuid: &[]string{"test2"}[0],
})
if err != nil {
t.Logf("%s", err)
}
assert.NoError(t, err)
_, err = client.Inputs.SetInputDeinterlaceMode(&inputs.SetInputDeinterlaceModeParams{
InputDeinterlaceMode: &[]string{"test2"}[0],
InputName: &[]string{"test2"}[0],
InputUuid: &[]string{"test2"}[0],
})
if err != nil {
t.Logf("%s", err)
}
assert.NoError(t, err)
_, err = client.Inputs.SetInputMute(&inputs.SetInputMuteParams{
InputMuted: &[]bool{true}[0],
InputName: &[]string{"test2"}[0],
Expand Down