mirror of https://bitbucket.org/ausocean/av.git
Think it's ready for testing
This commit is contained in:
parent
a07953042c
commit
7572968ad3
|
@ -59,10 +59,6 @@ const (
|
|||
clipDuration = 1 // s
|
||||
mp2tPacketSize = 188 // MPEG-TS packet size
|
||||
mp2tMaxPackets = 2016 * clipDuration // # first multiple of 7 and 8 greater than 2000
|
||||
udpPackets = 7 // # of UDP packets per ethernet frame (8 is the max)
|
||||
rtpPackets = 7 // # of RTP packets per ethernet frame (7 is the max)
|
||||
rtpHeaderSize = 12
|
||||
rtpSSRC = 1 // any value will do
|
||||
bufferSize = 100 / clipDuration
|
||||
httpTimeOut = 5 // s
|
||||
packetsPerFrame = 7
|
||||
|
@ -214,7 +210,7 @@ func (r *revidInst) ChangeState(config Config) error {
|
|||
case H264:
|
||||
case Mjpeg:
|
||||
case NothingDefined:
|
||||
r.Log(Warning,"No input codec defined, defaulting to h264!")
|
||||
r.Log(Warning, "No input codec defined, defaulting to h264!")
|
||||
config.InputCodec = H264
|
||||
default:
|
||||
return errors.New("Bad input codec defined in config!")
|
||||
|
@ -269,14 +265,13 @@ func (r *revidInst) ChangeState(config Config) error {
|
|||
}
|
||||
|
||||
// Log takes a logtype and message and tries to send this information to the
|
||||
// logger provided in the revidInst config, if there is one, otherwise an
|
||||
// error is returned.
|
||||
func (r *revidInst) Log(logType, m string) error {
|
||||
// logger provided in the revidInst config - if there is one, otherwise the message
|
||||
// is sent to stdout
|
||||
func (r *revidInst) Log(logType, m string) {
|
||||
if r.config.Logger != nil {
|
||||
r.config.Logger.Log(logType, m)
|
||||
return nil
|
||||
} else {
|
||||
return errors.New("No logger was defined in config for this instance!")
|
||||
fmt.Println(logType + ": " + m)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -293,6 +288,7 @@ func (r *revidInst) Start() {
|
|||
return
|
||||
}
|
||||
r.Log(Info, "Starting Revid!")
|
||||
|
||||
switch r.config.Input {
|
||||
case raspivid:
|
||||
r.Log(Info, "Starting raspivid!")
|
||||
|
@ -365,7 +361,7 @@ func (r *revidInst) readCamera() {
|
|||
r.Log(Info, "Out of reading routine!")
|
||||
}
|
||||
|
||||
// Stop halts any processing of video
|
||||
// Stop halts any processing of video data from a camera
|
||||
func (r *revidInst) Stop() {
|
||||
if r.isRunning {
|
||||
r.Log(Info, "Stopping revid!")
|
||||
|
|
Loading…
Reference in New Issue