Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Input is used to feed the slave subprocess commands. Input = make(chan string) )
Functions ¶
func PlayAndWait ¶
PlayAndWait loads the given file and block until the file is done playing.
func PlayAndWaitWithDuration ¶
PlayAndWaitWithDuration loads the given file and block until the file is done playing. This function will also stop playing after the given duration.
func SendCommand ¶
func SendCommand(msg string)
SendCommand feeds the MPlayer slave with input commands.
func StartSlave ¶
func StartSlave(errorHandler ErrorHandler)
StartSlave keeps an mplayer process in slave mode open for the rest of time, consuming input from the mplayerInput channel and feeding it to the stdin of the process. If the process dies it is restarted automatically.
You are required to define an error handler function that will be called with all the errors that could have occured managing the slave.
Types ¶
type ErrorHandler ¶
type ErrorHandler func(error)
Click to show internal directories.
Click to hide internal directories.