vmixtcp

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EVENT_TALLY       string = "TALLY"
	EVENT_FUNCTION    string = "FUNCTION"
	EVENT_XML         string = "XML"
	EVENT_XMLTEXT     string = "XMLTEXT"
	EVENT_SUBSCRIBE   string = "SUBSCRIBE"
	EVENT_UNSUBSCRIBE string = "UNSUBSCRIBE"
	EVENT_QUIT        string = "QUIT"
	EVENT_ACTS        string = "ACTS"
)
View Source
const (
	STATUS_OK string = "OK"
	STATUS_ER string = "ER"
)
View Source
const (
	// Terminate letter
	Terminate = "\r\n"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	Command        string // Command. e.g. "TALLY"
	StatusOrLength string // Status or command length. e.g.  "OK" or "27"(XML)
	Response       string // Command response. e.g. "PreviewInput"(FUNCTION) or "0121..."(TALLY)
	Data           string // Optional data. e.g. XML.
}

Response TCP API Response

type TallyResponse

type TallyResponse struct {
	Status string
	Tally  []TallyStatus
}

TallyResponse TALLY Event response

type TallyStatus

type TallyStatus uint

TallyStatus alias to uint

const (
	Off TallyStatus = iota
	Program
	Preview
)

func (TallyStatus) String

func (i TallyStatus) String() string

type Vmix

type Vmix struct {
	// contains filtered or unexported fields
}

Vmix main object

func New

func New(dest string) (*Vmix, error)

New vmix instance. TODO:Support context

func (*Vmix) Close

func (v *Vmix) Close() error

Close connection

func (*Vmix) FUNCTION

func (v *Vmix) FUNCTION(funcname string) error

FUNCTION Send function

func (*Vmix) QUIT

func (v *Vmix) QUIT() error

QUIT Sends QUIT sigal

func (*Vmix) Register

func (v *Vmix) Register(command string, cb func(*Response)) error

Register goroutine callback event.

func (*Vmix) Run

func (v *Vmix) Run(ctx context.Context) error

Run Start vMix TCP API Instance

func (*Vmix) SUBSCRIBE

func (v *Vmix) SUBSCRIBE(event, option string) error

SUBSCRIBE Event

func (*Vmix) TALLY

func (v *Vmix) TALLY() error

TALLY Get tally status

func (*Vmix) UNSUBSCRIBE

func (v *Vmix) UNSUBSCRIBE(event string) error

UNSUBSCRIBE from event.

func (*Vmix) Write

func (v *Vmix) Write(b []byte) (n int, err error)

func (*Vmix) XML

func (v *Vmix) XML() error

XML Gets XML data. Same as HTTP API.

func (*Vmix) XMLPATH

func (v *Vmix) XMLPATH(xpath string) error

XMLPATH Gets XML data from specified XPATH

Jump to

Keyboard shortcuts

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