Documentation
¶
Index ¶
- Constants
- func AbsoluteMove(ep ServiceEndpoints, user, pass, profileToken string, pan, tilt, zoom float64) error
- func AzimuthToPan(az float64) float64
- func DigestGet(rawURL, user, pass string) ([]byte, error)
- func DigestPost(rawURL, user, pass, contentType string, body []byte) ([]byte, error)
- func ElevationToTilt(el float64) float64
- func ExtractIPFromXAddr(xaddr string) string
- func FOVFromFocalLength(focalLengthMM, sensorWidthMM float64) float64
- func GetPTZStatus(ep ServiceEndpoints, user, pass, profileToken string) (pan, tilt, zoom float64, err error)
- func GetSnapshotURI(ep ServiceEndpoints, user, pass, profileToken string) (string, error)
- func GetStreamURI(ep ServiceEndpoints, user, pass, profileToken string) (string, error)
- func GetVideoSourceToken(ep ServiceEndpoints, user, pass string) (string, error)
- func IsVideoCodec(enc string) bool
- func PanToAzimuth(pan float64) float64
- func ParseXAddrsFromResponse(data string) []string
- func ProbeDevices(ctx context.Context, logger *slog.Logger) []string
- func TiltToElevation(tilt float64) float64
- type DeviceInfo
- type LensInfo
- type MediaProfile
- type ServiceEndpoints
Constants ¶
View Source
const SensorWidth1_2_8 = 5.04 // mm, 1/2.8" sensor (most common in security cameras)
View Source
const WsDiscoveryAddr = "239.255.255.250:3702"
Variables ¶
This section is empty.
Functions ¶
func AbsoluteMove ¶
func AbsoluteMove(ep ServiceEndpoints, user, pass, profileToken string, pan, tilt, zoom float64) error
func AzimuthToPan ¶
func DigestPost ¶
func ElevationToTilt ¶
func ExtractIPFromXAddr ¶
func FOVFromFocalLength ¶
func GetPTZStatus ¶
func GetPTZStatus(ep ServiceEndpoints, user, pass, profileToken string) (pan, tilt, zoom float64, err error)
func GetSnapshotURI ¶
func GetSnapshotURI(ep ServiceEndpoints, user, pass, profileToken string) (string, error)
func GetStreamURI ¶
func GetStreamURI(ep ServiceEndpoints, user, pass, profileToken string) (string, error)
func GetVideoSourceToken ¶
func GetVideoSourceToken(ep ServiceEndpoints, user, pass string) (string, error)
func IsVideoCodec ¶
func PanToAzimuth ¶
func ParseXAddrsFromResponse ¶
func TiltToElevation ¶
Types ¶
type DeviceInfo ¶
func GetDeviceInformation ¶
func GetDeviceInformation(ep ServiceEndpoints, user, pass string) (DeviceInfo, error)
type LensInfo ¶
type LensInfo struct {
FocalLengthMin float64 // mm, widest
FocalLengthMax float64 // mm, most zoomed
}
func GetLensInfo ¶
func GetLensInfo(ep ServiceEndpoints, user, pass, videoSourceToken string) (LensInfo, error)
type MediaProfile ¶
type MediaProfile struct {
Token string
Name string
Encoding string // e.g. "JPEG", "H264", "H265"
}
func GetProfiles ¶
func GetProfiles(ep ServiceEndpoints, user, pass string) ([]MediaProfile, error)
type ServiceEndpoints ¶
func DiscoverEndpoints ¶
func DiscoverEndpoints(host, user, pass string) (ServiceEndpoints, error)
Click to show internal directories.
Click to hide internal directories.