Leonid Nikitin 7340f43d6e
Remove unused helper function from ffplay.go
The `PrepareBackgroundCommand` function has been removed because it prevents the program window from being displayed on Windows.
2025-05-25 22:51:59 +05:00

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()
}