mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-09-27 05:35:57 +08:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
07a34d2642 | ||
![]() |
7dca6c9411 | ||
![]() |
eddbb35136 |
10
go.mod
10
go.mod
@@ -3,20 +3,22 @@ module github.com/langhuihui/monibuca
|
||||
go 1.16
|
||||
|
||||
require (
|
||||
github.com/Monibuca/engine/v3 v3.3.6
|
||||
github.com/Monibuca/plugin-gateway/v3 v3.0.0-20210822074036-b8c3fa9424cd
|
||||
github.com/Monibuca/plugin-gb28181/v3 v3.0.0-20210825014341-4e25222df81e
|
||||
github.com/Monibuca/engine/v3 v3.3.9
|
||||
github.com/Monibuca/plugin-gateway/v3 v3.0.0-20211019071855-0dcd7beaae5b
|
||||
github.com/Monibuca/plugin-gb28181/v3 v3.0.0-20211031030004-75b1890e20d3
|
||||
github.com/Monibuca/plugin-hdl/v3 v3.0.0-20210807135828-9d98f5b8dd6c
|
||||
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-rtsp/v3 v3.0.0-20211014020055-a331359e972f
|
||||
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/plugin-gateway/v3 => ../plugin-gateway
|
||||
|
||||
// replace github.com/Monibuca/engine/v3 => ../engine
|
||||
// replace github.com/Monibuca/plugin-summary => ../plugin-summary
|
||||
|
43
go.sum
43
go.sum
@@ -5,26 +5,21 @@ 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/engine/v3 v3.3.4 h1:bTCWxx5qnyt9a6+mZo/5fu0PmbyFF//NAt0bmM6D+hU=
|
||||
github.com/Monibuca/engine/v3 v3.3.4/go.mod h1:odyqD/VTQDN4qgzajsgn7kW7MWDIzTHt+j+BcI8i+4g=
|
||||
github.com/Monibuca/engine/v3 v3.3.6 h1:5mWkfl4HJEymj3IHnGSqx3hpHvSFRlIizsQyH6A3EFQ=
|
||||
github.com/Monibuca/engine/v3 v3.3.6/go.mod h1:odyqD/VTQDN4qgzajsgn7kW7MWDIzTHt+j+BcI8i+4g=
|
||||
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-gateway/v3 v3.0.0-20210822074036-b8c3fa9424cd h1:XJyUxnGW/4BODj8vzeDPGjqjWBuEF6qXdhP7ayxwpLc=
|
||||
github.com/Monibuca/plugin-gateway/v3 v3.0.0-20210822074036-b8c3fa9424cd/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/plugin-gb28181/v3 v3.0.0-20210822073246-2f7a6e617d01 h1:rbmlC/fCkAmfel94gR1YJowpdYZIX/ZCGae4DM2PpO4=
|
||||
github.com/Monibuca/plugin-gb28181/v3 v3.0.0-20210822073246-2f7a6e617d01/go.mod h1:WvMoRJ8SfGctwtx/9jvY6s5FPJanJSxtfW3+A1TR1E0=
|
||||
github.com/Monibuca/plugin-gb28181/v3 v3.0.0-20210825014341-4e25222df81e h1:+4oSbhw4/FOAK/NaVLtLxljPLqZx3Q6cJrpAM61Yc4A=
|
||||
github.com/Monibuca/plugin-gb28181/v3 v3.0.0-20210825014341-4e25222df81e/go.mod h1:WvMoRJ8SfGctwtx/9jvY6s5FPJanJSxtfW3+A1TR1E0=
|
||||
github.com/Monibuca/engine/v3 v3.3.7/go.mod h1:odyqD/VTQDN4qgzajsgn7kW7MWDIzTHt+j+BcI8i+4g=
|
||||
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/engine/v3 v3.3.9 h1:s/jH+z845DhBsLlwt247xbQkhaba4oWGZLKjPUjEmvE=
|
||||
github.com/Monibuca/engine/v3 v3.3.9/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-gateway/v3 v3.0.0-20211019071855-0dcd7beaae5b h1:E53fkYCIhHDORcJXR1FyymPLWJJDUh6K8q254etoTjY=
|
||||
github.com/Monibuca/plugin-gateway/v3 v3.0.0-20211019071855-0dcd7beaae5b/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-gb28181/v3 v3.0.0-20211031030004-75b1890e20d3 h1:22CLVwPLsltJ11TIpA/3KDUuK4TNrfgNTRRn61jP6NA=
|
||||
github.com/Monibuca/plugin-gb28181/v3 v3.0.0-20211031030004-75b1890e20d3/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=
|
||||
@@ -35,10 +30,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-rtsp/v3 v3.0.0-20211014020055-a331359e972f h1:0dwVQMy57iLVP5KjM/40Hv4FVnKKShF3VLduP69ByP8=
|
||||
github.com/Monibuca/plugin-rtsp/v3 v3.0.0-20211014020055-a331359e972f/go.mod h1:2yz/4W/CxaOPKVeOjnsd1EBbpfzrA6S1BccopnqM6vc=
|
||||
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=
|
||||
@@ -134,6 +129,8 @@ github.com/pion/rtcp v1.2.6/go.mod h1:52rMNPWFsjr39z9B9MhnkqhPLoeHTv1aN63o/42bWE
|
||||
github.com/pion/rtp v1.6.2/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
|
||||
github.com/pion/rtp v1.6.5 h1:o2cZf8OascA5HF/b0PAbTxRKvOWxTQxWYt7SlToxFGI=
|
||||
github.com/pion/rtp v1.6.5/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
|
||||
github.com/pion/rtp v1.7.2 h1:HCDKDCixh7PVjkQTsqHAbk1lg+bx059EHxcnyl42dYs=
|
||||
github.com/pion/rtp v1.7.2/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
|
||||
github.com/pion/sctp v1.7.10/go.mod h1:EhpTUQu1/lcK3xI+eriS6/96fWetHGCvBi9MSsnaBN0=
|
||||
github.com/pion/sctp v1.7.12 h1:GsatLufywVruXbZZT1CKg+Jr8ZTkwiPnmUC/oO9+uuY=
|
||||
github.com/pion/sctp v1.7.12/go.mod h1:xFe9cLMZ5Vj6eOzpyiKjT9SwGM4KpK/8Jbw5//jc+0s=
|
||||
@@ -226,6 +223,8 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069 h1:siQdpVirKtzPhKl3lZWozZraCFObP8S1v6PRp0bLrtU=
|
||||
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211013075003-97ac67df715c h1:taxlMj0D/1sOAuv/CbSD+MMDof2vbyPTqz5FNYKpXt8=
|
||||
golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
11
main.go
11
main.go
@@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user