mirror of https://bitbucket.org/ausocean/av.git
Hopefully fixed rtmp can't connect problem!
This commit is contained in:
parent
dd45568354
commit
41f7b3afb7
|
@ -327,6 +327,12 @@ func (r *revidInst) packClips() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func reboot() {
|
||||||
|
cmd := exec.Command("sudo", "reboot")
|
||||||
|
err := cmd.Run()
|
||||||
|
fmt.Println("Rebooting!")
|
||||||
|
}
|
||||||
|
|
||||||
// outputClips takes the clips produced in the packClips method and outputs them
|
// outputClips takes the clips produced in the packClips method and outputs them
|
||||||
// to the desired output defined in the revidInst config
|
// to the desired output defined in the revidInst config
|
||||||
func (r *revidInst) outputClips() {
|
func (r *revidInst) outputClips() {
|
||||||
|
@ -352,6 +358,9 @@ func (r *revidInst) outputClips() {
|
||||||
bytes += len(clip)
|
bytes += len(clip)
|
||||||
for err := r.sendClip(clip); err != nil; {
|
for err := r.sendClip(clip); err != nil; {
|
||||||
r.Log(Error, err.Error())
|
r.Log(Error, err.Error())
|
||||||
|
if sendClip == sendClipToLibRtmp {
|
||||||
|
reboot()
|
||||||
|
}
|
||||||
if len(clip) >= 11 {
|
if len(clip) >= 11 {
|
||||||
r.Log(Warning, "Send failed trying again!")
|
r.Log(Warning, "Send failed trying again!")
|
||||||
err = r.sendClip(clip)
|
err = r.sendClip(clip)
|
||||||
|
|
Loading…
Reference in New Issue