bad fix for now, reboot when buffer full

This commit is contained in:
Saxon Milton 2018-04-25 15:42:08 +09:30
parent 6efea26bc5
commit 6a475152d0
2 changed files with 3 additions and 2 deletions

View File

@ -71,7 +71,7 @@ const (
defaultRunDuration = 2 * 43200
noOfConfigconfigFlags = 19
revidStopTime = 5
prepTime = 20
prepTime = 10
loggerVerbosity = 4
)

View File

@ -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; {