Fix ONVIF library integration and improve stream discovery

- Fix ONVIF CallMethod response parsing (returns *http.Response, not structs)
- Add proper XML SOAP envelope parsing for GetProfiles and GetStreamUri
- Use correct types from xsd/onvif package (StreamType, TransportProtocol, ReferenceToken)
- Add strix binary to .gitignore
- Update configuration and API routes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
eduard256
2025-10-28 23:04:10 +03:00
parent f80f7ab314
commit bfade99c99
6 changed files with 190 additions and 12 deletions
+6 -1
View File
@@ -23,7 +23,7 @@ type Tester struct {
func NewTester(ffprobeTimeout time.Duration, logger interface{ Debug(string, ...any); Error(string, error, ...any) }) *Tester {
return &Tester{
httpClient: &http.Client{
Timeout: 10 * time.Second,
Timeout: 30 * time.Second,
},
ffprobeTimeout: ffprobeTimeout,
logger: logger,
@@ -265,6 +265,11 @@ func (t *Tester) testHTTP(ctx context.Context, streamURL, username, password str
// Try to probe with ffprobe for more details
t.probeHTTPVideo(ctx, streamURL, username, password, result)
case strings.Contains(contentType, "text/html"), strings.Contains(contentType, "text/plain"):
// Ignore web interfaces and plain text responses
result.Working = false
result.Error = "web interface, not a video stream"
default:
result.Type = "HTTP_UNKNOWN"
result.Working = true // Assume it works if we got 200 OK