This commit is contained in:
haibo.chen
2025-10-15 10:05:52 +08:00
parent d9709f61a5
commit 156f07644d
18 changed files with 1222 additions and 1227 deletions

View File

@ -1,30 +1,30 @@
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)
}
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)
}