mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2025-06-27 15:42:07 +02:00
Create config package and properly use Viper
This commit is contained in:
@ -16,6 +16,11 @@ type Options map[string][]string
|
||||
|
||||
// Serve handles incoming packets from SRT and forward them to other external services
|
||||
func Serve(inputChannel chan srt.Packet, cfg Options) {
|
||||
if len(cfg) < 1 {
|
||||
// No forwarding, ignore
|
||||
return
|
||||
}
|
||||
|
||||
log.Printf("Stream forwarding initialized")
|
||||
ffmpegInstances := make(map[string]*exec.Cmd)
|
||||
ffmpegInputStreams := make(map[string]*io.WriteCloser)
|
||||
|
Reference in New Issue
Block a user