Update joy4 dependency for increase RTMP client compatibility

This commit is contained in:
Ingo Oppermann
2022-09-14 14:52:41 +02:00
parent ff3aa3a635
commit 2e560b635d
4 changed files with 22 additions and 6 deletions

2
go.mod
View File

@@ -6,7 +6,7 @@ require (
github.com/99designs/gqlgen v0.17.16
github.com/atrox/haikunatorgo/v2 v2.0.1
github.com/datarhei/gosrt v0.2.1-0.20220817080252-d44df04a3845
github.com/datarhei/joy4 v0.0.0-20220728180719-f752080f4a36
github.com/datarhei/joy4 v0.0.0-20220914124903-6c0f2974f0ea
github.com/go-playground/validator/v10 v10.11.0
github.com/gobwas/glob v0.2.3
github.com/golang-jwt/jwt/v4 v4.4.2

4
go.sum
View File

@@ -76,8 +76,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/datarhei/gosrt v0.2.1-0.20220817080252-d44df04a3845 h1:nlVb4EVMwdVUwH6e10WZrx4lW0n2utnlE+4ILMPyD5o=
github.com/datarhei/gosrt v0.2.1-0.20220817080252-d44df04a3845/go.mod h1:wyoTu+DG45XRuCgEq/y+R8nhZCrJbOyQKn+SwNrNVZ8=
github.com/datarhei/joy4 v0.0.0-20220728180719-f752080f4a36 h1:ppjcv7wazy4d7vANREERXkSAUnhV/nfT2a+13u4ZijQ=
github.com/datarhei/joy4 v0.0.0-20220728180719-f752080f4a36/go.mod h1:Jcw/6jZDQQmPx8A7INEkXmuEF7E9jjBbSTfVSLwmiQw=
github.com/datarhei/joy4 v0.0.0-20220914124903-6c0f2974f0ea h1:qQw1AAJ1YC0HLMaTJzDxxTEYUG8dXVcx0dY0q1E1vnc=
github.com/datarhei/joy4 v0.0.0-20220914124903-6c0f2974f0ea/go.mod h1:Jcw/6jZDQQmPx8A7INEkXmuEF7E9jjBbSTfVSLwmiQw=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

View File

@@ -426,8 +426,14 @@ var CodecTypes = flv.CodecTypes
func (self *Conn) writeBasicConf() (err error) {
// > SetChunkSize
if err = self.writeSetChunkSize(1024 * 1024 * 128); err != nil {
return
if self.isserver {
if err = self.writeSetChunkSize(self.readMaxChunkSize); err != nil {
return
}
} else {
if err = self.writeSetChunkSize(1024 * 1024 * 1); err != nil {
return
}
}
// > WindowAckSize
if err = self.writeWindowAckSize(1024 * 1024 * 3); err != nil {
@@ -471,12 +477,17 @@ func (self *Conn) readConnect() (err error) {
if ok {
tcurl, _ = _tcurl.(string)
}
connectparams := self.commandobj
if err = self.writeBasicConf(); err != nil {
return
}
if err = self.flushWrite(); err != nil {
return
}
// > _result("NetConnection.Connect.Success")
if err = self.writeCommandMsg(3, 0, "_result", self.commandtransid,
flvio.AMFMap{
@@ -1180,6 +1191,7 @@ func (self *Conn) fillChunkHeader(b []byte, csid uint32, timestamp int32, msgtyp
if Debug {
fmt.Printf("rtmp: write chunk msgdatalen=%d msgsid=%d\n", msgdatalen, msgsid)
fmt.Print(hex.Dump(b[:msgdatalen]))
}
return
@@ -1568,6 +1580,10 @@ func (self *Conn) handleMsg(timestamp uint32, msgsid uint32, msgtypeid uint8, ms
}
self.readAckSize = pio.U32BE(self.msgdata)
return
default:
if Debug {
fmt.Printf("rtmp: unhandled msg: %d\n", msgtypeid)
}
}
self.gotmsg = true

2
vendor/modules.txt vendored
View File

@@ -53,7 +53,7 @@ github.com/datarhei/gosrt/internal/congestion
github.com/datarhei/gosrt/internal/crypto
github.com/datarhei/gosrt/internal/net
github.com/datarhei/gosrt/internal/packet
# github.com/datarhei/joy4 v0.0.0-20220728180719-f752080f4a36
# github.com/datarhei/joy4 v0.0.0-20220914124903-6c0f2974f0ea
## explicit; go 1.14
github.com/datarhei/joy4/av
github.com/datarhei/joy4/av/avutil