Documentation ¶
Index ¶
- Variables
- func GenFileName(dir string, format string) string
- func OnvifFunc(dev *onvif.Device, funcName string, value string) (ret string, err error)
- func SaveFrame(input string, outDir string, format string, frameCount int, frameInterval int) error
- func SaveVideo(inputFile string, outDir string, format string, frameCount int) error
- type OnvifClient
- type OnvifConfig
- type OnvifResources
- type Resource
Constants ¶
This section is empty.
Variables ¶
View Source
var IfSaveFrame bool
View Source
var IfSaveVideo bool
Functions ¶
func GenFileName ¶
GenFileName generate file name with current time. Formate f<year><month><day><hour><minute><second><millisecond>.<format>
Types ¶
type OnvifClient ¶
type OnvifClient struct { Client *onvif.Device Handler interface{} Config OnvifConfig }
OnvifClient is the structure for Onvif client.
func NewClient ¶
func NewClient(config OnvifConfig) (*OnvifClient, error)
NewClient allocate and return a Onvif client.
func (*OnvifClient) Get ¶
func (c *OnvifClient) Get(method, value string) (results string, err error)
Get get register.
func (*OnvifClient) GetStatus ¶
func (c *OnvifClient) GetStatus() string
GetStatus get device status. For the package onvif doesn't expose any http/connection function, we call the GetSystemDataAndTime function to get the connection status.
func (*OnvifClient) GetStream ¶
func (c *OnvifClient) GetStream() string
func (*OnvifClient) Set ¶
func (c *OnvifClient) Set(method, value string) (err error)
Set set register.
type OnvifConfig ¶
type OnvifConfig struct { Name string URL string User string Passwordfile string Certfile string RemoteCertfile string Keyfile string StreamURI string }
OnvifConfig is the structure for client configuration.
type OnvifResources ¶
func GetOnvifResources ¶
func GetOnvifResources() OnvifResources
GetOnvifResources get stream resources.
Click to show internal directories.
Click to hide internal directories.