vmixtcp

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

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

Go to latest
Published: Oct 11, 2020 License: MIT Imports: 8 Imported by: 0

README

vmix TCP API

vMix TCP API wrapper for Golang.

Author / 開発者

Shugo Kawamura / 河村 柊吾
Github : FlowingSPDG
Twitter : @FlowingSPDG / @FlowingSPDG_EN

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"
)
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
	StatusOrLength string
	Response       string
	Data           string
}

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

func (*Vmix) ClearTallyCallback

func (v *Vmix) ClearTallyCallback()

ClearTallyCallback clear callback for TALLY event.

func (*Vmix) Close

func (v *Vmix) Close()

Close connection

func (*Vmix) FUNCTION

func (v *Vmix) FUNCTION(funcname string) (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. Use tally event if it's for TALLY!!

func (*Vmix) RegisterTallyCallback

func (v *Vmix) RegisterTallyCallback(cb func(*TallyResponse))

RegisterTallyCallback tally callback for TALLY event.

func (*Vmix) SUBSCRIBE

func (v *Vmix) SUBSCRIBE(command string) (string, error)

SUBSCRIBE Event

func (*Vmix) TALLY

func (v *Vmix) TALLY() (string, error)

TALLY Get tally status

func (*Vmix) UNSUBSCRIBE

func (v *Vmix) UNSUBSCRIBE(command string) (string, error)

UNSUBSCRIBE from event.

func (*Vmix) Unregister

func (v *Vmix) Unregister(command string) error

Unregister goroutine callback event

func (*Vmix) XML

func (v *Vmix) XML() (string, error)

XML Gets XML data. Same as HTTP API.

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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