onvif

package
v1.9.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2025 License: MIT Imports: 15 Imported by: 0

README

Profiles

  • Profile A - For access control configuration
  • Profile C - For door control and event management
  • Profile S - For basic video streaming
    • Video streaming and configuration
  • Profile T - For advanced video streaming
    • H.264 / H.265 video compression
    • Imaging settings
    • Motion alarm and tampering events
    • Metadata streaming
    • Bi-directional audio

Services

https://www.onvif.org/profiles/specifications/

TMP

Dahua Reolink TP-Link
GetCapabilities no auth no auth no auth
GetServices no auth no auth no auth
GetServiceCapabilities no auth no auth auth
GetSystemDateAndTime no auth no auth no auth
GetNetworkInterfaces auth auth auth
GetDeviceInformation auth auth auth
GetProfiles auth auth auth
GetScopes auth auth auth
  • Dahua - onvif://192.168.10.90:80
  • Reolink - onvif://192.168.10.92:8000
  • TP-Link - onvif://192.168.10.91:2020/onvif/device_service

Documentation

Index

Constants

View Source
const (
	DeviceGetCapabilities          = "GetCapabilities"
	DeviceGetDeviceInformation     = "GetDeviceInformation"
	DeviceGetDiscoveryMode         = "GetDiscoveryMode"
	DeviceGetDNS                   = "GetDNS"
	DeviceGetHostname              = "GetHostname"
	DeviceGetNetworkDefaultGateway = "GetNetworkDefaultGateway"
	DeviceGetNetworkInterfaces     = "GetNetworkInterfaces"
	DeviceGetNetworkProtocols      = "GetNetworkProtocols"
	DeviceGetNTP                   = "GetNTP"
	DeviceGetScopes                = "GetScopes"
	DeviceGetServices              = "GetServices"
	DeviceGetSystemDateAndTime     = "GetSystemDateAndTime"
	DeviceSystemReboot             = "SystemReboot"
)
View Source
const (
	MediaGetAudioEncoderConfigurations = "GetAudioEncoderConfigurations"
	MediaGetAudioSources               = "GetAudioSources"
	MediaGetAudioSourceConfigurations  = "GetAudioSourceConfigurations"
	MediaGetProfile                    = "GetProfile"
	MediaGetProfiles                   = "GetProfiles"
	MediaGetSnapshotUri                = "GetSnapshotUri"
	MediaGetStreamUri                  = "GetStreamUri"
	MediaGetVideoEncoderConfigurations = "GetVideoEncoderConfigurations"
	MediaGetVideoSources               = "GetVideoSources"
	MediaGetVideoSourceConfiguration   = "GetVideoSourceConfiguration"
	MediaGetVideoSourceConfigurations  = "GetVideoSourceConfigurations"
)
View Source
const PathDevice = "/onvif/device_service"
View Source
const ServiceGetServiceCapabilities = "GetServiceCapabilities"

Variables

This section is empty.

Functions

func DiscoveryStreamingURLs

func DiscoveryStreamingURLs() ([]string, error)

func FindTagValue

func FindTagValue(b []byte, tag string) string

func GetCapabilitiesResponse

func GetCapabilitiesResponse(host string) []byte

func GetDeviceInformationResponse

func GetDeviceInformationResponse(manuf, model, firmware, serial string) []byte

func GetMediaServiceCapabilitiesResponse added in v1.9.8

func GetMediaServiceCapabilitiesResponse() []byte

func GetPosixTZ added in v1.9.8

func GetPosixTZ(current time.Time) string

func GetProfileResponse added in v1.9.8

func GetProfileResponse(name string) []byte

func GetProfilesResponse

func GetProfilesResponse(names []string) []byte

func GetRequestAction

func GetRequestAction(b []byte) string

func GetServicesResponse added in v1.9.8

func GetServicesResponse(host string) []byte

func GetSnapshotUriResponse added in v1.9.8

func GetSnapshotUriResponse(uri string) []byte

func GetStreamUriResponse

func GetStreamUriResponse(uri string) []byte

func GetSystemDateAndTimeResponse

func GetSystemDateAndTimeResponse() []byte

func GetVideoSourceConfigurationResponse added in v1.9.8

func GetVideoSourceConfigurationResponse(name string) []byte

func GetVideoSourceConfigurationsResponse added in v1.9.9

func GetVideoSourceConfigurationsResponse(names []string) []byte

func GetVideoSourcesResponse added in v1.9.8

func GetVideoSourcesResponse(names []string) []byte

func StaticResponse added in v1.9.8

func StaticResponse(operation string) []byte

func UUID

func UUID() string

UUID - generate something like 44302cbf-0d18-4feb-79b3-33b575263da3

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(rawURL string) (*Client, error)

func (*Client) DeviceRequest added in v1.9.8

func (c *Client) DeviceRequest(operation string) ([]byte, error)

func (*Client) GetName

func (c *Client) GetName() (string, error)

func (*Client) GetProfile added in v1.9.8

func (c *Client) GetProfile(token string) ([]byte, error)

func (*Client) GetProfilesTokens

func (c *Client) GetProfilesTokens() ([]string, error)

func (*Client) GetServiceCapabilities

func (c *Client) GetServiceCapabilities() ([]byte, error)

func (*Client) GetSnapshotUri

func (c *Client) GetSnapshotUri(token string) ([]byte, error)

func (*Client) GetStreamUri

func (c *Client) GetStreamUri(token string) ([]byte, error)

func (*Client) GetURI

func (c *Client) GetURI() (string, error)

func (*Client) GetVideoSourceConfiguration added in v1.9.8

func (c *Client) GetVideoSourceConfiguration(token string) ([]byte, error)

func (*Client) HasSnapshots

func (c *Client) HasSnapshots() bool

func (*Client) MediaRequest added in v1.9.8

func (c *Client) MediaRequest(operation string) ([]byte, error)

func (*Client) Request

func (c *Client) Request(url, body string) ([]byte, error)

type Envelope added in v1.9.8

type Envelope struct {
	// contains filtered or unexported fields
}

func NewEnvelope added in v1.9.8

func NewEnvelope() *Envelope

func NewEnvelopeWithUser added in v1.9.8

func NewEnvelopeWithUser(user *url.Userinfo) *Envelope

func (*Envelope) Append added in v1.9.8

func (e *Envelope) Append(args ...string)

func (*Envelope) Appendf added in v1.9.8

func (e *Envelope) Appendf(format string, args ...any)

func (*Envelope) Bytes added in v1.9.8

func (e *Envelope) Bytes() []byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL