mirror of https://bitbucket.org/ausocean/av.git
revid/config/config.go: need to check frame rate here too as revid needs it
This commit is contained in:
parent
274f33e5b2
commit
cf130de752
|
@ -79,6 +79,7 @@ const (
|
|||
defaultCameraIP = "192.168.1.50"
|
||||
defaultBurstPeriod = 10 // Seconds
|
||||
defaultMinFrames = 100
|
||||
defaultFrameRate = 25
|
||||
defaultClipDuration = 0
|
||||
defaultAudioInputCodec = codecutil.ADPCM
|
||||
|
||||
|
@ -334,6 +335,13 @@ func (c *Config) Validate() error {
|
|||
return errors.New("refresh period is less than 0")
|
||||
}
|
||||
|
||||
if c.FrameRate == 0 {
|
||||
c.Logger.Log(logger.Info, pkg+"no frame rate defined, defaulting", "FrameRate", defaultFrameRate)
|
||||
c.FrameRate = defaultFrameRate
|
||||
} else if c.FrameRate < 0 {
|
||||
return errors.New("frame rate less than 0")
|
||||
}
|
||||
|
||||
if c.ClipDuration == 0 {
|
||||
c.Logger.Log(logger.Info, pkg+"no clip duration defined, defaulting", "ClipDuration", defaultClipDuration)
|
||||
c.ClipDuration = defaultClipDuration
|
||||
|
|
Loading…
Reference in New Issue