mirror of https://bitbucket.org/ausocean/av.git
Merged in raspivid-quality-fix (pull request #64)
raspivid stream quality fix Approved-by: kortschak <dan@kortschak.io>
This commit is contained in:
commit
4bf78b7e97
|
@ -458,6 +458,11 @@ func (r *Revid) startRaspivid() error {
|
|||
"-fps", r.config.FrameRate,
|
||||
)
|
||||
}
|
||||
d, err := strconv.Atoi(r.config.FrameRate)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
delay := time.Second / time.Duration(d)
|
||||
stdout, err := r.cmd.StdoutPipe()
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -469,7 +474,7 @@ func (r *Revid) startRaspivid() error {
|
|||
r.inputReader = stdout
|
||||
go func() {
|
||||
r.config.Logger.Log(smartlogger.Info, pkg+"reading camera data")
|
||||
r.lexTo(r.encoder, r.inputReader, 0)
|
||||
r.lexTo(r.encoder, r.inputReader, delay)
|
||||
r.config.Logger.Log(smartlogger.Info, pkg+"not trying to read from camera anymore")
|
||||
}()
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue