newtek

package module
v0.0.0-...-a47565f Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Camera

type Camera struct {
	Text  string `xml:",chardata"`
	Angle string `xml:"angle,attr"`
	Tag   string `xml:"tag,attr"`
	Path  string `xml:"path,attr"`
}

type ClientV1

type ClientV1 interface {
	GetLive() bool
	GetProduct() (info *ProductInformation, err error)
	ShortcutHTTP(name string, kv map[string]string) error
	ShortcutWS(name string, kv map[string]string) error
	Trigger(name string) error
	// DataLink()
	// File()
	VideoPreview(name string, xres, yres, quality int) (image.Image, error)

	// Dictonary stuff
	// Dictionary(key string) error
	MetaData() (*Metadata, error)
	// Tally()
	// Switcher()
	// Buffer()
	// SwitcherUIEffect()
	ShortcutStates() (*ShortcutStates, error)

	// Websocket stuff
	// v1/audio_notifications
	// v1/change_notifications
	// v1/shortcut_notifications
	// v1/shortcut_state_notifications
	// v1/timecode_notifications
	// v1/vu_notifications
	VUNotifications(name string, cb func(msg string)) error
	ChangeNotifications(cb func(msg string)) error
	TimecodeNotifications(cb func(msg string)) error
	ShortcutNotifications(cb func(msg string)) error
}

func NewClientV1

func NewClientV1(host, user, password string) (ClientV1, error)

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 Clip

type Clip struct {
	Text string `xml:",chardata"`
	Mark []struct {
		Text   string   `xml:",chardata"`
		ID     string   `xml:"id,attr"`
		In     string   `xml:"in,attr"`
		Out    string   `xml:"out,attr"`
		Camera []Camera `xml:"camera"`
	} `xml:"mark"`
}

type Metadata

type Metadata struct {
	XMLName xml.Name `xml:"metadata"`
	Text    string   `xml:",chardata"`
	Clips   []Clip   `xml:"clips"`
}

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 Shortcut

type Shortcut struct {
	XMLName xml.Name `xml:"shortcut"`
	Text    string   `xml:",chardata"`
	Name    string   `xml:"name,attr"`
	Value   string   `xml:"value,attr"`
}

type ShortcutState

type ShortcutState struct {
	Text   string `xml:",chardata"`
	Name   string `xml:"name,attr"`
	Value  string `xml:"value,attr"`
	Type   string `xml:"type,attr"`
	Sender string `xml:"sender,attr"`
}

type ShortcutStates

type ShortcutStates struct {
	XMLName       xml.Name        `xml:"shortcut_states"`
	Text          string          `xml:",chardata"`
	ShortcutState []ShortcutState `xml:"shortcut_state"`
}

type Shortcuts

type Shortcuts struct {
	XMLName  xml.Name   `xml:"shortcuts"`
	Text     string     `xml:",chardata"`
	Shortcut []Shortcut `xml:"shortcut"`
}

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"`
}

Jump to

Keyboard shortcuts

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