go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

Adding onvif name and hardware in info field of onvif discovery

Open FIGIO55 opened this issue 1 month ago • 0 comments

I like the onvif discover functinality in the add section, but I wanted some device information. So I added code to extract the onvif://www.onvif.org/name and onvif://www.onvif.org/hardware fields from the onvif envelope and used it to populate the Info field already present in the api.Source object. To better present this change, I created the DiscoveryDevice type in pkg/onvif/helpers.go with the fields being:

type DiscoveryDevice struct {
	URL      string
	Name     string
	Hardware string
}

For clarity purposes, I also renamed the function DiscoveryStreamingURLs to DiscoveryStreamingDevices from the same package.

FIGIO55 avatar Dec 19 '25 14:12 FIGIO55