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

Create config package and properly use Viper

This commit is contained in:
Alexandre Iooss
2020-10-11 21:35:43 +02:00
parent de5a48ded7
commit df88fd9e99
6 changed files with 156 additions and 110 deletions

View File

@ -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)