1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-06-29 13:31:01 +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

@ -43,7 +43,7 @@ func splitHostPort(hostport string) (string, uint16) {
}
// Serve SRT server
func Serve(cfg *Options, authBackend auth.Backend, forwardingChannel chan Packet) {
func Serve(cfg *Options, authBackend auth.Backend, forwardingChannel, webrtcChannel chan Packet) {
// Start SRT in listening mode
log.Printf("SRT server listening on %s", cfg.ListenAddress)
host, port := splitHostPort(cfg.ListenAddress)
@ -82,7 +82,7 @@ func Serve(cfg *Options, authBackend auth.Backend, forwardingChannel chan Packet
}
}
go handleStreamer(s, name, &clientDataChannels, forwardingChannel)
go handleStreamer(s, name, &clientDataChannels, forwardingChannel, webrtcChannel)
} else {
// password was not provided so it is a viewer
name := split[0]