Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientV1 ¶
type ClientV1 interface {
GetLive(ctx context.Context) bool
GetProduct(ctx context.Context) (info *ProductInformation, err error)
ShortcutHTTP(ctx context.Context, name string, kv map[string]string) error
ShortcutWS(ctx context.Context, name string, kv map[string]string) error
Trigger(ctx context.Context, name string) error
// Basic Switcher Controls
Take(ctx context.Context) error
AutoTransition(ctx context.Context) error
SetSourceToPreview(ctx context.Context, source string) error
SetSourceToProgram(ctx context.Context, source string) error
SetSourceToME(ctx context.Context, me, source string) error
SetDSKOnAir(ctx context.Context, dsk string, onAir bool) error
SetTransitionSelection(ctx context.Context, transition string) error
// Media Controls
MediaPlay(ctx context.Context, media string) error
MediaStop(ctx context.Context, media string) error
MediaRewind(ctx context.Context, media string) error
MediaFastForward(ctx context.Context, media string) error
MediaPause(ctx context.Context, media string) error
// Recording and Streaming
RecordToggle(ctx context.Context) error
RecordStart(ctx context.Context) error
RecordStop(ctx context.Context) error
StreamToggle(ctx context.Context) error
StreamStart(ctx context.Context) error
StreamStop(ctx context.Context) error
// Macros
RunSystemMacro(ctx context.Context, macro string) error
RunCustomMacro(ctx context.Context, macro string) error
// Advanced Macro Controls
PlayMacroByName(ctx context.Context, name string) error
PlayMacroByID(ctx context.Context, id string) error
RecordMacroByName(ctx context.Context, name string) error
StopRecordMacro(ctx context.Context) error
StopMacroByName(ctx context.Context, name string) error
StopMacroByID(ctx context.Context, id string) error
MacroIsEnabledByName(ctx context.Context, name string) (bool, error)
MacroIsEnabledByID(ctx context.Context, id string) (bool, error)
GetMacroIDByName(ctx context.Context, name string) (string, error)
// Output Control
SetMixOutput(ctx context.Context, output string) error
// DataLink
SetDataLinkValue(ctx context.Context, key, value string) error
GetDataLinkValue(ctx context.Context, key string) (string, error)
// Feedback and Status
GetTally(ctx context.Context) (*Tally, error)
GetRecordingStatus(ctx context.Context) (bool, error)
GetStreamingStatus(ctx context.Context) (bool, error)
GetMediaStatus(ctx context.Context, media string) (string, error)
GetSourceStatus(ctx context.Context) (program, preview string, err error)
// Dictionary Queries
GetDictionary(ctx context.Context, key string) ([]byte, error)
GetSwitcherInfo(ctx context.Context) ([]byte, error)
GetBufferInfo(ctx context.Context) ([]byte, error)
GetSwitcherUIEffects(ctx context.Context) ([]byte, error)
GetAudioMixerInfo(ctx context.Context) ([]byte, error)
GetAudioBinsInfo(ctx context.Context) ([]byte, error)
GetFileBrowserInfo(ctx context.Context) ([]byte, error)
GetMacrosList(ctx context.Context) ([]byte, error)
GetNDISources(ctx context.Context) ([]byte, error)
GetDDRPlaylist(ctx context.Context) ([]byte, error)
GetDDRTimecode(ctx context.Context) ([]byte, error)
// DataLink()
// File()
VideoPreview(ctx context.Context, name string, xres, yres, quality int) (image.Image, error)
// Dictonary stuff
// Dictionary(key string) error
MetaData(ctx context.Context) (*Metadata, error)
// Tally()
// Switcher()
// Buffer()
// SwitcherUIEffect()
ShortcutStates(ctx context.Context) (*ShortcutStates, error)
// Websocket stuff
// v1/audio_notifications
// v1/change_notifications
// v1/shortcut_notifications
// v1/shortcut_state_notifications
// v1/timecode_notifications
// v1/vu_notifications
VUNotifications(ctx context.Context, name string, cb func(msg string)) error
ChangeNotifications(ctx context.Context, cb func(msg string)) error
TimecodeNotifications(ctx context.Context, cb func(msg string)) error
ShortcutNotifications(ctx context.Context, cb func(msg string)) error
// Additional WebSocket features
AudioNotifications(ctx context.Context, name string, cb func(data []byte)) error
ShortcutStateNotifications(ctx context.Context, cb func(msg string)) error
VideoNotifications(ctx context.Context, name string, xres, yres, quality int, cb func(data []byte)) error
}
func NewClientV1 ¶
type ClientV1TCP ¶
type ClientV1TCP interface {
Close() error // Close Connection
Register(name string) error // send NTK_states
Unregister(name string) error // send NTK_states
Send(data string) error
SendBytes(data []byte) error
Shortcut(s Shortcuts) error // should include shortcut XML or name and K/V
}
func NewClientV1TCP ¶
func NewClientV1TCP(host string) (ClientV1TCP, error)
type ProductInformation ¶
type ProductInformation struct {
XMLName xml.Name `xml:"product_information"`
Text string `xml:",chardata"`
ProductModel string `xml:"product_model"`
ProductName string `xml:"product_name"`
ProductVersion string `xml:"product_version"`
ProductID string `xml:"product_id"`
ProductSerialNo string `xml:"product_serial_no"`
ProductBuildNo string `xml:"product_build_no"`
MachineName string `xml:"machine_name"`
SessionXResolution string `xml:"session_x_resolution"`
SessionYResolution string `xml:"session_y_resolution"`
SessionFielded string `xml:"session_fielded"`
SessionFrameRate string `xml:"session_frame_rate"`
SessionAspectRatio string `xml:"session_aspect_ratio"`
SessionColorFormat string `xml:"session_color_format"`
SessionColorCoding string `xml:"session_color_coding"`
SessionName string `xml:"session_name"`
OutputCount string `xml:"output_count"`
}
ProductInformation. /v1/version API
type ShortcutState ¶
type ShortcutStates ¶
type ShortcutStates struct {
XMLName xml.Name `xml:"shortcut_states"`
Text string `xml:",chardata"`
ShortcutState []ShortcutState `xml:"shortcut_state"`
}
type Tally ¶
type Tally struct {
XMLName xml.Name `xml:"tally"`
Text string `xml:",chardata"`
Column []struct {
Text string `xml:",chardata"`
Name string `xml:"name,attr"`
Index string `xml:"index,attr"`
OnPgm string `xml:"on_pgm,attr"`
OnPrev string `xml:"on_prev,attr"`
NdiID string `xml:"ndi_id,attr"`
} `xml:"column"`
}
Directories
¶
| Path | Synopsis |
|---|---|
|
example
|
|
|
advanced_websocket
command
|
|
|
autoplay
command
|
|
|
change_notification
command
|
|
|
comprehensive_example
command
|
|
|
feedback_status
command
|
|
|
macros_datalink
command
|
|
|
media_control
command
|
|
|
recording_streaming
command
|
|
|
shortcut_notifications
command
|
|
|
simple_shortcut
command
|
|
|
simple_shortcut_tcp
command
|
|
|
switcher_control
command
|
|
|
thumbnail
command
|
|
|
timecode
command
|
|
|
vu_notifications
command
|
|
|
websocket_shortcut
command
|
Click to show internal directories.
Click to hide internal directories.