mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-10-05 15:57:03 +08:00
33 lines
731 B
Go
33 lines
731 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"path/filepath"
|
|
"runtime"
|
|
|
|
_ "github.com/Monibuca/clusterplugin"
|
|
. "github.com/Monibuca/engine"
|
|
_ "github.com/Monibuca/gatewayplugin"
|
|
_ "github.com/Monibuca/hdlplugin"
|
|
_ "github.com/Monibuca/hlsplugin"
|
|
_ "github.com/Monibuca/jessicaplugin"
|
|
_ "github.com/Monibuca/logrotateplugin"
|
|
_ "github.com/Monibuca/recordplugin"
|
|
_ "github.com/Monibuca/rtmpplugin"
|
|
_ "github.com/Monibuca/rtspplugin"
|
|
_ "github.com/Monibuca/tsplugin"
|
|
)
|
|
|
|
func main() {
|
|
addr := flag.String("c", "", "config file")
|
|
flag.Parse()
|
|
if *addr == "" {
|
|
_, currentFile, _, _ := runtime.Caller(0)
|
|
configFIle := filepath.Join(filepath.Dir(currentFile), "config.toml")
|
|
Run(configFIle)
|
|
} else {
|
|
Run(*addr)
|
|
}
|
|
select {}
|
|
}
|