webrtc: start/stop ffmpeg procees if webrtc has clients
This commit is contained in:
1 parent
c228921237
commit
c5f77df6b0
2 files changed
+11
-3
No files matched your search
+2
-3
@@ -31,7 +31,7 @@ func main() {
|
||||
log.Println("Failed to parse log level, use default level: info")
|
||||
}
|
||||
|
||||
webrtc, err := rtc.InitListener(cfg.WebRtc.Host, cfg.WebRtc.VideoPort, 5006)
|
||||
webrtc, err := rtc.InitListener(cfg.WebRtc.Host, cfg.WebRtc.VideoPort, cfg.WebRtc.AudioPort)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
@@ -44,8 +44,7 @@ func main() {
|
||||
ustreamer.Start()
|
||||
//go ustreamer.Watch()
|
||||
} else if cfg.Stream.Source == config.StreamSourceH264 {
|
||||
v := ffmpeg.InitFFmpeg()
|
||||
v.Start()
|
||||
ffmpeg.InitFFmpeg()
|
||||
} else {
|
||||
log.Fatalf("unsupported stream source type: %v", cfg.Stream.Source)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user