player

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CmdNil Command = iota
	CmdPause
	CmdStop
	CmdNext
	CmdPrev
	CmdVolUp
	CmdVolDown
	CmdSeekForward
	CmdSeekBackward

	ParamNoVideo Param = "no-video"
	ParamSilent  Param = "silent"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command int

type GenericPlayer

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

func NewFFPlay

func NewFFPlay() *GenericPlayer

func NewMPlayer

func NewMPlayer() *GenericPlayer

func (*GenericPlayer) Name

func (m *GenericPlayer) Name() string

func (*GenericPlayer) Spawn

func (m *GenericPlayer) Spawn(file string, params []Param) (
	chan Command,
	func(),
	error,
)

func (*GenericPlayer) Supported

func (m *GenericPlayer) Supported() bool

type LibMPV

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

func (*LibMPV) Name

func (m *LibMPV) Name() string

func (*LibMPV) Spawn

func (m *LibMPV) Spawn(file string, params []Param) (chan Command, func(), error)

func (*LibMPV) Supported

func (m *LibMPV) Supported() bool

type Param

type Param string

type Player

type Player interface {
	Name() string
	Spawn(file string, params []Param) (chan Command, func(), error)
	Supported() bool
}

func FindSupportedPlayer

func FindSupportedPlayer(players ...Player) (Player, error)

func NewLibMPV

func NewLibMPV(volume chan<- int, seek chan<- *Pos) Player

type Pos added in v0.3.2

type Pos struct {
	Cur time.Duration
	Dur time.Duration
}

func (*Pos) Pct added in v0.3.2

func (p *Pos) Pct() float64

Jump to

Keyboard shortcuts

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