Now that we want buffered senders (as required), the ringBuffer that was after the
lexer has been removed. Instead, we now have an ioext.multiWriterCloser to which the
lexer writes to. This then writes to the encoders, and then encoders write to each of
their own multiWriteClosers, which write to the appropriate senders. We now call
close on the first multiWriteCloser to close down the entired pipeline, as this close
call propogates through each level.
We have removed the outputClips routine as it's not required anymore to get data
from the revid ringBuffer, and have removed other things that were used by this, like
the IsRunning function.
We have also updated tests to work with these changes - they are passing.
The mtsSender now has a ringBuffer and tests have been updated accordingly. The mtsSender now uses an output routine to get data from it's ringBuffer to send.
Revid now uses ioext.multiWriteClosers for encoders to write to so that senders can be closed and therefore any output routines.
We are now using an io.multiWriter rather than the multiSender. Code has been updated inside revid.go to account for this change, and tests have also been updated accordingly. Tests for
the multiSender have been removed. A dummyMultiWriter has been written to inject our own multiWriter during testing.
Now that we're removing the concept of a loadSender, there is no need to have a minimalHttpSender (did not implement loadSender) and a httpSender (implemented loadSender). So we can now have
a single httpSender that implements io.Writer just like every other sender.
Added a Write method to senders such that they implement io.Writer. The multiSender now takes a slice of io.writers.
Also modified revid code and tests to account for this chance.
Started working on adding exposure, brightness, saturation and awb flags to revid-cli so that we can control raspivid parameters.
Updated revid logic to give these to raspivid and updated config to consider these parameters in config validation.
Send retry has been removed from the multiSender. This also means there is not need for the active func, because we simply wait until the send is complete or failed to exit the output clips
routine. Tests pertinent to retrying or the active function have been removed.
We wish to have a way to check that the 'owner' of the multi sender is still active while it may be doing continual send retries - therefore a function with bool return called active has been added
as a field to multiSender so that we can call this and check whether the owner of the multiSender is 'active' or not.
Added a retry field for the multiSender which will be used to decide whether to retry sending or not. This is being set true if we have a http sender and no other senders.
Errors captured from encoding are now sent to the error handler.
We also made multiSender smart so that during a write if sendRetry is on, we first check
that revid is actually running before attempting to send again. If revid is not running we return.
We also now log any send errors inside multiSender.