config

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: 1

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 'config' requests.

func (*Client) CreateProfile

func (c *Client) CreateProfile(params *CreateProfileParams) (*CreateProfileResponse, error)

Creates a new profile, switching to it in the process

func (*Client) CreateSceneCollection

func (c *Client) CreateSceneCollection(params *CreateSceneCollectionParams) (*CreateSceneCollectionResponse, error)

Creates a new scene collection, switching to it in the process.

Note: This will block until the collection has finished changing.

func (*Client) GetPersistentData

func (c *Client) GetPersistentData(params *GetPersistentDataParams) (*GetPersistentDataResponse, error)

Gets the value of a "slot" from the selected persistent data realm.

func (*Client) GetProfileList

func (c *Client) GetProfileList(paramss ...*GetProfileListParams) (*GetProfileListResponse, error)

Gets an array of all profiles

func (*Client) GetProfileParameter

func (c *Client) GetProfileParameter(params *GetProfileParameterParams) (*GetProfileParameterResponse, error)

Gets a parameter from the current profile's configuration.

func (*Client) GetRecordDirectory added in v0.11.0

func (c *Client) GetRecordDirectory(paramss ...*GetRecordDirectoryParams) (*GetRecordDirectoryResponse, error)

Gets the current directory that the record output is set to.

func (*Client) GetSceneCollectionList

func (c *Client) GetSceneCollectionList(
	paramss ...*GetSceneCollectionListParams,
) (*GetSceneCollectionListResponse, error)

Gets an array of all scene collections

func (*Client) GetStreamServiceSettings

func (c *Client) GetStreamServiceSettings(
	paramss ...*GetStreamServiceSettingsParams,
) (*GetStreamServiceSettingsResponse, error)

Gets the current stream service settings (stream destination).

func (*Client) GetVideoSettings

func (c *Client) GetVideoSettings(paramss ...*GetVideoSettingsParams) (*GetVideoSettingsResponse, error)

Gets the current video settings.

Note: To get the true FPS value, divide the FPS numerator by the FPS denominator. Example: `60000/1001`

func (*Client) RemoveProfile

func (c *Client) RemoveProfile(params *RemoveProfileParams) (*RemoveProfileResponse, error)

Removes a profile. If the current profile is chosen, it will change to a different profile first.

func (*Client) SetCurrentProfile

func (c *Client) SetCurrentProfile(params *SetCurrentProfileParams) (*SetCurrentProfileResponse, error)

Switches to a profile.

func (*Client) SetCurrentSceneCollection

func (c *Client) SetCurrentSceneCollection(
	params *SetCurrentSceneCollectionParams,
) (*SetCurrentSceneCollectionResponse, error)

Switches to a scene collection.

Note: This will block until the collection has finished changing.

func (*Client) SetPersistentData

func (c *Client) SetPersistentData(params *SetPersistentDataParams) (*SetPersistentDataResponse, error)

Sets the value of a "slot" from the selected persistent data realm.

func (*Client) SetProfileParameter

func (c *Client) SetProfileParameter(params *SetProfileParameterParams) (*SetProfileParameterResponse, error)

Sets the value of a parameter in the current profile's configuration.

func (*Client) SetStreamServiceSettings

func (c *Client) SetStreamServiceSettings(
	params *SetStreamServiceSettingsParams,
) (*SetStreamServiceSettingsResponse, error)

Sets the current stream service settings (stream destination).

Note: Simple RTMP settings can be set with type `rtmp_custom` and the settings fields `server` and `key`.

func (*Client) SetVideoSettings

func (c *Client) SetVideoSettings(paramss ...*SetVideoSettingsParams) (*SetVideoSettingsResponse, error)

Sets the current video settings.

Note: Fields must be specified in pairs. For example, you cannot set only `baseWidth` without needing to specify `baseHeight`.

type CreateProfileParams

type CreateProfileParams struct {
	// Name for the new profile
	ProfileName string `json:"profileName,omitempty"`
}

Represents the request body for the CreateProfile request.

func (*CreateProfileParams) GetRequestName

func (o *CreateProfileParams) GetRequestName() string

Returns the associated request.

type CreateProfileResponse

type CreateProfileResponse struct{}

Represents the response body for the CreateProfile request.

type CreateSceneCollectionParams

type CreateSceneCollectionParams struct {
	// Name for the new scene collection
	SceneCollectionName string `json:"sceneCollectionName,omitempty"`
}

Represents the request body for the CreateSceneCollection request.

func (*CreateSceneCollectionParams) GetRequestName

func (o *CreateSceneCollectionParams) GetRequestName() string

Returns the associated request.

type CreateSceneCollectionResponse

type CreateSceneCollectionResponse struct{}

Represents the response body for the CreateSceneCollection request.

type GetPersistentDataParams

type GetPersistentDataParams struct {
	// The data realm to select. `OBS_WEBSOCKET_DATA_REALM_GLOBAL` or `OBS_WEBSOCKET_DATA_REALM_PROFILE`
	Realm string `json:"realm,omitempty"`

	// The name of the slot to retrieve data from
	SlotName string `json:"slotName,omitempty"`
}

Represents the request body for the GetPersistentData request.

func (*GetPersistentDataParams) GetRequestName

func (o *GetPersistentDataParams) GetRequestName() string

Returns the associated request.

type GetPersistentDataResponse

type GetPersistentDataResponse struct {
	// Value associated with the slot. `null` if not set
	SlotValue interface{} `json:"slotValue,omitempty"`
}

Represents the response body for the GetPersistentData request.

type GetProfileListParams

type GetProfileListParams struct{}

Represents the request body for the GetProfileList request.

func (*GetProfileListParams) GetRequestName

func (o *GetProfileListParams) GetRequestName() string

Returns the associated request.

type GetProfileListResponse

type GetProfileListResponse struct {
	// The name of the current profile
	CurrentProfileName string `json:"currentProfileName,omitempty"`

	// Array of all available profiles
	Profiles []string `json:"profiles,omitempty"`
}

Represents the response body for the GetProfileList request.

type GetProfileParameterParams

type GetProfileParameterParams struct {
	// Category of the parameter to get
	ParameterCategory string `json:"parameterCategory,omitempty"`

	// Name of the parameter to get
	ParameterName string `json:"parameterName,omitempty"`
}

Represents the request body for the GetProfileParameter request.

func (*GetProfileParameterParams) GetRequestName

func (o *GetProfileParameterParams) GetRequestName() string

Returns the associated request.

type GetProfileParameterResponse

type GetProfileParameterResponse struct {
	// Default value associated with the parameter. `null` if no default
	DefaultParameterValue string `json:"defaultParameterValue,omitempty"`

	// Value associated with the parameter. `null` if not set and no default
	ParameterValue string `json:"parameterValue,omitempty"`
}

Represents the response body for the GetProfileParameter request.

type GetRecordDirectoryParams added in v0.11.0

type GetRecordDirectoryParams struct{}

Represents the request body for the GetRecordDirectory request.

func (*GetRecordDirectoryParams) GetRequestName added in v0.11.0

func (o *GetRecordDirectoryParams) GetRequestName() string

Returns the associated request.

type GetRecordDirectoryResponse added in v0.11.0

type GetRecordDirectoryResponse struct {
	// Output directory
	RecordDirectory string `json:"recordDirectory,omitempty"`
}

Represents the response body for the GetRecordDirectory request.

type GetSceneCollectionListParams

type GetSceneCollectionListParams struct{}

Represents the request body for the GetSceneCollectionList request.

func (*GetSceneCollectionListParams) GetRequestName

func (o *GetSceneCollectionListParams) GetRequestName() string

Returns the associated request.

type GetSceneCollectionListResponse

type GetSceneCollectionListResponse struct {
	// The name of the current scene collection
	CurrentSceneCollectionName string `json:"currentSceneCollectionName,omitempty"`

	// Array of all available scene collections
	SceneCollections []string `json:"sceneCollections,omitempty"`
}

Represents the response body for the GetSceneCollectionList request.

type GetStreamServiceSettingsParams

type GetStreamServiceSettingsParams struct{}

Represents the request body for the GetStreamServiceSettings request.

func (*GetStreamServiceSettingsParams) GetRequestName

func (o *GetStreamServiceSettingsParams) GetRequestName() string

Returns the associated request.

type GetStreamServiceSettingsResponse

type GetStreamServiceSettingsResponse struct {
	StreamServiceSettings *typedefs.StreamServiceSettings `json:"streamServiceSettings,omitempty"`

	// Stream service type, like `rtmp_custom` or `rtmp_common`
	StreamServiceType string `json:"streamServiceType,omitempty"`
}

Represents the response body for the GetStreamServiceSettings request.

type GetVideoSettingsParams

type GetVideoSettingsParams struct{}

Represents the request body for the GetVideoSettings request.

func (*GetVideoSettingsParams) GetRequestName

func (o *GetVideoSettingsParams) GetRequestName() string

Returns the associated request.

type GetVideoSettingsResponse

type GetVideoSettingsResponse struct {
	// Height of the base (canvas) resolution in pixels
	BaseHeight float64 `json:"baseHeight,omitempty"`

	// Width of the base (canvas) resolution in pixels
	BaseWidth float64 `json:"baseWidth,omitempty"`

	// Denominator of the fractional FPS value
	FpsDenominator float64 `json:"fpsDenominator,omitempty"`

	// Numerator of the fractional FPS value
	FpsNumerator float64 `json:"fpsNumerator,omitempty"`

	// Height of the output resolution in pixels
	OutputHeight float64 `json:"outputHeight,omitempty"`

	// Width of the output resolution in pixels
	OutputWidth float64 `json:"outputWidth,omitempty"`
}

Represents the response body for the GetVideoSettings request.

type RemoveProfileParams

type RemoveProfileParams struct {
	// Name of the profile to remove
	ProfileName string `json:"profileName,omitempty"`
}

Represents the request body for the RemoveProfile request.

func (*RemoveProfileParams) GetRequestName

func (o *RemoveProfileParams) GetRequestName() string

Returns the associated request.

type RemoveProfileResponse

type RemoveProfileResponse struct{}

Represents the response body for the RemoveProfile request.

type SetCurrentProfileParams

type SetCurrentProfileParams struct {
	// Name of the profile to switch to
	ProfileName string `json:"profileName,omitempty"`
}

Represents the request body for the SetCurrentProfile request.

func (*SetCurrentProfileParams) GetRequestName

func (o *SetCurrentProfileParams) GetRequestName() string

Returns the associated request.

type SetCurrentProfileResponse

type SetCurrentProfileResponse struct{}

Represents the response body for the SetCurrentProfile request.

type SetCurrentSceneCollectionParams

type SetCurrentSceneCollectionParams struct {
	// Name of the scene collection to switch to
	SceneCollectionName string `json:"sceneCollectionName,omitempty"`
}

Represents the request body for the SetCurrentSceneCollection request.

func (*SetCurrentSceneCollectionParams) GetRequestName

func (o *SetCurrentSceneCollectionParams) GetRequestName() string

Returns the associated request.

type SetCurrentSceneCollectionResponse

type SetCurrentSceneCollectionResponse struct{}

Represents the response body for the SetCurrentSceneCollection request.

type SetPersistentDataParams

type SetPersistentDataParams struct {
	// The data realm to select. `OBS_WEBSOCKET_DATA_REALM_GLOBAL` or `OBS_WEBSOCKET_DATA_REALM_PROFILE`
	Realm string `json:"realm,omitempty"`

	// The name of the slot to retrieve data from
	SlotName string `json:"slotName,omitempty"`

	// The value to apply to the slot
	SlotValue interface{} `json:"slotValue,omitempty"`
}

Represents the request body for the SetPersistentData request.

func (*SetPersistentDataParams) GetRequestName

func (o *SetPersistentDataParams) GetRequestName() string

Returns the associated request.

type SetPersistentDataResponse

type SetPersistentDataResponse struct{}

Represents the response body for the SetPersistentData request.

type SetProfileParameterParams

type SetProfileParameterParams struct {
	// Category of the parameter to set
	ParameterCategory string `json:"parameterCategory,omitempty"`

	// Name of the parameter to set
	ParameterName string `json:"parameterName,omitempty"`

	// Value of the parameter to set. Use `null` to delete
	ParameterValue string `json:"parameterValue,omitempty"`
}

Represents the request body for the SetProfileParameter request.

func (*SetProfileParameterParams) GetRequestName

func (o *SetProfileParameterParams) GetRequestName() string

Returns the associated request.

type SetProfileParameterResponse

type SetProfileParameterResponse struct{}

Represents the response body for the SetProfileParameter request.

type SetStreamServiceSettingsParams

type SetStreamServiceSettingsParams struct {
	StreamServiceSettings *typedefs.StreamServiceSettings `json:"streamServiceSettings,omitempty"`

	// Type of stream service to apply. Example: `rtmp_common` or `rtmp_custom`
	StreamServiceType string `json:"streamServiceType,omitempty"`
}

Represents the request body for the SetStreamServiceSettings request.

func (*SetStreamServiceSettingsParams) GetRequestName

func (o *SetStreamServiceSettingsParams) GetRequestName() string

Returns the associated request.

type SetStreamServiceSettingsResponse

type SetStreamServiceSettingsResponse struct{}

Represents the response body for the SetStreamServiceSettings request.

type SetVideoSettingsParams

type SetVideoSettingsParams struct {
	// Height of the base (canvas) resolution in pixels
	BaseHeight float64 `json:"baseHeight,omitempty"`

	// Width of the base (canvas) resolution in pixels
	BaseWidth float64 `json:"baseWidth,omitempty"`

	// Denominator of the fractional FPS value
	FpsDenominator float64 `json:"fpsDenominator,omitempty"`

	// Numerator of the fractional FPS value
	FpsNumerator float64 `json:"fpsNumerator,omitempty"`

	// Height of the output resolution in pixels
	OutputHeight float64 `json:"outputHeight,omitempty"`

	// Width of the output resolution in pixels
	OutputWidth float64 `json:"outputWidth,omitempty"`
}

Represents the request body for the SetVideoSettings request.

func (*SetVideoSettingsParams) GetRequestName

func (o *SetVideoSettingsParams) GetRequestName() string

Returns the associated request.

type SetVideoSettingsResponse

type SetVideoSettingsResponse struct{}

Represents the response body for the SetVideoSettings request.

Jump to

Keyboard shortcuts

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