diff --git a/pkg/onvif/client.go b/pkg/onvif/client.go index d090baf3..090e9ef2 100644 --- a/pkg/onvif/client.go +++ b/pkg/onvif/client.go @@ -15,6 +15,8 @@ import ( "time" ) +const PathDevice = "/onvif/device_service" + type Client struct { url *url.URL diff --git a/pkg/onvif/helpers.go b/pkg/onvif/helpers.go index c5451c42..7925e1ec 100644 --- a/pkg/onvif/helpers.go +++ b/pkg/onvif/helpers.go @@ -9,10 +9,6 @@ import ( "time" ) -const ( - PathDevice = "/onvif/device_service" -) - func FindTagValue(b []byte, tag string) string { re := regexp.MustCompile(`<[^/>]*` + tag + `[^>]*>([^<]+)`) m := re.FindSubmatch(b) @@ -45,7 +41,7 @@ func DiscoveryStreamingURLs() ([]string, error) { - + diff --git a/pkg/onvif/server.go b/pkg/onvif/server.go index 3003efd7..f8f2883c 100644 --- a/pkg/onvif/server.go +++ b/pkg/onvif/server.go @@ -45,12 +45,12 @@ func GetRequestAction(b []byte) string { func GetCapabilitiesResponse(host string) string { return ` - - - - - http://` + host + `/onvif/device_service - + + + + + http://` + host + `/onvif/device_service + http://` + host + `/onvif/media_service @@ -59,9 +59,9 @@ func GetCapabilitiesResponse(host string) string { true - - - + + + ` }