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

Send SRT stream to WebRTC package

This commit is contained in:
Alexandre Iooss
2020-10-04 18:22:10 +02:00
parent 3bf27fb0b1
commit ad934516a9
4 changed files with 39 additions and 7 deletions

View File

@ -104,15 +104,16 @@ func main() {
remoteSdpChan := make(chan webrtc.SessionDescription)
localSdpChan := make(chan webrtc.SessionDescription)
// SRT channel for forwarding
// SRT channel for forwarding and webrtc
forwardingChannel := make(chan srt.Packet, 65536)
webrtcChannel := make(chan srt.Packet, 65536)
// 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, authBackend, forwardingChannel)
go srt.Serve(&cfg.Srt, authBackend, forwardingChannel, webrtcChannel)
go web.Serve(remoteSdpChan, localSdpChan, &cfg.Web)
go webrtc.Serve(remoteSdpChan, localSdpChan, &cfg.WebRTC)
go webrtc.Serve(remoteSdpChan, localSdpChan, webrtcChannel, &cfg.WebRTC)
// Wait for routines
select {}