1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-06-29 07:30:54 +02:00

Rename multicast to stream forwarding

This commit is contained in:
Alexandre Iooss
2020-09-30 15:07:36 +02:00
parent 6ba297bf96
commit 8f7384ba35
9 changed files with 33 additions and 43 deletions

12
main.go
View File

@ -3,13 +3,13 @@
package main
import (
"gitlab.crans.org/nounous/ghostream/stream/multicast"
"log"
"strings"
"github.com/spf13/viper"
"gitlab.crans.org/nounous/ghostream/auth"
"gitlab.crans.org/nounous/ghostream/internal/monitoring"
"gitlab.crans.org/nounous/ghostream/stream/forwarding"
"gitlab.crans.org/nounous/ghostream/stream/srt"
"gitlab.crans.org/nounous/ghostream/stream/webrtc"
"gitlab.crans.org/nounous/ghostream/web"
@ -58,7 +58,7 @@ func loadConfiguration() {
viper.SetDefault("WebRTC.MinPortUDP", 10000)
viper.SetDefault("WebRTC.MaxPortUDP", 10005)
viper.SetDefault("WebRTC.STUNServers", []string{"stun:stun.l.google.com:19302"})
viper.SetDefault("Multicast.Outputs", make(map[string][]string))
viper.SetDefault("Forwarding", make(map[string][]string))
// Copy STUN configuration to clients
viper.Set("Web.STUNServers", viper.Get("WebRTC.STUNServers"))
@ -69,8 +69,8 @@ func main() {
loadConfiguration()
cfg := struct {
Auth auth.Options
Forwarding forwarding.Options
Monitoring monitoring.Options
Multicast multicast.Options
Srt srt.Options
Web web.Options
WebRTC webrtc.Options
@ -96,10 +96,10 @@ func main() {
go web.Serve(remoteSdpChan, localSdpChan, &cfg.Web)
go webrtc.Serve(remoteSdpChan, localSdpChan, &cfg.WebRTC)
// Init multicast
err = multicast.New(&cfg.Multicast)
// Init stream forwarding
err = forwarding.New(&cfg.Forwarding)
if err != nil {
log.Fatalln("Failed to load multicast app:", err)
log.Fatalln("Failed to init stream forwarding:", err)
}
// Wait for routines