mirror of
https://github.com/bluenviron/mediamtx
synced 2024-12-27 00:52:09 +00:00
update gortsplib
This commit is contained in:
parent
6bf42d857a
commit
08ddc9f83d
2
go.mod
2
go.mod
@ -5,7 +5,7 @@ go 1.17
|
||||
require (
|
||||
code.cloudfoundry.org/bytefmt v0.0.0-20211005130812-5bb3c17173e5
|
||||
github.com/abema/go-mp4 v0.7.2
|
||||
github.com/aler9/gortsplib v0.0.0-20220624182352-793cea631b0d
|
||||
github.com/aler9/gortsplib v0.0.0-20220627152716-f3b0fc69b476
|
||||
github.com/asticode/go-astits v1.10.1-0.20220319093903-4abe66a9b757
|
||||
github.com/fsnotify/fsnotify v1.4.9
|
||||
github.com/gin-gonic/gin v1.8.1
|
||||
|
4
go.sum
4
go.sum
@ -6,8 +6,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafo
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E=
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
||||
github.com/aler9/gortsplib v0.0.0-20220624182352-793cea631b0d h1:XVUGkA3yWynbE/yZB1tMUmZHiUNy4V6cP8LAJqcYC+E=
|
||||
github.com/aler9/gortsplib v0.0.0-20220624182352-793cea631b0d/go.mod h1:WI3nMhY2mM6nfoeW9uyk7TyG5Qr6YnYxmFoCply0sbo=
|
||||
github.com/aler9/gortsplib v0.0.0-20220627152716-f3b0fc69b476 h1:TsaEIfoNPsMA6IjBucRV34JQHINAj0IPTdBLgbZsOSs=
|
||||
github.com/aler9/gortsplib v0.0.0-20220627152716-f3b0fc69b476/go.mod h1:WI3nMhY2mM6nfoeW9uyk7TyG5Qr6YnYxmFoCply0sbo=
|
||||
github.com/aler9/rtmp v0.0.0-20210403095203-3be4a5535927 h1:95mXJ5fUCYpBRdSOnLAQAdJHHKxxxJrVCiaqDi965YQ=
|
||||
github.com/aler9/rtmp v0.0.0-20210403095203-3be4a5535927/go.mod h1:vzuE21rowz+lT1NGsWbreIvYulgBpCGnQyeTyFblUHc=
|
||||
github.com/aler9/writerseeker v0.0.0-20220601075008-6f0e685b9c82 h1:9WgSzBLo3a9ToSVV7sRTBYZ1GGOZUpq4+5H3SN0UZq4=
|
||||
|
@ -178,7 +178,7 @@ func TestCorePathAutoDeletion(t *testing.T) {
|
||||
Header: base.Header{
|
||||
"CSeq": base.HeaderValue{"1"},
|
||||
},
|
||||
}.Write()
|
||||
}.Marshal()
|
||||
_, err = conn.Write(byts)
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -206,9 +206,9 @@ func TestCorePathAutoDeletion(t *testing.T) {
|
||||
}(),
|
||||
Protocol: headers.TransportProtocolUDP,
|
||||
ClientPorts: &[2]int{35466, 35467},
|
||||
}.Write(),
|
||||
}.Marshal(),
|
||||
},
|
||||
}.Write()
|
||||
}.Marshal()
|
||||
_, err = conn.Write(byts)
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -314,7 +314,7 @@ func main() {
|
||||
Header: base.Header{
|
||||
"CSeq": base.HeaderValue{"1"},
|
||||
},
|
||||
}.Write()
|
||||
}.Marshal()
|
||||
_, err = conn.Write(byts)
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -340,9 +340,9 @@ func main() {
|
||||
}(),
|
||||
Protocol: headers.TransportProtocolTCP,
|
||||
InterleavedIDs: &[2]int{0, 1},
|
||||
}.Write(),
|
||||
}.Marshal(),
|
||||
},
|
||||
}.Write()
|
||||
}.Marshal()
|
||||
_, err = conn.Write(byts)
|
||||
require.NoError(t, err)
|
||||
|
||||
|
@ -70,7 +70,7 @@ func (ts *testHLSServer) onSegment(ctx *gin.Context) {
|
||||
|
||||
mux.WriteTables()
|
||||
|
||||
enc, _ := h264.AnnexBEncode([][]byte{
|
||||
enc, _ := h264.AnnexBMarshal([][]byte{
|
||||
{7, 1, 2, 3}, // SPS
|
||||
{8}, // PPS
|
||||
})
|
||||
@ -94,7 +94,7 @@ func (ts *testHLSServer) onSegment(ctx *gin.Context) {
|
||||
|
||||
time.Sleep(1 * time.Second)
|
||||
|
||||
enc, _ = h264.AnnexBEncode([][]byte{
|
||||
enc, _ = h264.AnnexBMarshal([][]byte{
|
||||
{5}, // IDR
|
||||
})
|
||||
|
||||
|
@ -430,7 +430,7 @@ func (c *rtmpConn) runRead(ctx context.Context) error {
|
||||
}
|
||||
}
|
||||
|
||||
avcc, err := h264.AVCCEncode(data.h264NALUs)
|
||||
avcc, err := h264.AVCCMarshal(data.h264NALUs)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -604,7 +604,7 @@ func (c *rtmpConn) runPublish(ctx context.Context) error {
|
||||
return fmt.Errorf("received an H264 packet, but track is not set up")
|
||||
}
|
||||
|
||||
nalus, err := h264.AVCCDecode(pkt.Data)
|
||||
nalus, err := h264.AVCCUnmarshal(pkt.Data)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ func (s *rtmpSource) runInner() bool {
|
||||
return fmt.Errorf("received an H264 packet, but track is not set up")
|
||||
}
|
||||
|
||||
nalus, err := h264.AVCCDecode(pkt.Data)
|
||||
nalus, err := h264.AVCCUnmarshal(pkt.Data)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ func (c *rtspConn) authenticate(
|
||||
password := ""
|
||||
|
||||
var auth headers.Authorization
|
||||
err := auth.Read(req.Header["Authorization"])
|
||||
err := auth.Unmarshal(req.Header["Authorization"])
|
||||
if err == nil && auth.Method == headers.AuthBasic {
|
||||
username = auth.BasicUser
|
||||
password = auth.BasicPass
|
||||
@ -157,7 +157,7 @@ func (c *rtspConn) authenticate(
|
||||
"WWW-Authenticate": headers.Authenticate{
|
||||
Method: headers.AuthBasic,
|
||||
Realm: &v,
|
||||
}.Write(),
|
||||
}.Marshal(),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -58,7 +58,8 @@ func (p *clientAudioProcessor) doProcess(
|
||||
data []byte,
|
||||
pts time.Duration,
|
||||
) error {
|
||||
adtsPkts, err := aac.DecodeADTS(data)
|
||||
var adtsPkts aac.ADTSPackets
|
||||
err := adtsPkts.Unmarshal(data)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ func newTestHLSServer(ca string) (*testHLSServer, error) {
|
||||
mux.SetPCRPID(256)
|
||||
mux.WriteTables()
|
||||
|
||||
enc, _ := h264.AnnexBEncode([][]byte{
|
||||
enc, _ := h264.AnnexBMarshal([][]byte{
|
||||
{7, 1, 2, 3}, // SPS
|
||||
{8}, // PPS
|
||||
{5}, // IDR
|
||||
|
@ -82,9 +82,9 @@ func (p *clientVideoProcessor) doProcess(
|
||||
}
|
||||
}
|
||||
|
||||
nalus, err := h264.AnnexBDecode(data)
|
||||
nalus, err := h264.AnnexBUnmarshal(data)
|
||||
if err != nil {
|
||||
p.logger.Log(logger.Warn, "unable to decode Annex-B: %s", err)
|
||||
p.logger.Log(logger.Warn, "unable to unmarshal Annex-B: %s", err)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ func (m *muxerVariantFMP4Segmenter) writeH264(pts time.Duration, nalus [][]byte)
|
||||
return nil
|
||||
}
|
||||
|
||||
avcc, err := h264.AVCCEncode(nalus)
|
||||
avcc, err := h264.AVCCMarshal(nalus)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ func (t *muxerVariantMPEGTSSegment) writeH264(
|
||||
// prepend an AUD. This is required by video.js and iOS
|
||||
nalus = append([][]byte{{byte(h264.NALUTypeAccessUnitDelimiter), 240}}, nalus...)
|
||||
|
||||
enc, err := h264.AnnexBEncode(nalus)
|
||||
enc, err := h264.AnnexBMarshal(nalus)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -147,7 +147,7 @@ func (t *muxerVariantMPEGTSSegment) writeAAC(
|
||||
pts time.Duration,
|
||||
aus [][]byte,
|
||||
) error {
|
||||
pkts := make([]*aac.ADTSPacket, len(aus))
|
||||
pkts := make(aac.ADTSPackets, len(aus))
|
||||
|
||||
for i, au := range aus {
|
||||
pkts[i] = &aac.ADTSPacket{
|
||||
@ -158,7 +158,7 @@ func (t *muxerVariantMPEGTSSegment) writeAAC(
|
||||
}
|
||||
}
|
||||
|
||||
enc, err := aac.EncodeADTS(pkts)
|
||||
enc, err := pkts.Marshal()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user