The `PrepareBackgroundCommand` function has been removed because it prevents the program window from being displayed on Windows.
29 lines
506 B
Go
29 lines
506 B
Go
package kernel
|
|
|
|
import (
|
|
"os/exec"
|
|
)
|
|
|
|
type FFplay struct {
|
|
ffPathUtilities *FFPathUtilities
|
|
}
|
|
|
|
type FFplaySetting struct {
|
|
PathToFile string
|
|
}
|
|
|
|
type FFplayContract interface {
|
|
Run(setting FFplaySetting) error
|
|
}
|
|
|
|
func NewFFplay(ffPathUtilities *FFPathUtilities) *FFplay {
|
|
return &FFplay{ffPathUtilities: ffPathUtilities}
|
|
}
|
|
|
|
func (ffplay FFplay) Run(setting FFplaySetting) error {
|
|
args := []string{setting.PathToFile}
|
|
cmd := exec.Command(ffplay.ffPathUtilities.FFplay, args...)
|
|
|
|
return cmd.Start()
|
|
}
|