diff --git a/break_player/.gitignore b/break_player/.gitignore new file mode 100644 index 0000000..e82ea5a --- /dev/null +++ b/break_player/.gitignore @@ -0,0 +1,19 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# Go workspace file +go.work + diff --git a/break_player/cmd/break_player/main.go b/break_player/cmd/break_player/main.go new file mode 100644 index 0000000..c34d212 --- /dev/null +++ b/break_player/cmd/break_player/main.go @@ -0,0 +1,27 @@ +package main + +import ( + "fmt" + "os" + + "git.openfest.org/Video/openfest-video/break_player/mainservice" +) + +func main() { + if len(os.Args) != 2 { + fmt.Fprintf(os.Stdout, "usage: %s \n", os.Args[0]) + os.Exit(1) + } + + svc, err := mainservice.New(os.Args[1]) + if err != nil { + fmt.Fprintf(os.Stdout, "could not init main service: %s\n", err) + os.Exit(1) + } + + err = svc.Serve() + if err != nil { + fmt.Fprintf(os.Stdout, "server died: %s\n", err) + os.Exit(1) + } +} diff --git a/break_player/go.mod b/break_player/go.mod new file mode 100644 index 0000000..28fb3fe --- /dev/null +++ b/break_player/go.mod @@ -0,0 +1,3 @@ +module git.openfest.org/Video/openfest-video/break_player + +go 1.22.2 diff --git a/break_player/mainservice/mainservice.go b/break_player/mainservice/mainservice.go new file mode 100644 index 0000000..8731689 --- /dev/null +++ b/break_player/mainservice/mainservice.go @@ -0,0 +1,16 @@ +package mainservice + +type MainService struct { +} + +func New(configFileName string) (*MainService, error) { + // parse config + return nil, nil +} + +func (s *MainService) Serve() error { + // start web server in goroutine + // start mpvipc in another goroutine + // go! + return nil +}