From 6a475152d024116603a24246c3e249e6f650fb58 Mon Sep 17 00:00:00 2001 From: Saxon Milton Date: Wed, 25 Apr 2018 15:42:08 +0930 Subject: [PATCH] bad fix for now, reboot when buffer full --- RevidCLI.go | 2 +- revid/Revid.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RevidCLI.go b/RevidCLI.go index e59e82d6..e22b520d 100644 --- a/RevidCLI.go +++ b/RevidCLI.go @@ -71,7 +71,7 @@ const ( defaultRunDuration = 2 * 43200 noOfConfigconfigFlags = 19 revidStopTime = 5 - prepTime = 20 + prepTime = 10 loggerVerbosity = 4 ) diff --git a/revid/Revid.go b/revid/Revid.go index 9047c590..59330441 100644 --- a/revid/Revid.go +++ b/revid/Revid.go @@ -60,7 +60,7 @@ const ( mp2tPacketSize = 188 // MPEG-TS packet size mp2tMaxPackets = 2016 * clipDuration // # first multiple of 7 and 8 greater than 2000 ringBufferSize = 1000 - ringBufferElementSize = 100000 + ringBufferElementSize = 150000 httpTimeOut = 5 // s packetsPerFrame = 7 h264BufferSize = 1000000 @@ -308,6 +308,7 @@ func (r *revid) packClips() { var err error if clip, err = r.ringBuffer.Get(); err != nil { r.Log(Error, err.Error()) + r.reboot() r.Log(Warning, "Clearing output chan!") // Keep clearing output chan until out buffer has some space for clip, err = r.ringBuffer.Get(); err != nil; {