Files
srs-spi/tools/main.go
haibo.chen 156f07644d gofmt
2025-10-15 10:05:52 +08:00

31 lines
500 B
Go

package main
import (
"context"
"os"
"os/signal"
"syscall"
"github.com/ossrs/go-oryx-lib/logger"
"github.com/ossrs/srs-bench/gb28181"
)
func main() {
ctx := context.Background()
var conf interface{}
conf = gb28181.Parse(ctx)
ctx, cancel := context.WithCancel(ctx)
go func() {
sigs := make(chan os.Signal, 1)
signal.Notify(sigs, syscall.SIGTERM, syscall.SIGINT)
for sig := range sigs {
logger.Wf(ctx, "Quit for signal %v", sig)
cancel()
}
}()
gb28181.Run(ctx, conf)
}