inputs

package
v0.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2023 License: Apache-2.0 Imports: 2 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*api.Client
}

Client represents a client for 'inputs' requests.

func (*Client) CreateInput

func (c *Client) CreateInput(params *CreateInputParams) (*CreateInputResponse, error)

Creates a new input, adding it as a scene item to the specified scene.

func (*Client) GetInputAudioBalance

func (c *Client) GetInputAudioBalance(params *GetInputAudioBalanceParams) (*GetInputAudioBalanceResponse, error)

Gets the audio balance of an input.

func (*Client) GetInputAudioMonitorType

func (c *Client) GetInputAudioMonitorType(
	params *GetInputAudioMonitorTypeParams,
) (*GetInputAudioMonitorTypeResponse, error)

Gets the audio monitor type of an input.

The available audio monitor types are:

- `OBS_MONITORING_TYPE_NONE` - `OBS_MONITORING_TYPE_MONITOR_ONLY` - `OBS_MONITORING_TYPE_MONITOR_AND_OUTPUT`

func (*Client) GetInputAudioSyncOffset

func (c *Client) GetInputAudioSyncOffset(
	params *GetInputAudioSyncOffsetParams,
) (*GetInputAudioSyncOffsetResponse, error)

Gets the audio sync offset of an input.

Note: The audio sync offset can be negative too!

func (*Client) GetInputAudioTracks

func (c *Client) GetInputAudioTracks(params *GetInputAudioTracksParams) (*GetInputAudioTracksResponse, error)

Gets the enable state of all audio tracks of an input.

func (*Client) GetInputDefaultSettings

func (c *Client) GetInputDefaultSettings(
	params *GetInputDefaultSettingsParams,
) (*GetInputDefaultSettingsResponse, error)

Gets the default settings for an input kind.

func (*Client) GetInputKindList

func (c *Client) GetInputKindList(paramss ...*GetInputKindListParams) (*GetInputKindListResponse, error)

Gets an array of all available input kinds in OBS.

func (*Client) GetInputList

func (c *Client) GetInputList(paramss ...*GetInputListParams) (*GetInputListResponse, error)

Gets an array of all inputs in OBS.

func (*Client) GetInputMute

func (c *Client) GetInputMute(params *GetInputMuteParams) (*GetInputMuteResponse, error)

Gets the audio mute state of an input.

func (*Client) GetInputPropertiesListPropertyItems

func (c *Client) GetInputPropertiesListPropertyItems(
	params *GetInputPropertiesListPropertyItemsParams,
) (*GetInputPropertiesListPropertyItemsResponse, error)

Gets the items of a list property from an input's properties.

Note: Use this in cases where an input provides a dynamic, selectable list of items. For example, display capture, where it provides a list of available displays.

func (*Client) GetInputSettings

func (c *Client) GetInputSettings(params *GetInputSettingsParams) (*GetInputSettingsResponse, error)

Gets the settings of an input.

Note: Does not include defaults. To create the entire settings object, overlay `inputSettings` over the `defaultInputSettings` provided by `GetInputDefaultSettings`.

func (*Client) GetInputVolume

func (c *Client) GetInputVolume(params *GetInputVolumeParams) (*GetInputVolumeResponse, error)

Gets the current volume setting of an input.

func (*Client) GetSpecialInputs

func (c *Client) GetSpecialInputs(paramss ...*GetSpecialInputsParams) (*GetSpecialInputsResponse, error)

Gets the names of all special inputs.

func (*Client) PressInputPropertiesButton

func (c *Client) PressInputPropertiesButton(
	params *PressInputPropertiesButtonParams,
) (*PressInputPropertiesButtonResponse, error)

Presses a button in the properties of an input.

Some known `propertyName` values are:

- `refreshnocache` - Browser source reload button

Note: Use this in cases where there is a button in the properties of an input that cannot be accessed in any other way. For example, browser sources, where there is a refresh button.

func (*Client) RemoveInput

func (c *Client) RemoveInput(params *RemoveInputParams) (*RemoveInputResponse, error)

Removes an existing input.

Note: Will immediately remove all associated scene items.

func (*Client) SetInputAudioBalance

func (c *Client) SetInputAudioBalance(params *SetInputAudioBalanceParams) (*SetInputAudioBalanceResponse, error)

Sets the audio balance of an input.

func (*Client) SetInputAudioMonitorType

func (c *Client) SetInputAudioMonitorType(
	params *SetInputAudioMonitorTypeParams,
) (*SetInputAudioMonitorTypeResponse, error)

Sets the audio monitor type of an input.

func (*Client) SetInputAudioSyncOffset

func (c *Client) SetInputAudioSyncOffset(
	params *SetInputAudioSyncOffsetParams,
) (*SetInputAudioSyncOffsetResponse, error)

Sets the audio sync offset of an input.

func (*Client) SetInputAudioTracks

func (c *Client) SetInputAudioTracks(params *SetInputAudioTracksParams) (*SetInputAudioTracksResponse, error)

Sets the enable state of audio tracks of an input.

func (*Client) SetInputMute

func (c *Client) SetInputMute(params *SetInputMuteParams) (*SetInputMuteResponse, error)

Sets the audio mute state of an input.

func (*Client) SetInputName

func (c *Client) SetInputName(params *SetInputNameParams) (*SetInputNameResponse, error)

Sets the name of an input (rename).

func (*Client) SetInputSettings

func (c *Client) SetInputSettings(params *SetInputSettingsParams) (*SetInputSettingsResponse, error)

Sets the settings of an input.

func (*Client) SetInputVolume

func (c *Client) SetInputVolume(params *SetInputVolumeParams) (*SetInputVolumeResponse, error)

Sets the volume setting of an input.

func (*Client) ToggleInputMute

func (c *Client) ToggleInputMute(params *ToggleInputMuteParams) (*ToggleInputMuteResponse, error)

Toggles the audio mute state of an input.

type CreateInputParams

type CreateInputParams struct {
	// The kind of input to be created
	InputKind string `json:"inputKind,omitempty"`

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

	// Settings object to initialize the input with
	InputSettings map[string]interface{} `json:"inputSettings,omitempty"`

	// Whether to set the created scene item to enabled or disabled
	SceneItemEnabled *bool `json:"sceneItemEnabled,omitempty"`

	// Name of the scene to add the input to as a scene item
	SceneName string `json:"sceneName,omitempty"`
}

Represents the request body for the CreateInput request.

func (*CreateInputParams) GetRequestName

func (o *CreateInputParams) GetRequestName() string

Returns the associated request.

type CreateInputResponse

type CreateInputResponse struct {
	// ID of the newly created scene item
	SceneItemId float64 `json:"sceneItemId,omitempty"`
}

Represents the response body for the CreateInput request.

type GetInputAudioBalanceParams

type GetInputAudioBalanceParams struct {
	// Name of the input to get the audio balance of
	InputName string `json:"inputName,omitempty"`
}

Represents the request body for the GetInputAudioBalance request.

func (*GetInputAudioBalanceParams) GetRequestName

func (o *GetInputAudioBalanceParams) GetRequestName() string

Returns the associated request.

type GetInputAudioBalanceResponse

type GetInputAudioBalanceResponse struct {
	// Audio balance value from 0.0-1.0
	InputAudioBalance float64 `json:"inputAudioBalance,omitempty"`
}

Represents the response body for the GetInputAudioBalance request.

type GetInputAudioMonitorTypeParams

type GetInputAudioMonitorTypeParams struct {
	// Name of the input to get the audio monitor type of
	InputName string `json:"inputName,omitempty"`
}

Represents the request body for the GetInputAudioMonitorType request.

func (*GetInputAudioMonitorTypeParams) GetRequestName

func (o *GetInputAudioMonitorTypeParams) GetRequestName() string

Returns the associated request.

type GetInputAudioMonitorTypeResponse

type GetInputAudioMonitorTypeResponse struct {
	// Audio monitor type
	MonitorType string `json:"monitorType,omitempty"`
}

Represents the response body for the GetInputAudioMonitorType request.

type GetInputAudioSyncOffsetParams

type GetInputAudioSyncOffsetParams struct {
	// Name of the input to get the audio sync offset of
	InputName string `json:"inputName,omitempty"`
}

Represents the request body for the GetInputAudioSyncOffset request.

func (*GetInputAudioSyncOffsetParams) GetRequestName

func (o *GetInputAudioSyncOffsetParams) GetRequestName() string

Returns the associated request.

type GetInputAudioSyncOffsetResponse

type GetInputAudioSyncOffsetResponse struct {
	// Audio sync offset in milliseconds
	InputAudioSyncOffset float64 `json:"inputAudioSyncOffset,omitempty"`
}

Represents the response body for the GetInputAudioSyncOffset request.

type GetInputAudioTracksParams

type GetInputAudioTracksParams struct {
	// Name of the input
	InputName string `json:"inputName,omitempty"`
}

Represents the request body for the GetInputAudioTracks request.

func (*GetInputAudioTracksParams) GetRequestName

func (o *GetInputAudioTracksParams) GetRequestName() string

Returns the associated request.

type GetInputAudioTracksResponse

type GetInputAudioTracksResponse struct {
	InputAudioTracks *typedefs.InputAudioTracks `json:"inputAudioTracks,omitempty"`
}

Represents the response body for the GetInputAudioTracks request.

type GetInputDefaultSettingsParams

type GetInputDefaultSettingsParams struct {
	// Input kind to get the default settings for
	InputKind string `json:"inputKind,omitempty"`
}

Represents the request body for the GetInputDefaultSettings request.

func (*GetInputDefaultSettingsParams) GetRequestName

func (o *GetInputDefaultSettingsParams) GetRequestName() string

Returns the associated request.

type GetInputDefaultSettingsResponse

type GetInputDefaultSettingsResponse struct {
	// Object of default settings for the input kind
	DefaultInputSettings map[string]interface{} `json:"defaultInputSettings,omitempty"`
}

Represents the response body for the GetInputDefaultSettings request.

type GetInputKindListParams

type GetInputKindListParams struct {
	// True == Return all kinds as unversioned, False == Return with version suffixes (if available)
	Unversioned *bool `json:"unversioned,omitempty"`
}

Represents the request body for the GetInputKindList request.

func (*GetInputKindListParams) GetRequestName

func (o *GetInputKindListParams) GetRequestName() string

Returns the associated request.

type GetInputKindListResponse

type GetInputKindListResponse struct {
	// Array of input kinds
	InputKinds []string `json:"inputKinds,omitempty"`
}

Represents the response body for the GetInputKindList request.

type GetInputListParams

type GetInputListParams struct {
	// Restrict the array to only inputs of the specified kind
	InputKind string `json:"inputKind,omitempty"`
}

Represents the request body for the GetInputList request.

func (*GetInputListParams) GetRequestName

func (o *GetInputListParams) GetRequestName() string

Returns the associated request.

type GetInputListResponse

type GetInputListResponse struct {
	Inputs []*typedefs.Input `json:"inputs,omitempty"`
}

Represents the response body for the GetInputList request.

type GetInputMuteParams

type GetInputMuteParams struct {
	// Name of input to get the mute state of
	InputName string `json:"inputName,omitempty"`
}

Represents the request body for the GetInputMute request.

func (*GetInputMuteParams) GetRequestName

func (o *GetInputMuteParams) GetRequestName() string

Returns the associated request.

type GetInputMuteResponse

type GetInputMuteResponse struct {
	// Whether the input is muted
	InputMuted bool `json:"inputMuted,omitempty"`
}

Represents the response body for the GetInputMute request.

type GetInputPropertiesListPropertyItemsParams

type GetInputPropertiesListPropertyItemsParams struct {
	// Name of the input
	InputName string `json:"inputName,omitempty"`

	// Name of the list property to get the items of
	PropertyName string `json:"propertyName,omitempty"`
}

Represents the request body for the GetInputPropertiesListPropertyItems request.

func (*GetInputPropertiesListPropertyItemsParams) GetRequestName

Returns the associated request.

type GetInputPropertiesListPropertyItemsResponse

type GetInputPropertiesListPropertyItemsResponse struct {
	PropertyItems []*typedefs.PropertyItem `json:"propertyItems,omitempty"`
}

Represents the response body for the GetInputPropertiesListPropertyItems request.

type GetInputSettingsParams

type GetInputSettingsParams struct {
	// Name of the input to get the settings of
	InputName string `json:"inputName,omitempty"`
}

Represents the request body for the GetInputSettings request.

func (*GetInputSettingsParams) GetRequestName

func (o *GetInputSettingsParams) GetRequestName() string

Returns the associated request.

type GetInputSettingsResponse

type GetInputSettingsResponse struct {
	// The kind of the input
	InputKind string `json:"inputKind,omitempty"`

	// Object of settings for the input
	InputSettings map[string]interface{} `json:"inputSettings,omitempty"`
}

Represents the response body for the GetInputSettings request.

type GetInputVolumeParams

type GetInputVolumeParams struct {
	// Name of the input to get the volume of
	InputName string `json:"inputName,omitempty"`
}

Represents the request body for the GetInputVolume request.

func (*GetInputVolumeParams) GetRequestName

func (o *GetInputVolumeParams) GetRequestName() string

Returns the associated request.

type GetInputVolumeResponse

type GetInputVolumeResponse struct {
	// Volume setting in dB
	InputVolumeDb float64 `json:"inputVolumeDb,omitempty"`

	// Volume setting in mul
	InputVolumeMul float64 `json:"inputVolumeMul,omitempty"`
}

Represents the response body for the GetInputVolume request.

type GetSpecialInputsParams

type GetSpecialInputsParams struct{}

Represents the request body for the GetSpecialInputs request.

func (*GetSpecialInputsParams) GetRequestName

func (o *GetSpecialInputsParams) GetRequestName() string

Returns the associated request.

type GetSpecialInputsResponse

type GetSpecialInputsResponse struct {
	// Name of the Desktop Audio input
	Desktop1 string `json:"desktop1,omitempty"`

	// Name of the Desktop Audio 2 input
	Desktop2 string `json:"desktop2,omitempty"`

	// Name of the Mic/Auxiliary Audio input
	Mic1 string `json:"mic1,omitempty"`

	// Name of the Mic/Auxiliary Audio 2 input
	Mic2 string `json:"mic2,omitempty"`

	// Name of the Mic/Auxiliary Audio 3 input
	Mic3 string `json:"mic3,omitempty"`

	// Name of the Mic/Auxiliary Audio 4 input
	Mic4 string `json:"mic4,omitempty"`
}

Represents the response body for the GetSpecialInputs request.

type PressInputPropertiesButtonParams

type PressInputPropertiesButtonParams struct {
	// Name of the input
	InputName string `json:"inputName,omitempty"`

	// Name of the button property to press
	PropertyName string `json:"propertyName,omitempty"`
}

Represents the request body for the PressInputPropertiesButton request.

func (*PressInputPropertiesButtonParams) GetRequestName

func (o *PressInputPropertiesButtonParams) GetRequestName() string

Returns the associated request.

type PressInputPropertiesButtonResponse

type PressInputPropertiesButtonResponse struct{}

Represents the response body for the PressInputPropertiesButton request.

type RemoveInputParams

type RemoveInputParams struct {
	// Name of the input to remove
	InputName string `json:"inputName,omitempty"`
}

Represents the request body for the RemoveInput request.

func (*RemoveInputParams) GetRequestName

func (o *RemoveInputParams) GetRequestName() string

Returns the associated request.

type RemoveInputResponse

type RemoveInputResponse struct{}

Represents the response body for the RemoveInput request.

type SetInputAudioBalanceParams

type SetInputAudioBalanceParams struct {
	// New audio balance value
	InputAudioBalance float64 `json:"inputAudioBalance,omitempty"`

	// Name of the input to set the audio balance of
	InputName string `json:"inputName,omitempty"`
}

Represents the request body for the SetInputAudioBalance request.

func (*SetInputAudioBalanceParams) GetRequestName

func (o *SetInputAudioBalanceParams) GetRequestName() string

Returns the associated request.

type SetInputAudioBalanceResponse

type SetInputAudioBalanceResponse struct{}

Represents the response body for the SetInputAudioBalance request.

type SetInputAudioMonitorTypeParams

type SetInputAudioMonitorTypeParams struct {
	// Name of the input to set the audio monitor type of
	InputName string `json:"inputName,omitempty"`

	// Audio monitor type
	MonitorType string `json:"monitorType,omitempty"`
}

Represents the request body for the SetInputAudioMonitorType request.

func (*SetInputAudioMonitorTypeParams) GetRequestName

func (o *SetInputAudioMonitorTypeParams) GetRequestName() string

Returns the associated request.

type SetInputAudioMonitorTypeResponse

type SetInputAudioMonitorTypeResponse struct{}

Represents the response body for the SetInputAudioMonitorType request.

type SetInputAudioSyncOffsetParams

type SetInputAudioSyncOffsetParams struct {
	// New audio sync offset in milliseconds
	InputAudioSyncOffset float64 `json:"inputAudioSyncOffset,omitempty"`

	// Name of the input to set the audio sync offset of
	InputName string `json:"inputName,omitempty"`
}

Represents the request body for the SetInputAudioSyncOffset request.

func (*SetInputAudioSyncOffsetParams) GetRequestName

func (o *SetInputAudioSyncOffsetParams) GetRequestName() string

Returns the associated request.

type SetInputAudioSyncOffsetResponse

type SetInputAudioSyncOffsetResponse struct{}

Represents the response body for the SetInputAudioSyncOffset request.

type SetInputAudioTracksParams

type SetInputAudioTracksParams struct {
	InputAudioTracks *typedefs.InputAudioTracks `json:"inputAudioTracks,omitempty"`

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

Represents the request body for the SetInputAudioTracks request.

func (*SetInputAudioTracksParams) GetRequestName

func (o *SetInputAudioTracksParams) GetRequestName() string

Returns the associated request.

type SetInputAudioTracksResponse

type SetInputAudioTracksResponse struct{}

Represents the response body for the SetInputAudioTracks request.

type SetInputMuteParams

type SetInputMuteParams struct {
	// Whether to mute the input or not
	InputMuted *bool `json:"inputMuted,omitempty"`

	// Name of the input to set the mute state of
	InputName string `json:"inputName,omitempty"`
}

Represents the request body for the SetInputMute request.

func (*SetInputMuteParams) GetRequestName

func (o *SetInputMuteParams) GetRequestName() string

Returns the associated request.

type SetInputMuteResponse

type SetInputMuteResponse struct{}

Represents the response body for the SetInputMute request.

type SetInputNameParams

type SetInputNameParams struct {
	// Current input name
	InputName string `json:"inputName,omitempty"`

	// New name for the input
	NewInputName string `json:"newInputName,omitempty"`
}

Represents the request body for the SetInputName request.

func (*SetInputNameParams) GetRequestName

func (o *SetInputNameParams) GetRequestName() string

Returns the associated request.

type SetInputNameResponse

type SetInputNameResponse struct{}

Represents the response body for the SetInputName request.

type SetInputSettingsParams

type SetInputSettingsParams struct {
	// Name of the input to set the settings of
	InputName string `json:"inputName,omitempty"`

	// Object of settings to apply
	InputSettings map[string]interface{} `json:"inputSettings,omitempty"`

	// True == apply the settings on top of existing ones, False == reset the input to its defaults, then apply
	// settings.
	Overlay *bool `json:"overlay,omitempty"`
}

Represents the request body for the SetInputSettings request.

func (*SetInputSettingsParams) GetRequestName

func (o *SetInputSettingsParams) GetRequestName() string

Returns the associated request.

type SetInputSettingsResponse

type SetInputSettingsResponse struct{}

Represents the response body for the SetInputSettings request.

type SetInputVolumeParams

type SetInputVolumeParams struct {
	// Name of the input to set the volume of
	InputName string `json:"inputName,omitempty"`

	// Volume setting in dB
	InputVolumeDb float64 `json:"inputVolumeDb,omitempty"`

	// Volume setting in mul
	InputVolumeMul float64 `json:"inputVolumeMul,omitempty"`
}

Represents the request body for the SetInputVolume request.

func (*SetInputVolumeParams) GetRequestName

func (o *SetInputVolumeParams) GetRequestName() string

Returns the associated request.

type SetInputVolumeResponse

type SetInputVolumeResponse struct{}

Represents the response body for the SetInputVolume request.

type ToggleInputMuteParams

type ToggleInputMuteParams struct {
	// Name of the input to toggle the mute state of
	InputName string `json:"inputName,omitempty"`
}

Represents the request body for the ToggleInputMute request.

func (*ToggleInputMuteParams) GetRequestName

func (o *ToggleInputMuteParams) GetRequestName() string

Returns the associated request.

type ToggleInputMuteResponse

type ToggleInputMuteResponse struct {
	// Whether the input has been muted or unmuted
	InputMuted bool `json:"inputMuted,omitempty"`
}

Represents the response body for the ToggleInputMute request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL