From dc1d09f8aec3d1db34a3a819b31822cfdabb94c9 Mon Sep 17 00:00:00 2001 From: Raul Vera Date: Fri, 10 Aug 2018 04:37:54 +0000 Subject: [PATCH] Separate the revid -t argument from the raspivid -t argument. --- revid/revid.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) mode change 100644 => 100755 revid/revid.go diff --git a/revid/revid.go b/revid/revid.go old mode 100644 new mode 100755 index d3109578..839a358b --- a/revid/revid.go +++ b/revid/revid.go @@ -68,6 +68,7 @@ const ( rtmpConnectionMaxTries = 5 raspividNoOfTries = 3 sendingWaitTime = 5 * time.Millisecond + runContinuously = "0" // -t arg to raspivid ) // Log Types @@ -101,9 +102,8 @@ type Revid struct { ns *netsender.Sender } -// NewRevid returns a pointer to a new Revid with the desired -// configuration, and/or an error if construction of the new instant was not -// successful. +// New returns a pointer to a new Revid with the desired configuration, and/or +// an error if construction of the new instance was not successful. func New(c Config, ns *netsender.Sender) (*Revid, error) { var r Revid err := r.reset(c) @@ -434,7 +434,7 @@ func (r *Revid) startRaspivid() error { "-cd", "H264", "-o", "-", "-n", - "-t", r.config.Timeout, + "-t", runContinuously, "-b", r.config.Bitrate, "-w", r.config.Width, "-h", r.config.Height, @@ -460,7 +460,7 @@ func (r *Revid) startRaspivid() error { "-cd", "MJPEG", "-o", "-", "-n", - "-t", r.config.Timeout, + "-t", runContinuously, "-fps", r.config.FrameRate, ) }