1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-06-28 18:42:47 +02:00

WebRTC offers multiple quality

This commit is contained in:
Yohann D'ANELLO
2020-10-29 00:10:25 +01:00
parent 9e7e1ec0b8
commit 86dac0f929
7 changed files with 121 additions and 88 deletions

View File

@ -24,6 +24,17 @@ func handleStreamer(socket *srtgo.SrtSocket, streams *messaging.Streams, name st
socket.Close()
return
}
// Create sub-qualities
for _, qualityName := range []string{"audio", "480p", "360p", "240p"} {
_, err := stream.CreateQuality(qualityName)
if err != nil {
log.Printf("Error on quality creating: %s", err)
socket.Close()
return
}
}
log.Printf("New SRT streamer for stream '%s' quality 'source'", name)
// Read RTP packets forever and send them to the WebRTC Client