mirror of https://bitbucket.org/ausocean/av.git
Merged in argTweak (pull request #42)
Separate the revid -t argument from the raspivid -t argument. Approved-by: Alan Noble <anoble@gmail.com>
This commit is contained in:
commit
e3fbe17ba2
|
@ -68,6 +68,7 @@ const (
|
||||||
rtmpConnectionMaxTries = 5
|
rtmpConnectionMaxTries = 5
|
||||||
raspividNoOfTries = 3
|
raspividNoOfTries = 3
|
||||||
sendingWaitTime = 5 * time.Millisecond
|
sendingWaitTime = 5 * time.Millisecond
|
||||||
|
runContinuously = "0" // -t arg to raspivid
|
||||||
)
|
)
|
||||||
|
|
||||||
// Log Types
|
// Log Types
|
||||||
|
@ -101,9 +102,8 @@ type Revid struct {
|
||||||
ns *netsender.Sender
|
ns *netsender.Sender
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewRevid returns a pointer to a new Revid with the desired
|
// New returns a pointer to a new Revid with the desired configuration, and/or
|
||||||
// configuration, and/or an error if construction of the new instant was not
|
// an error if construction of the new instance was not successful.
|
||||||
// successful.
|
|
||||||
func New(c Config, ns *netsender.Sender) (*Revid, error) {
|
func New(c Config, ns *netsender.Sender) (*Revid, error) {
|
||||||
var r Revid
|
var r Revid
|
||||||
err := r.reset(c)
|
err := r.reset(c)
|
||||||
|
@ -434,7 +434,7 @@ func (r *Revid) startRaspivid() error {
|
||||||
"-cd", "H264",
|
"-cd", "H264",
|
||||||
"-o", "-",
|
"-o", "-",
|
||||||
"-n",
|
"-n",
|
||||||
"-t", r.config.Timeout,
|
"-t", runContinuously,
|
||||||
"-b", r.config.Bitrate,
|
"-b", r.config.Bitrate,
|
||||||
"-w", r.config.Width,
|
"-w", r.config.Width,
|
||||||
"-h", r.config.Height,
|
"-h", r.config.Height,
|
||||||
|
@ -460,7 +460,7 @@ func (r *Revid) startRaspivid() error {
|
||||||
"-cd", "MJPEG",
|
"-cd", "MJPEG",
|
||||||
"-o", "-",
|
"-o", "-",
|
||||||
"-n",
|
"-n",
|
||||||
"-t", r.config.Timeout,
|
"-t", runContinuously,
|
||||||
"-fps", r.config.FrameRate,
|
"-fps", r.config.FrameRate,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue