Documentation
¶
Index ¶
- type AudioEncoderConfig
- type Device
- func (device *Device) GetCapabilities() (DeviceCapabilities, error)
- func (device *Device) GetDiscoveryMode() (string, error)
- func (device *Device) GetHostname() (HostnameInformation, error)
- func (device *Device) GetImagingSettings(videoSourceToken string) (ImagingSettings, error)
- func (device *Device) GetInformation() (DeviceInformation, error)
- func (device *Device) GetNetworkInterfaces() (NetworkInterfaces, error)
- func (device Device) GetNetworkProtocols() ([]NetworkProtocol, error)
- func (device *Device) GetProfiles() ([]MediaProfile, error)
- func (device *Device) GetScopes() ([]string, error)
- func (device *Device) GetServices() (services []Service, err error)
- func (device *Device) GetStreamURI(profileToken, protocol string) (MediaURI, error)
- type DeviceCapabilities
- type DeviceInformation
- type ErrNewUnsupportedError
- type ErrOperationProhibited
- type Exposure20
- type FocusConfiguration20
- type FromDHCP
- type HostnameInformation
- type IPv4
- type IPv4Config
- type ImagingSettings
- type MediaBounds
- type MediaProfile
- type MediaSourceConfig
- type MediaURI
- type ModeAndLevel
- type NetworkCapabilities
- type NetworkInfo
- type NetworkInterfaces
- type NetworkProtocol
- type NetworkProtocolsResponse
- type OnvifErr
- type PTZConfig
- type SOAP
- type Service
- type Version
- type VideoEncoderConfig
- type VideoRateControl
- type WhiteBalance20
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioEncoderConfig ¶
type AudioEncoderConfig struct {
Name string
Token string
Encoding string
Bitrate int
SampleRate int
SessionTimeout string
}
AudioEncoderConfig contains configuration of an audio encoder
type Device ¶
type Device struct {
ID string
Name string
MACAddr string
XAddr string
User string
Password string
Services map[string]Service
}
Device contains data of ONVIF camera
func StartDiscovery ¶
StartDiscovery send a WS-Discovery message and wait for all matching device to respond
func (*Device) GetCapabilities ¶
func (device *Device) GetCapabilities() (DeviceCapabilities, error)
GetCapabilities fetch info of ONVIF camera's capabilities
func (*Device) GetDiscoveryMode ¶
GetDiscoveryMode fetch network discovery mode of an ONVIF camera
func (*Device) GetHostname ¶
func (device *Device) GetHostname() (HostnameInformation, error)
GetHostname fetch hostname of an ONVIF camera
func (*Device) GetImagingSettings ¶
func (device *Device) GetImagingSettings(videoSourceToken string) (ImagingSettings, error)
GetImagingSettings fetch the ImagingConfiguration for the requested VideoSource.
func (*Device) GetInformation ¶
func (device *Device) GetInformation() (DeviceInformation, error)
GetInformation fetch information of ONVIF camera
func (*Device) GetNetworkInterfaces ¶
func (device *Device) GetNetworkInterfaces() (NetworkInterfaces, error)
GetNetworkInterfaces fetches the Network Interfaces of an ONVIF camera
func (Device) GetNetworkProtocols ¶
func (device Device) GetNetworkProtocols() ([]NetworkProtocol, error)
GetNetworkProtocols fetches the network protocols that you can access the device on.
func (*Device) GetProfiles ¶
func (device *Device) GetProfiles() ([]MediaProfile, error)
GetProfiles fetch available media profiles of ONVIF camera
func (*Device) GetServices ¶
GetNetworkInterfaces fetches the Network Interfaces of an ONVIF camera
type DeviceCapabilities ¶
type DeviceCapabilities struct {
Network NetworkCapabilities
Events map[string]bool
Streaming map[string]bool
}
DeviceCapabilities contains capabilities of an ONVIF camera
type DeviceInformation ¶
type DeviceInformation struct {
FirmwareVersion string
HardwareID string
Manufacturer string
Model string
SerialNumber string
}
DeviceInformation contains information of ONVIF camera
type ErrNewUnsupportedError ¶
type ErrNewUnsupportedError OnvifErr
func NewUnsupportedError ¶
func NewUnsupportedError(subCode, detail string) ErrNewUnsupportedError
func (ErrNewUnsupportedError) Error ¶
func (e ErrNewUnsupportedError) Error() string
type ErrOperationProhibited ¶
type ErrOperationProhibited OnvifErr
func NewErrOperationProhibited ¶
func NewErrOperationProhibited(detail string) ErrOperationProhibited
func (ErrOperationProhibited) Error ¶
func (e ErrOperationProhibited) Error() string
type Exposure20 ¶
type Exposure20 struct {
Mode string `json:"Mode"`
Priority string `json:"Priority"`
MinExposureTime float64 `json:"MinExposureTime"`
MaxExposureTime float64 `json:"MaxExposureTime"`
MinGain float64 `json:"MinGain"`
MaxGain float64 `json:"MaxGain"`
MinIris float64 `json:"MinIris"`
MaxIris float64 `json:"MaxIris"`
ExposureTime float64 `json:"ExposureTime"`
Gain float64 `json:"Gain"`
Iris float64 `json:"Iris"`
}
type FocusConfiguration20 ¶
type HostnameInformation ¶
HostnameInformation contains hostname info of an ONVIF camera
type IPv4 ¶
type IPv4 struct {
Enabled string
IPv4Config IPv4Config `json:"Config"`
}
type IPv4Config ¶
type ImagingSettings ¶
type ImagingSettings struct {
BacklightCompensation ModeAndLevel
Brightness float64 `json:"Brightness"`
ColorSaturation float64 `json:"ColorSaturation"`
Contrast float64 `json:"Contrast"`
Exposure Exposure20
Focus FocusConfiguration20
IrCutFilter string `json:"IrCutFilter"`
Sharpness float64 `json:"Sharpness"`
WideDynamicRange ModeAndLevel
WhiteBalance WhiteBalance20
}
type MediaBounds ¶
MediaBounds contains resolution of a video media
type MediaProfile ¶
type MediaProfile struct {
Name string
Token string
VideoSourceConfig MediaSourceConfig
VideoEncoderConfig VideoEncoderConfig
AudioSourceConfig MediaSourceConfig
AudioEncoderConfig AudioEncoderConfig
PTZConfig PTZConfig
}
MediaProfile contains media profile of an ONVIF camera
type MediaSourceConfig ¶
type MediaSourceConfig struct {
Name string
Token string
SourceToken string
Bounds MediaBounds
}
MediaSourceConfig contains configuration of a media source
type ModeAndLevel ¶
type NetworkCapabilities ¶
NetworkCapabilities contains networking capabilities of ONVIF camera
type NetworkInfo ¶
type NetworkInfo struct {
HwAddress string
}
type NetworkInterfaces ¶
type NetworkInterfaces struct {
Enabled string
IPv4 IPv4
// IPv6 IPv6
Info NetworkInfo
}
type NetworkProtocol ¶
type NetworkProtocolsResponse ¶
type NetworkProtocolsResponse struct {
NetworkProtocols []networkProtocol `json:"NetworkProtocols"`
}
type VideoEncoderConfig ¶
type VideoEncoderConfig struct {
Name string
Token string
Encoding string
Quality int
RateControl VideoRateControl
Resolution MediaBounds
SessionTimeout string
}
VideoEncoderConfig contains configuration of a video encoder
type VideoRateControl ¶
VideoRateControl contains rate control of a video