Initial commit

This commit is contained in:
Alexey Khit
2022-08-18 09:19:00 +03:00
commit 3e77835583
65 changed files with 6372 additions and 0 deletions

28
cmd/streams/streams.go Normal file
View File

@@ -0,0 +1,28 @@
package streams
import (
"github.com/AlexxIT/go2rtc/cmd/app"
"github.com/rs/zerolog"
)
var Streams = map[string]*Stream{}
func Init() {
var cfg struct {
Mod map[string]interface{} `yaml:"streams"`
}
app.LoadConfig(&cfg)
log = app.GetLogger("streams")
for name, item := range cfg.Mod {
Streams[name] = newStream(item)
}
}
func Get(name string) *Stream {
return Streams[name]
}
var log zerolog.Logger