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

Unify the forwarding package start with the other, start it in a go routine

This commit is contained in:
Yohann D'ANELLO
2020-10-01 19:26:12 +02:00
parent 98d5c609a3
commit d7e104261f
3 changed files with 6 additions and 8 deletions

View File

@ -19,12 +19,12 @@ var (
ffmpegInputStreams = make(map[string]*io.WriteCloser)
)
// New Load configuration and initialize SRT channel
func New(c Options, channel chan srt.Packet) {
// Serve Load configuration and initialize SRT channel
func Serve(c Options, channel chan srt.Packet) {
cfg = c
forwardingChannel = channel
go waitForPackets()
log.Printf("Stream forwarding initialized")
waitForPackets()
}
func waitForPackets() {