Finished commenting, now I can think about only testing

This commit is contained in:
Saxon Milton 2018-01-31 10:53:09 +10:30
parent 3738659eae
commit 535d898a3c
1 changed files with 9 additions and 14 deletions

View File

@ -348,21 +348,21 @@ func (r *revidInst)readCamera() {
r.Log(Info, "Out of reading routine!")
}
// Stop
// Stop halts any processing of video
func (r *revidInst) Stop() {
if r.isRunning {
r.Log(Info, "Stopping revid!")
r.isRunning = false
r.cmd.Process.Kill()
if r.cmd != nil {
r.cmd.Process.Kill()
}
} else {
r.Log(Warning, "revidInst.Stop() called but revid not running!")
}
}
/*
New returns a pointer to a newly allocated RingBuffer with the parameters specified.
It initialises fields and allocates the required dataMemory.
*/
// packClips takes data segments; whether that be tsPackets or jpeg frames and
// packs them into clips 1s long.
func (r *revidInst) packClips() {
clipSize := 0
packetCount := 0
@ -421,10 +421,8 @@ func (r *revidInst) packClips() {
}
}
/*
New returns a pointer to a newly allocated RingBuffer with the parameters specified.
It initialises fields and allocates the required dataMemory.
*/
// outputClips takes the clips produced in the packClips method and outputs them
// to the desired output defined in the revidInst config
func (r *revidInst) outputClips() {
now := time.Now()
prevTime := now
@ -469,10 +467,7 @@ func (r *revidInst) outputClips() {
}
}
/*
New returns a pointer to a newly allocated RingBuffer with the parameters specified.
It initialises fields and allocates the required dataMemory.
*/
// sendClipToHTTP takes a clip and an output url and posts through http.
func (r *revidInst) sendClipToHTTP(clip []byte, output string) error {
timeout := time.Duration(httpTimeOut * time.Second)
client := http.Client{