mirror of
https://github.com/Monibuca/plugin-gb28181.git
synced 2026-04-23 00:17:13 +08:00
修改invte参数
This commit is contained in:
+2
-1
@@ -1,2 +1,3 @@
|
||||
node_modules
|
||||
.vscode
|
||||
.vscode
|
||||
.idea
|
||||
@@ -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
|
||||
|
||||
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user