Merge branch 'rtmpOutputFunctionality' of https://bitbucket.org/ausocean/av into rtmpOutputFunctionality

This commit is contained in:
saxon.milton@gmail.com 2018-03-14 08:30:43 +10:30
commit bf78218787
1 changed files with 7 additions and 3 deletions

View File

@ -60,7 +60,7 @@ const (
mp2tPacketSize = 188 // MPEG-TS packet size mp2tPacketSize = 188 // MPEG-TS packet size
mp2tMaxPackets = 2016 * clipDuration // # first multiple of 7 and 8 greater than 2000 mp2tMaxPackets = 2016 * clipDuration // # first multiple of 7 and 8 greater than 2000
ringBufferSize = 10000 ringBufferSize = 10000
ringBufferElementSize = 100000 ringBufferElementSize = 10000
maxClipSize = 10000 maxClipSize = 10000
httpTimeOut = 5 // s httpTimeOut = 5 // s
packetsPerFrame = 7 packetsPerFrame = 7
@ -315,7 +315,11 @@ func (r *revidInst) outputClips() {
for r.isRunning { for r.isRunning {
// Here we slow things down as much as we can to decrease cpu usage // Here we slow things down as much as we can to decrease cpu usage
switch { switch {
<<<<<<< HEAD
case r.ringBuffer.GetNoOfElements() < 200: case r.ringBuffer.GetNoOfElements() < 200:
=======
case r.ringBuffer.GetNoOfElements() < 2:
>>>>>>> 2eae228d739eec6c71ac204250b980cc1c158a91
delay++ delay++
time.Sleep(time.Duration(delay) * time.Millisecond) time.Sleep(time.Duration(delay) * time.Millisecond)
case delay > 0: case delay > 0:
@ -461,8 +465,8 @@ func (r *revidInst) setupInputForRaspivid() error {
"-o", "-", "-o", "-",
"-n", "-n",
"-t", r.config.Timeout, "-t", r.config.Timeout,
"-b", r.config.Bitrate, "-b", 10000,
"-qp", r.config.Quantization, //"-qp", r.config.Quantization,
"-w", r.config.Width, "-w", r.config.Width,
"-h", r.config.Height, "-h", r.config.Height,
"-fps", r.config.FrameRate, "-fps", r.config.FrameRate,