Fix support Escam Q6 camera
This commit is contained in:
+6
-2
@@ -392,12 +392,16 @@ func (c *Conn) SetupMedia(
|
|||||||
// we send our `interleaved`, but camera can answer with another
|
// we send our `interleaved`, but camera can answer with another
|
||||||
|
|
||||||
// Transport: RTP/AVP/TCP;unicast;interleaved=10-11;ssrc=10117CB7
|
// Transport: RTP/AVP/TCP;unicast;interleaved=10-11;ssrc=10117CB7
|
||||||
// Transport: RTP/AVP/TCP;unicast;destination=192.168.1.123;source=192.168.10.12;interleaved=0
|
// Transport: RTP/AVP/TCP;unicast;destination=192.168.1.111;source=192.168.1.222;interleaved=0
|
||||||
// Transport: RTP/AVP/TCP;ssrc=22345682;interleaved=0-1
|
// Transport: RTP/AVP/TCP;ssrc=22345682;interleaved=0-1
|
||||||
s := res.Header.Get("Transport")
|
s := res.Header.Get("Transport")
|
||||||
// TODO: rewrite
|
// TODO: rewrite
|
||||||
if !strings.HasPrefix(s, "RTP/AVP/TCP;") {
|
if !strings.HasPrefix(s, "RTP/AVP/TCP;") {
|
||||||
return nil, fmt.Errorf("wrong transport: %s", s)
|
// Escam Q6 has a bug:
|
||||||
|
// Transport: RTP/AVP;unicast;destination=192.168.1.111;source=192.168.1.222;interleaved=0-1
|
||||||
|
if !strings.Contains(s, ";interleaved=") {
|
||||||
|
return nil, fmt.Errorf("wrong transport: %s", s)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
i := strings.Index(s, "interleaved=")
|
i := strings.Index(s, "interleaved=")
|
||||||
|
|||||||
Reference in New Issue
Block a user