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:
@ -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() {
|
||||
|
Reference in New Issue
Block a user