millumin

package
Version: v4.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LayerState

type LayerState struct {
	Layer    string
	Updated  time.Time
	Playing  bool
	Info     MediaInfo
	Duration float32
	Paused   bool
	Time     float32
}

LayerState is the state of individual Millumin playback layer

func (LayerState) Remaining

func (state LayerState) Remaining() float32

Remaining returns the time remaining on the given layer

func (*LayerState) String

func (state *LayerState) String() string

String prints the layer information

type Listener

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

Listener is a osc receiver for messages sent by Millumin Use MakeListener to create

func MakeListener

func MakeListener(oscServer *osc.Server) *Listener

MakeListener creates a osc listener for messages sent by Millumin

func (*Listener) Listen

func (listener *Listener) Listen() chan State

Listen is used to register new listeners for the decoded millumin playback state

type MediaInfo

type MediaInfo struct {
	Index    int32
	Name     string
	Duration float32
}

MediaInfo contains the information of a given media file in Millumin playback state

func (*MediaInfo) UnmarshalOSC

func (i *MediaInfo) UnmarshalOSC(msg *osc.Message) error

UnmarshalOSC converts a osc.Message to MediaInfo message

type MediaPaused

type MediaPaused struct {
	MediaInfo
}

MediaPaused is a pause event from Millumin in message /millumin/layer:time/mediaPaused i:index s:name f:duration

func (*MediaPaused) UnmarshalOSC

func (ms *MediaPaused) UnmarshalOSC(msg *osc.Message) error

UnmarshalOSC converts osc.Message to MediaPaused

type MediaStarted

type MediaStarted struct {
	MediaInfo
}

MediaStarted constains information of new media playback start from /millumin/layer:time/mediaStarted i:index s:name f:duration

func (*MediaStarted) UnmarshalOSC

func (ms *MediaStarted) UnmarshalOSC(msg *osc.Message) error

UnmarshalOSC converts osc.Message to MediaStarted

type MediaStopped

type MediaStopped struct {
	MediaInfo
}

MediaStopped is a playback stop message from Millumin /millumin/layer:time/mediaStopped i:index s:name f:duration

func (*MediaStopped) UnmarshalOSC

func (ms *MediaStopped) UnmarshalOSC(msg *osc.Message) error

UnmarshalOSC converts osc.Message to MediaStopped

type MediaTime

type MediaTime struct {
	Value    float32
	Duration float32
}

MediaTime constains the Millumin media playback timestamps from /millumin/layer:time/media/time f:value, f:duration osc messages

func (*MediaTime) UnmarshalOSC

func (mt *MediaTime) UnmarshalOSC(msg *osc.Message) error

UnmarshalOSC converts a osc.Message to MediaTime

type State

type State map[string]LayerState

State is complete Millumin playback state for all layers

Jump to

Keyboard shortcuts

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