2020-02-28 05:55:07 +03:00
|
|
|
// +build pi3
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os/exec"
|
2020-02-28 07:00:55 +03:00
|
|
|
|
|
|
|
"bitbucket.org/ausocean/utils/logger"
|
2020-02-28 05:55:07 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
const audioCmd = "omxplayer"
|
|
|
|
|
2020-02-28 07:00:55 +03:00
|
|
|
func initCommand(log *logger.Logger) {
|
2020-02-28 05:55:07 +03:00
|
|
|
// Making sure that omxplayer command is on the pi.
|
|
|
|
path, err := exec.LookPath("omxplayer")
|
|
|
|
if err != nil {
|
2020-02-28 07:00:55 +03:00
|
|
|
log.Log(logger.Fatal, "didn't find 'omxplayer' executable")
|
2020-02-28 05:55:07 +03:00
|
|
|
}
|
2020-02-28 07:00:55 +03:00
|
|
|
log.Log(logger.Debug, "'omxplayer' executable path", "path", path)
|
2020-02-28 05:55:07 +03:00
|
|
|
}
|