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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user