Compare commits

...

4 Commits

Author SHA1 Message Date
dexter
7dca6c9411 修复引擎bug 2021-10-27 21:52:49 +08:00
dexter
eddbb35136 版本升级 2021-10-13 23:12:11 +08:00
dexter
65c3d90275 更新版本 2021-08-30 15:32:25 +08:00
dexter
531bcd57f1 更新版本 2021-08-22 23:32:36 +08:00
3 changed files with 28 additions and 29 deletions

20
go.mod
View File

@@ -3,22 +3,22 @@ module github.com/langhuihui/monibuca
go 1.16
require (
github.com/Monibuca/engine/v3 v3.3.2
github.com/Monibuca/plugin-gateway/v3 v3.0.0-20210820143202-ef17974159c4
github.com/Monibuca/plugin-gb28181/v3 v3.0.0-20210810033348-cb10ae14bfdd
github.com/Monibuca/engine/v3 v3.3.8
github.com/Monibuca/plugin-gateway/v3 v3.0.0-20211007125400-7bb43ea85dc9
github.com/Monibuca/plugin-gb28181/v3 v3.0.0-20211009015954-97d65b9710c3
github.com/Monibuca/plugin-hdl/v3 v3.0.0-20210807135828-9d98f5b8dd6c
github.com/Monibuca/plugin-hls/v3 v3.0.0-20210816130143-30255c2cc047
github.com/Monibuca/plugin-hls/v3 v3.0.0-20210821065544-cb61e2220aac
github.com/Monibuca/plugin-jessica/v3 v3.0.0-20210807235919-48ac5fbec646
github.com/Monibuca/plugin-logrotate/v3 v3.0.0-20210710104346-3db68431dcab
github.com/Monibuca/plugin-record/v3 v3.0.0-20210813073316-79dce1e0dc70
github.com/Monibuca/plugin-rtmp/v3 v3.0.0-20210819063901-526f2917b16d
github.com/Monibuca/plugin-rtsp/v3 v3.0.0-20210808000722-f267b1ca527b
github.com/Monibuca/plugin-summary v0.0.0-20210710132803-53cdcef14699
github.com/Monibuca/plugin-rtsp/v3 v3.0.0-20211011074050-bbd668796ef3
github.com/Monibuca/plugin-summary v0.0.0-20210821070131-2261e0efb7b9
github.com/Monibuca/plugin-ts/v3 v3.0.0-20210710125303-3fb5757b7c5b
github.com/Monibuca/plugin-webrtc/v3 v3.0.0-20210817013155-6993496f6d3c
)
// replace (
// github.com/Monibuca/engine/v3 => ../engine
// github.com/Monibuca/plugin-gateway/v3 => ../plugin-gateway
// )
//replace github.com/Monibuca/plugin-gateway/v3 => ../plugin-gateway
// replace github.com/Monibuca/engine/v3 => ../engine
// replace github.com/Monibuca/plugin-summary => ../plugin-summary

26
go.sum
View File

@@ -5,18 +5,16 @@ github.com/Monibuca/engine/v3 v3.1.0/go.mod h1:yz6cssED2VlYu+g/LrxseBB9pcvsLM/o2
github.com/Monibuca/engine/v3 v3.1.1/go.mod h1:yz6cssED2VlYu+g/LrxseBB9pcvsLM/o2QXa4gVY650=
github.com/Monibuca/engine/v3 v3.2.3/go.mod h1:odyqD/VTQDN4qgzajsgn7kW7MWDIzTHt+j+BcI8i+4g=
github.com/Monibuca/engine/v3 v3.3.0/go.mod h1:odyqD/VTQDN4qgzajsgn7kW7MWDIzTHt+j+BcI8i+4g=
github.com/Monibuca/engine/v3 v3.3.2 h1:IzzrAWhg8BZgUsa77GbGvjnf7NSSsF8bMs5i6hBia/w=
github.com/Monibuca/engine/v3 v3.3.2/go.mod h1:odyqD/VTQDN4qgzajsgn7kW7MWDIzTHt+j+BcI8i+4g=
github.com/Monibuca/plugin-gateway/v3 v3.0.0-20210820133904-63079896f296 h1:THiI9wiJ6QGJAqaimJKIMf43xWHvh8+ujBpCbMXkGp4=
github.com/Monibuca/plugin-gateway/v3 v3.0.0-20210820133904-63079896f296/go.mod h1:bDI6d64yb50+3rMczouVQoTYWbGOZhVFgu3k/yKJdXU=
github.com/Monibuca/plugin-gateway/v3 v3.0.0-20210820143202-ef17974159c4 h1:QpJZpjVgpo1+ukviJh1djepx3N/s5ZdPvYyC0RlEntc=
github.com/Monibuca/plugin-gateway/v3 v3.0.0-20210820143202-ef17974159c4/go.mod h1:bDI6d64yb50+3rMczouVQoTYWbGOZhVFgu3k/yKJdXU=
github.com/Monibuca/plugin-gb28181/v3 v3.0.0-20210810033348-cb10ae14bfdd h1:fzcXnNYjLCyHjo3g4LQHODzoLyzA8FdoyNkUw+6Eg7U=
github.com/Monibuca/plugin-gb28181/v3 v3.0.0-20210810033348-cb10ae14bfdd/go.mod h1:GOo5h5svtdYJnqKH1WtZx02p9wGIoWEMpLht8RTHQEc=
github.com/Monibuca/engine/v3 v3.3.8 h1:Z6mZO/YpZZ5JTUCAErJDDrH3zj+OScazRafb/l7lmCA=
github.com/Monibuca/engine/v3 v3.3.8/go.mod h1:odyqD/VTQDN4qgzajsgn7kW7MWDIzTHt+j+BcI8i+4g=
github.com/Monibuca/plugin-gateway/v3 v3.0.0-20211007125400-7bb43ea85dc9 h1:6bSg16Jmml8Fpofu9hPPzXjKaN8HXdux6eXt5RNprqE=
github.com/Monibuca/plugin-gateway/v3 v3.0.0-20211007125400-7bb43ea85dc9/go.mod h1:bDI6d64yb50+3rMczouVQoTYWbGOZhVFgu3k/yKJdXU=
github.com/Monibuca/plugin-gb28181/v3 v3.0.0-20211009015954-97d65b9710c3 h1:KouylijcQ/vfobxLJZmaM2/vfXzHHHV+0tkajIEgLOo=
github.com/Monibuca/plugin-gb28181/v3 v3.0.0-20211009015954-97d65b9710c3/go.mod h1:WvMoRJ8SfGctwtx/9jvY6s5FPJanJSxtfW3+A1TR1E0=
github.com/Monibuca/plugin-hdl/v3 v3.0.0-20210807135828-9d98f5b8dd6c h1:crcVwFF4qW8b3UoucGIK+wG0U03cx7numcI+bkRV9ng=
github.com/Monibuca/plugin-hdl/v3 v3.0.0-20210807135828-9d98f5b8dd6c/go.mod h1:T4LdSfJIAMqmvmy9lXUL1RJ73JvhSBH2RdMKvs4N858=
github.com/Monibuca/plugin-hls/v3 v3.0.0-20210816130143-30255c2cc047 h1:o0vQ/UEvB7Is3XvFsrhQts1duzI5YVZfGfnK3f6GeNo=
github.com/Monibuca/plugin-hls/v3 v3.0.0-20210816130143-30255c2cc047/go.mod h1:Hlxpv0GFAwC0gy71U1Hku5Fs/I1VEd/N4IX+cVavz9o=
github.com/Monibuca/plugin-hls/v3 v3.0.0-20210821065544-cb61e2220aac h1:PtI1vGH3qZOXT0GnyMdvU+gmkXtJHnEtjHPjpbkrZTQ=
github.com/Monibuca/plugin-hls/v3 v3.0.0-20210821065544-cb61e2220aac/go.mod h1:Hlxpv0GFAwC0gy71U1Hku5Fs/I1VEd/N4IX+cVavz9o=
github.com/Monibuca/plugin-jessica/v3 v3.0.0-20210807235919-48ac5fbec646 h1:wfge6Eakjoh+j6kRb8JlTazLWImWVbRqAVB/FlB4nHk=
github.com/Monibuca/plugin-jessica/v3 v3.0.0-20210807235919-48ac5fbec646/go.mod h1:ycVTGh96OWFjzFfK7ErMcxTgohNZwagHRDab0GkTIFU=
github.com/Monibuca/plugin-logrotate/v3 v3.0.0-20210710104346-3db68431dcab h1:s/yYXSOwXQxSdrPALlq8fHcdhtWnsM0RBPwAo2d+FOU=
@@ -25,10 +23,10 @@ github.com/Monibuca/plugin-record/v3 v3.0.0-20210813073316-79dce1e0dc70 h1:NO3NL
github.com/Monibuca/plugin-record/v3 v3.0.0-20210813073316-79dce1e0dc70/go.mod h1:CusWmmgSjE1rRaGO9O06LOvXSpKilfiFgRsUlYHvFq0=
github.com/Monibuca/plugin-rtmp/v3 v3.0.0-20210819063901-526f2917b16d h1:6NQ6KaQyvyS9e5ELmQzKF0gmGx0wzotsWpIqhe5X748=
github.com/Monibuca/plugin-rtmp/v3 v3.0.0-20210819063901-526f2917b16d/go.mod h1:dYR+AnljA8fGh29tmojgP1r+/MA+Bfwgpt2UsBD4wnM=
github.com/Monibuca/plugin-rtsp/v3 v3.0.0-20210808000722-f267b1ca527b h1:NXf3xctpa3AluaVINdJTwWkilgVYAzlHF9DMNrX6n84=
github.com/Monibuca/plugin-rtsp/v3 v3.0.0-20210808000722-f267b1ca527b/go.mod h1:jXXib77eJyWtddeZ46LSi/6l9n+E8OkvrqGMcPQGeZc=
github.com/Monibuca/plugin-summary v0.0.0-20210710132803-53cdcef14699 h1:XV+JSOS+iyJsnB+sTDWtxhIetOCa8fLOVFC2r3KcvoU=
github.com/Monibuca/plugin-summary v0.0.0-20210710132803-53cdcef14699/go.mod h1:1kiDXMF82y299q2+KKEeaKRpQFvVkiGAIGg8OhYk9Qk=
github.com/Monibuca/plugin-rtsp/v3 v3.0.0-20211011074050-bbd668796ef3 h1:u487yxglRQM1cahqwUzFDMgP8HJfY47mBDRuDOE0JTk=
github.com/Monibuca/plugin-rtsp/v3 v3.0.0-20211011074050-bbd668796ef3/go.mod h1:jXXib77eJyWtddeZ46LSi/6l9n+E8OkvrqGMcPQGeZc=
github.com/Monibuca/plugin-summary v0.0.0-20210821070131-2261e0efb7b9 h1:8JVquYo8PUQtc75vFa8ovPvsXSmU0N2twfD+8hOoZeM=
github.com/Monibuca/plugin-summary v0.0.0-20210821070131-2261e0efb7b9/go.mod h1:1kiDXMF82y299q2+KKEeaKRpQFvVkiGAIGg8OhYk9Qk=
github.com/Monibuca/plugin-ts/v3 v3.0.0-20210710125303-3fb5757b7c5b h1:rGxDDb1Evkdzgmdqm1x5MCw6QtkGr7N6mgOBHqxZNnU=
github.com/Monibuca/plugin-ts/v3 v3.0.0-20210710125303-3fb5757b7c5b/go.mod h1:S+sUqUbZTiRws/GHoxcVVQdhOcuUQUxoAGDeQOAgKw0=
github.com/Monibuca/plugin-webrtc/v3 v3.0.0-20210817013155-6993496f6d3c h1:oGhE96rMxGL55wf5qt1Fa89eJvgPpmZOjPFPzYL3zOw=

11
main.go
View File

@@ -30,18 +30,19 @@ import (
func main() {
addr := flag.String("c", "config.toml", "config file")
flag.Parse()
ctx, cancel := context.WithCancel(context.Background())
if _, err := os.Stat(*addr); err == nil {
Run(*addr)
Run(ctx, *addr)
} else {
Run(filepath.Join(filepath.Dir(os.Args[0]), *addr))
Run(ctx, filepath.Join(filepath.Dir(os.Args[0]), *addr))
}
waiter(context.Background())
waiter(cancel)
}
func waiter(ctx context.Context) {
func waiter(cancel context.CancelFunc) {
sigc := make(chan os.Signal, 1)
signal.Notify(sigc, syscall.SIGINT, syscall.SIGTERM)
defer signal.Stop(sigc)
<-sigc
ctx.Done()
cancel()
}