修改invte参数

This commit is contained in:
langhuihui
2021-01-05 12:56:52 +08:00
parent 7c48ad044c
commit b1b0bf06f2
3 changed files with 4 additions and 6 deletions
+2 -1
View File
@@ -1,2 +1,3 @@
node_modules
.vscode
.vscode
.idea
+1 -1
View File
@@ -213,7 +213,7 @@ func (d *Device) Invite(channelIndex int, start, end string) int {
return 304
}
ssrc := "0200000001"
sdpInfo := []string{"v=0", fmt.Sprintf("o=%s 0 0 IN IP4 %s", d.Serial, d.SipIP), "s=Play", "c=IN IP4 " + d.SipIP, fmt.Sprintf("t=%s %s", start, end), fmt.Sprintf("m=video %d RTP/AVP 96 98 97", port), "a=recvonly", "a=rtpmap:96 PS/90000", "a=rtpmap:97 MPEG4/90000", "a=rtpmap:98 H264/90000", "y=" + ssrc}
sdpInfo := []string{"v=0", fmt.Sprintf("o=%s 0 0 IN IP4 %s", d.Serial, d.SipIP), "s=Play", "u=" + channel.DeviceID + ":0", "c=IN IP4 " + d.SipIP, fmt.Sprintf("t=%s %s", start, end), fmt.Sprintf("m=video %d RTP/AVP 96 97 98", port), "a=recvonly", "a=rtpmap:96 PS/90000", "a=rtpmap:97 MPEG4/90000", "a=rtpmap:98 H264/90000", "y=" + ssrc}
if start != "0" {
sdpInfo[2] = "s=Playback"
publisher.AutoUnPublish = true
+1 -4
View File
@@ -3,7 +3,6 @@ package gb28181
import (
"bytes"
"encoding/xml"
"io"
"log"
"math/rand"
"net"
@@ -183,9 +182,7 @@ func run() {
RecordList []*Record `xml:"RecordList>Item"`
}{}
decoder := xml.NewDecoder(bytes.NewReader([]byte(msg.Body)))
decoder.CharsetReader = func(c string, i io.Reader) (io.Reader, error) {
return charset.NewReaderLabel(c, i)
}
decoder.CharsetReader = charset.NewReaderLabel
decoder.Decode(temp)
switch temp.XMLName.Local {
case "Notify":