Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ThrottledEventListener ¶
type ThrottledEventListener interface {
WhenThrottled()
}
type ThrottledEventRecorder ¶
type ThrottledEventRecorder struct { }
uses the event api to record that video was throttled at a particular time.
func (ThrottledEventRecorder) WhenThrottled ¶
func (er ThrottledEventRecorder) WhenThrottled()
type ThrottledRecorder ¶
type ThrottledRecorder struct {
// contains filtered or unexported fields
}
ThrottledRecorder wraps a standard recorder so that it stops recording (ie gets throttled) if requested to record too often. This is desirable as the extra recordings are likely to be highly similar to the earlier recordings and contain no new information. It can happen when an animal is stuck in a trap or it is very windy.
func NewThrottledRecorder ¶
func NewThrottledRecorder( baseRecorder recorder.Recorder, config *config.ThermalThrottler, minSeconds int, eventListener ThrottledEventListener, camera cptvframe.CameraSpec, ) *ThrottledRecorder
func NewThrottledRecorderWithClock ¶
func NewThrottledRecorderWithClock( baseRecorder recorder.Recorder, config *config.ThermalThrottler, minSeconds int, listener ThrottledEventListener, clock ratelimit.Clock, camera cptvframe.CameraSpec, ) *ThrottledRecorder
func (*ThrottledRecorder) CheckCanRecord ¶
func (throttler *ThrottledRecorder) CheckCanRecord() error
func (*ThrottledRecorder) StartRecording ¶
func (throttler *ThrottledRecorder) StartRecording() error
func (*ThrottledRecorder) StopRecording ¶
func (throttler *ThrottledRecorder) StopRecording() (string, error)
func (*ThrottledRecorder) WriteFrame ¶
func (throttler *ThrottledRecorder) WriteFrame(frame *cptvframe.Frame) error
Click to show internal directories.
Click to hide internal directories.