推拉异常时关闭远程连接,发送首个音视频包采用绝对时间戳

This commit is contained in:
dexter
2023-01-18 21:14:54 +08:00
parent a0b55d5e1b
commit 95125b5560
3 changed files with 37 additions and 41 deletions

View File

@@ -7,7 +7,6 @@ import (
"io"
"net"
. "m7s.live/engine/v4"
"m7s.live/engine/v4/util"
)
@@ -43,37 +42,6 @@ const (
SEND_FULL_VDIEO_MESSAGE = "Send Full Video Message"
)
func newConnectResponseMessageData(objectEncoding float64) (amfobj map[string]any) {
amfobj = make(map[string]any)
amfobj["fmsVer"] = "monibuca/" + Engine.Version
amfobj["capabilities"] = 31
amfobj["mode"] = 1
amfobj["Author"] = "dexter"
amfobj["level"] = Level_Status
amfobj["code"] = NetConnection_Connect_Success
amfobj["objectEncoding"] = uint64(objectEncoding)
return
}
func newPublishResponseMessageData(streamid uint32, code, level string) (amfobj map[string]any) {
amfobj = make(map[string]any)
amfobj["code"] = code
amfobj["level"] = level
amfobj["streamid"] = streamid
return
}
func newPlayResponseMessageData(streamid uint32, code, level string) (amfobj map[string]any) {
amfobj = make(map[string]any)
amfobj["code"] = code
amfobj["level"] = level
amfobj["streamid"] = streamid
return
}
type NetConnection struct {
*bufio.Reader `json:"-"`
net.Conn `json:"-"`