mirror of https://bitbucket.org/ausocean/av.git
Merged in http-fix (pull request #65)
Revid side HTTP fix Approved-by: Alan Noble <anoble@gmail.com>
This commit is contained in:
commit
9d5ba49b7c
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -472,11 +471,13 @@ func (r *Revid) startRaspivid() error {
|
|||
return err
|
||||
}
|
||||
r.inputReader = stdout
|
||||
go func() {
|
||||
|
||||
r.config.Logger.Log(smartlogger.Info, pkg+"reading camera data")
|
||||
r.lexTo(r.encoder, r.inputReader, delay)
|
||||
err = r.lexTo(r.encoder, r.inputReader, delay)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
r.config.Logger.Log(smartlogger.Info, pkg+"not trying to read from camera anymore")
|
||||
}()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue