mirror of
https://github.com/kerberos-io/agent.git
synced 2026-09-06 17:28:34 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f133afb89 | ||
|
|
8da34a6a1a |
@@ -115,14 +115,22 @@ func RunAgent(configDirectory string, configuration *models.Configuration, commu
|
||||
// Establishing the camera connection without backchannel if no substream
|
||||
rtspUrl := config.Capture.IPCamera.RTSP
|
||||
rtspClient := captureDevice.SetMainClient(rtspUrl)
|
||||
|
||||
err := rtspClient.Connect(context.Background())
|
||||
if err != nil {
|
||||
log.Log.Error("components.Kerberos.RunAgent(): error connecting to RTSP stream: " + err.Error())
|
||||
rtspClient.Close()
|
||||
if rtspUrl != "" {
|
||||
err := rtspClient.Connect(context.Background())
|
||||
if err != nil {
|
||||
log.Log.Error("components.Kerberos.RunAgent(): error connecting to RTSP stream: " + err.Error())
|
||||
rtspClient.Close()
|
||||
rtspClient = nil
|
||||
time.Sleep(time.Second * 3)
|
||||
return status
|
||||
}
|
||||
} else {
|
||||
log.Log.Error("components.Kerberos.RunAgent(): no rtsp url found in config, please provide one.")
|
||||
rtspClient = nil
|
||||
time.Sleep(time.Second * 3)
|
||||
return status
|
||||
}
|
||||
|
||||
log.Log.Info("components.Kerberos.RunAgent(): opened RTSP stream: " + rtspUrl)
|
||||
|
||||
// Get the video streams from the RTSP server.
|
||||
|
||||
@@ -19,5 +19,5 @@ apps:
|
||||
plugs: [ network, network-bind ]
|
||||
parts:
|
||||
agent:
|
||||
source: https://github.com/kerberos-io/agent/releases/download/f739d52/agent-$SNAP_ARCH.tar
|
||||
plugin: dump
|
||||
source: https://github.com/kerberos-io/agent/releases/download/21c0e01/agent-amd64.tar
|
||||
plugin: dump
|
||||
Reference in New Issue
Block a user