mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2025-06-29 13:31:01 +02:00
Unify the forwarding package start with the other, start it in a go routine
This commit is contained in:
6
main.go
6
main.go
@ -93,15 +93,13 @@ func main() {
|
||||
// SRT channel, to propagate forwarding
|
||||
forwardingChannel := make(chan srt.Packet)
|
||||
|
||||
// Start stream, web and monitoring server
|
||||
// Start stream, web and monitoring server, and stream forwarding
|
||||
go forwarding.Serve(cfg.Forwarding, forwardingChannel)
|
||||
go monitoring.Serve(&cfg.Monitoring)
|
||||
go srt.Serve(&cfg.Srt, forwardingChannel)
|
||||
go web.Serve(remoteSdpChan, localSdpChan, &cfg.Web)
|
||||
go webrtc.Serve(remoteSdpChan, localSdpChan, &cfg.WebRTC)
|
||||
|
||||
// Configure stream forwarding
|
||||
forwarding.New(cfg.Forwarding, forwardingChannel)
|
||||
|
||||
// Wait for routines
|
||||
select {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user