diff --git a/cmd/revid-cli/main.go b/cmd/revid-cli/main.go index fe7baaaa..a228312e 100644 --- a/cmd/revid-cli/main.go +++ b/cmd/revid-cli/main.go @@ -1,6 +1,6 @@ /* NAME - RevidCLI.go + revid-cli - command line interface for Revid. DESCRIPTION See Readme.md @@ -10,7 +10,7 @@ AUTHORS Jack Richardson LICENSE - RevidCLI.go is Copyright (C) 2017-2018 the Australian Ocean Lab (AusOcean) + revid-cli is Copyright (C) 2017-2018 the Australian Ocean Lab (AusOcean) It is free software: you can redistribute it and/or modify them under the terms of the GNU General Public License as published by the @@ -80,7 +80,6 @@ const ( netSendRetryTime = 5 * time.Second defaultRunDuration = 24 * time.Hour revidStopTime = 5 * time.Second - prepTime = 20 * time.Second ) // Globals diff --git a/revid/revid.go b/revid/revid.go index 86b42afa..8ae5388b 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -42,8 +42,8 @@ import ( "bitbucket.org/ausocean/av/generator" "bitbucket.org/ausocean/av/parser" "bitbucket.org/ausocean/av/rtmp" - "bitbucket.org/ausocean/utils/ring" "bitbucket.org/ausocean/iot/pi/netsender" + "bitbucket.org/ausocean/utils/ring" ) // Misc constants @@ -117,7 +117,7 @@ func New(c Config, ns *netsender.Sender) (*Revid, error) { return &r, nil } -// Bitrate returns the resbult of the most recent bitrate check. +// Bitrate returns the result of the most recent bitrate check. func (r *Revid) Bitrate() int { return r.bitrate } @@ -235,18 +235,18 @@ func (r *Revid) Start() { r.Log(Warning, "Revid.Start() called but revid already running!") return } - r.Log(Info, "Starting Revid!") - r.Log(Debug, "Setting up output!") + r.Log(Info, "Starting Revid") + r.Log(Debug, "Setting up output") r.isRunning = true - r.Log(Info, "Starting output routine!") + r.Log(Info, "Starting output routine") go r.outputClips() - r.Log(Info, "Starting clip packing routine!") + r.Log(Info, "Starting clip packing routine") go r.packClips() - r.Log(Info, "Starting packetisation generator!") + r.Log(Info, "Starting packetisation generator") r.generator.Start() - r.Log(Info, "Starting parser!") + r.Log(Info, "Starting parser") r.parser.Start() - r.Log(Info, "Setting up input and receiving content!") + r.Log(Info, "Setting up input and receiving content") go r.setupInput() } diff --git a/revid/senders.go b/revid/senders.go index 68b5e940..eb1dd371 100644 --- a/revid/senders.go +++ b/revid/senders.go @@ -119,7 +119,7 @@ func (s *httpSender) load(c *ring.Chunk) error { return nil } -func (s *httpSender) send() (err error) { +func (s *httpSender) send() error { if s.chunk == nil { // Do not retry with httpSender, // so just return without error @@ -139,6 +139,7 @@ func (s *httpSender) send() (err error) { break } } + var err error if send { _, _, err = s.client.Send(netsender.RequestPoll, pins) }