diff --git a/revid/config.go b/revid/config.go index 0b73194d..ea00f392 100644 --- a/revid/config.go +++ b/revid/config.go @@ -99,7 +99,7 @@ const ( defaultFramesPerClip = 1 defaultVerticalFlip = No defaultHorizontalFlip = No - httpFramesPerClip = 25 + httpFramesPerClip = 7 defaultInputCodec = H264 defaultVerbosity = No ) diff --git a/revid/revid.go b/revid/revid.go index a951555c..968d01ff 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -31,7 +31,6 @@ package revid import ( "errors" - "fmt" "io" "os" "os/exec" @@ -116,13 +115,13 @@ type Revid struct { // an error if construction of the new instance was not successful. func New(c Config, ns *netsender.Sender) (*Revid, error) { var r Revid + r.ns = ns err := r.reset(c) if err != nil { return nil, err } r.ringBuffer = ring.NewBuffer(ringBufferSize, ringBufferElementSize, writeTimeout) r.outputChan = make(chan []byte, outputChanSize) - r.ns = ns return &r, nil } @@ -297,7 +296,6 @@ func (r *Revid) packClips() { // TODO: This is temporary, need to work out how to make this work // for cases when there is not packetisation. case frame := <-r.encoder.Stream(): - fmt.Println("got frame") lenOfFrame := len(frame) if lenOfFrame > ringBufferElementSize { r.config.Logger.Log(smartlogger.Warning, pkg+"frame was too big", "frame size", lenOfFrame) @@ -316,7 +314,6 @@ func (r *Revid) packClips() { packetCount++ clipSize += lenOfFrame if packetCount >= r.config.FramesPerClip { - fmt.Println("flushing buffer") r.ringBuffer.Flush() clipSize = 0 packetCount = 0 diff --git a/revid/senders.go b/revid/senders.go index c3d8b04d..38f7856a 100644 --- a/revid/senders.go +++ b/revid/senders.go @@ -29,7 +29,6 @@ LICENSE package revid import ( - "fmt" "io" "os" "os/exec" @@ -123,7 +122,6 @@ func (s *httpSender) load(c *ring.Chunk) error { func (s *httpSender) send() error { if s.chunk == nil { - fmt.Println("chunk is nil") // Do not retry with httpSender, // so just return without error // if the chunk has been cleared. @@ -135,7 +133,6 @@ func (s *httpSender) send() error { pins := netsender.MakePins(ip, "V") for i, pin := range pins { if pin.Name == "V0" { - fmt.Println("pin is V0") send = true pins[i].Value = s.chunk.Len() pins[i].Data = s.chunk.Bytes() @@ -145,7 +142,6 @@ func (s *httpSender) send() error { } var err error if send { - fmt.Println("sending") _, _, err = s.client.Send(netsender.RequestPoll, pins) } // We will not retry, so release