Documentation ¶
Index ¶
- type MotionDetector
- func (md *MotionDetector) AddStartMotionCallback(cameraID string, callback func(string, string))
- func (md *MotionDetector) AddStopMotionCallback(cameraID string, callback func(string, string))
- func (md *MotionDetector) RemoveStartMotionCallback(cameraID string)
- func (md *MotionDetector) RemoveStopMotionCallback(cameraID string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MotionDetector ¶
type MotionDetector struct {
// contains filtered or unexported fields
}
MotionDetector manages the callbacks for start and stop events.
func DetectMotion ¶
func DetectMotion(motionlog string) (*MotionDetector, error)
DetectMotion starts monitoring the specified motion.log file for motion start and stop events. DetectMotion will return an error if the specified file does not exist. Call AddStartMotionCallback or AddStopMotionCallback to setup callback methods for each camera ID to monitor.
func (*MotionDetector) AddStartMotionCallback ¶
func (md *MotionDetector) AddStartMotionCallback(cameraID string, callback func(string, string))
AddStartMotionCallback adds the specified callback for 'start' motion events.
func (*MotionDetector) AddStopMotionCallback ¶
func (md *MotionDetector) AddStopMotionCallback(cameraID string, callback func(string, string))
AddStopMotionCallback adds the specified callback for 'stop' motion events.
func (*MotionDetector) RemoveStartMotionCallback ¶
func (md *MotionDetector) RemoveStartMotionCallback(cameraID string)
RemoveStartMotionCallback removes the specified callback for 'start' motion events.
func (*MotionDetector) RemoveStopMotionCallback ¶
func (md *MotionDetector) RemoveStopMotionCallback(cameraID string)
RemoveStopMotionCallback removes the specified callback for 'start' motion events.