1
0
Fork 0
forked from External/mediamtx

update dependencies (#3325)

This commit is contained in:
Alessandro Ros 2024-05-05 19:06:47 +02:00 committed by GitHub
parent 0c86dca71a
commit dcb5b45e84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 15 additions and 34 deletions

8
go.mod
View file

@ -8,9 +8,9 @@ require (
github.com/MicahParks/keyfunc/v3 v3.3.2 github.com/MicahParks/keyfunc/v3 v3.3.2
github.com/abema/go-mp4 v1.2.0 github.com/abema/go-mp4 v1.2.0
github.com/alecthomas/kong v0.9.0 github.com/alecthomas/kong v0.9.0
github.com/bluenviron/gohlslib v1.3.1 github.com/bluenviron/gohlslib v1.3.2
github.com/bluenviron/gortsplib/v4 v4.8.2 github.com/bluenviron/gortsplib/v4 v4.9.0
github.com/bluenviron/mediacommon v1.9.3 github.com/bluenviron/mediacommon v1.10.0
github.com/datarhei/gosrt v0.6.0 github.com/datarhei/gosrt v0.6.0
github.com/fsnotify/fsnotify v1.7.0 github.com/fsnotify/fsnotify v1.7.0
github.com/gin-gonic/gin v1.9.1 github.com/gin-gonic/gin v1.9.1
@ -24,7 +24,7 @@ require (
github.com/pion/interceptor v0.1.29 github.com/pion/interceptor v0.1.29
github.com/pion/logging v0.2.2 github.com/pion/logging v0.2.2
github.com/pion/rtcp v1.2.14 github.com/pion/rtcp v1.2.14
github.com/pion/rtp v1.8.6 github.com/pion/rtp v1.8.7-0.20240429002300-bc5124c9d0d0
github.com/pion/sdp/v3 v3.0.9 github.com/pion/sdp/v3 v3.0.9
github.com/pion/webrtc/v3 v3.2.22 github.com/pion/webrtc/v3 v3.2.22
github.com/stretchr/testify v1.9.0 github.com/stretchr/testify v1.9.0

16
go.sum
View file

@ -20,12 +20,12 @@ github.com/asticode/go-astits v1.13.0 h1:XOgkaadfZODnyZRR5Y0/DWkA9vrkLLPLeeOvDwf
github.com/asticode/go-astits v1.13.0/go.mod h1:QSHmknZ51pf6KJdHKZHJTLlMegIrhega3LPWz3ND/iI= github.com/asticode/go-astits v1.13.0/go.mod h1:QSHmknZ51pf6KJdHKZHJTLlMegIrhega3LPWz3ND/iI=
github.com/benburkert/openpgp v0.0.0-20160410205803-c2471f86866c h1:8XZeJrs4+ZYhJeJ2aZxADI2tGADS15AzIF8MQ8XAhT4= github.com/benburkert/openpgp v0.0.0-20160410205803-c2471f86866c h1:8XZeJrs4+ZYhJeJ2aZxADI2tGADS15AzIF8MQ8XAhT4=
github.com/benburkert/openpgp v0.0.0-20160410205803-c2471f86866c/go.mod h1:x1vxHcL/9AVzuk5HOloOEPrtJY0MaalYr78afXZ+pWI= github.com/benburkert/openpgp v0.0.0-20160410205803-c2471f86866c/go.mod h1:x1vxHcL/9AVzuk5HOloOEPrtJY0MaalYr78afXZ+pWI=
github.com/bluenviron/gohlslib v1.3.1 h1:87JEFXWfvSlfwYBX6JSCxsu+fr4zuBgk82Y4qgx0g5E= github.com/bluenviron/gohlslib v1.3.2 h1:xRiPfMIeYCkspL6jYa7Qrl4pIY+1w7IvFjx49CsyfKY=
github.com/bluenviron/gohlslib v1.3.1/go.mod h1:wD8ysO6HB90d17sxoIQXGHINo2KYj/mZirMnPtKLJZQ= github.com/bluenviron/gohlslib v1.3.2/go.mod h1:1/m7A2o5IWyBdZeauXe2bViu2l1mL2l8DMQl9302A2U=
github.com/bluenviron/gortsplib/v4 v4.8.2 h1:/26wbmRv05owUsn9sa1pAdgPAlpUpbnzgBnqs1ilwWE= github.com/bluenviron/gortsplib/v4 v4.9.0 h1:Zm/XuKDBQrU0Hcm4wqBhGX0U3hUAVh0Wm7cvJpbJWyU=
github.com/bluenviron/gortsplib/v4 v4.8.2/go.mod h1:0NJSk7p8YV4zt1KdcaNwZ3CyXKAKrjUtavStCZaYjyw= github.com/bluenviron/gortsplib/v4 v4.9.0/go.mod h1:0XtUPbNFHNpMz4Sa70PmSelvclWTTJujHfSKkhuLpxg=
github.com/bluenviron/mediacommon v1.9.3 h1:qpY7m26aXdTW9SgcOHLJXazd4Jr4rle6IH2RFuQkUvE= github.com/bluenviron/mediacommon v1.10.0 h1:ffIWaS+1vYpPLV6QOt4VEvIlb/OKtodzagzsY6EDOnw=
github.com/bluenviron/mediacommon v1.9.3/go.mod h1:0z/KHiSTlaAB8FoyW+mYulZRG70Kupcy/0yZZkgLe5M= github.com/bluenviron/mediacommon v1.10.0/go.mod h1:HDyW2CzjvhYJXtdxstdFPio3G0qSocPhqkhUt/qffec=
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s=
github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
@ -150,8 +150,8 @@ github.com/pion/rtcp v1.2.14 h1:KCkGV3vJ+4DAJmvP0vaQShsb0xkRfWkO540Gy102KyE=
github.com/pion/rtcp v1.2.14/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4= github.com/pion/rtcp v1.2.14/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4=
github.com/pion/rtp v1.8.2/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= github.com/pion/rtp v1.8.2/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU=
github.com/pion/rtp v1.8.3/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= github.com/pion/rtp v1.8.3/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU=
github.com/pion/rtp v1.8.6 h1:MTmn/b0aWWsAzux2AmP8WGllusBVw4NPYPVFFd7jUPw= github.com/pion/rtp v1.8.7-0.20240429002300-bc5124c9d0d0 h1:yPAphilskTN7U3URvBVxlVr0PzheMeWqo7PaOqh//Hg=
github.com/pion/rtp v1.8.6/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= github.com/pion/rtp v1.8.7-0.20240429002300-bc5124c9d0d0/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU=
github.com/pion/sctp v1.8.5/go.mod h1:SUFFfDpViyKejTAdwD1d/HQsCu+V/40cCs2nZIvC3s0= github.com/pion/sctp v1.8.5/go.mod h1:SUFFfDpViyKejTAdwD1d/HQsCu+V/40cCs2nZIvC3s0=
github.com/pion/sctp v1.8.8 h1:5EdnnKI4gpyR1a1TwbiS/wxEgcUWBHsc7ILAjARJB+U= github.com/pion/sctp v1.8.8 h1:5EdnnKI4gpyR1a1TwbiS/wxEgcUWBHsc7ILAjARJB+U=
github.com/pion/sctp v1.8.8/go.mod h1:igF9nZBrjh5AtmKc7U30jXltsFHicFCXSmWA2GWRaWs= github.com/pion/sctp v1.8.8/go.mod h1:igF9nZBrjh5AtmKc7U30jXltsFHicFCXSmWA2GWRaWs=

View file

@ -56,7 +56,6 @@ type Request struct {
ID *uuid.UUID ID *uuid.UUID
Query string Query string
RTSPRequest *base.Request RTSPRequest *base.Request
RTSPBaseURL *base.URL
RTSPNonce string RTSPNonce string
} }
@ -203,7 +202,6 @@ func (m *Manager) authenticateWithUser(
req.RTSPRequest, req.RTSPRequest,
string(u.User), string(u.User),
string(u.Pass), string(u.Pass),
req.RTSPBaseURL,
m.RTSPAuthMethods, m.RTSPAuthMethods,
rtspAuthRealm, rtspAuthRealm,
req.RTSPNonce) req.RTSPNonce)

View file

@ -49,7 +49,6 @@ type PathAccessRequest struct {
Proto auth.Protocol Proto auth.Protocol
ID *uuid.UUID ID *uuid.UUID
RTSPRequest *base.Request RTSPRequest *base.Request
RTSPBaseURL *base.URL
RTSPNonce string RTSPNonce string
} }
@ -70,7 +69,6 @@ func (r *PathAccessRequest) ToAuthRequest() *auth.Request {
ID: r.ID, ID: r.ID,
Query: r.Query, Query: r.Query,
RTSPRequest: r.RTSPRequest, RTSPRequest: r.RTSPRequest,
RTSPBaseURL: r.RTSPBaseURL,
RTSPNonce: r.RTSPNonce, RTSPNonce: r.RTSPNonce,
} }
} }

View file

@ -225,7 +225,7 @@ func (f *formatFMP4) initialize() {
randomAccess := false randomAccess := false
if h.FrameType == vp9.FrameTypeKeyFrame { if !h.NonKeyFrame {
randomAccess = true randomAccess = true
if w := h.Width(); codec.Width != w { if w := h.Width(); codec.Width != w {

View file

@ -121,7 +121,6 @@ func (s *session) onAnnounce(c *conn, ctx *gortsplib.ServerHandlerOnAnnounceCtx)
Proto: auth.ProtocolRTSP, Proto: auth.ProtocolRTSP,
ID: &c.uuid, ID: &c.uuid,
RTSPRequest: ctx.Request, RTSPRequest: ctx.Request,
RTSPBaseURL: nil,
RTSPNonce: c.authNonce, RTSPNonce: c.authNonce,
}, },
}) })
@ -173,19 +172,6 @@ func (s *session) onSetup(c *conn, ctx *gortsplib.ServerHandlerOnSetupCtx,
switch s.rsession.State() { switch s.rsession.State() {
case gortsplib.ServerSessionStateInitial, gortsplib.ServerSessionStatePrePlay: // play case gortsplib.ServerSessionStateInitial, gortsplib.ServerSessionStatePrePlay: // play
baseURL := &base.URL{
Scheme: ctx.Request.URL.Scheme,
Host: ctx.Request.URL.Host,
Path: ctx.Path,
RawQuery: ctx.Query,
}
if ctx.Query != "" {
baseURL.RawQuery += "/"
} else {
baseURL.Path += "/"
}
if c.authNonce == "" { if c.authNonce == "" {
var err error var err error
c.authNonce, err = rtspauth.GenerateNonce() c.authNonce, err = rtspauth.GenerateNonce()
@ -205,7 +191,6 @@ func (s *session) onSetup(c *conn, ctx *gortsplib.ServerHandlerOnSetupCtx,
Proto: auth.ProtocolRTSP, Proto: auth.ProtocolRTSP,
ID: &c.uuid, ID: &c.uuid,
RTSPRequest: ctx.Request, RTSPRequest: ctx.Request,
RTSPBaseURL: baseURL,
RTSPNonce: c.authNonce, RTSPNonce: c.authNonce,
}, },
}) })

View file

@ -55,7 +55,7 @@ func TestSource(t *testing.T) {
Handler: &testServer{ Handler: &testServer{
onDescribe: func(ctx *gortsplib.ServerHandlerOnDescribeCtx, onDescribe: func(ctx *gortsplib.ServerHandlerOnDescribeCtx,
) (*base.Response, *gortsplib.ServerStream, error) { ) (*base.Response, *gortsplib.ServerStream, error) {
err2 := auth.Validate(ctx.Request, "testuser", "testpass", nil, nil, "IPCAM", nonce) err2 := auth.Validate(ctx.Request, "testuser", "testpass", nil, "IPCAM", nonce)
if err2 != nil { if err2 != nil {
return &base.Response{ //nolint:nilerr return &base.Response{ //nolint:nilerr
StatusCode: base.StatusUnauthorized, StatusCode: base.StatusUnauthorized,
@ -184,7 +184,7 @@ func TestRTSPSourceNoPassword(t *testing.T) {
s := gortsplib.Server{ s := gortsplib.Server{
Handler: &testServer{ Handler: &testServer{
onDescribe: func(ctx *gortsplib.ServerHandlerOnDescribeCtx) (*base.Response, *gortsplib.ServerStream, error) { onDescribe: func(ctx *gortsplib.ServerHandlerOnDescribeCtx) (*base.Response, *gortsplib.ServerStream, error) {
err2 := auth.Validate(ctx.Request, "testuser", "", nil, nil, "IPCAM", nonce) err2 := auth.Validate(ctx.Request, "testuser", "", nil, "IPCAM", nonce)
if err2 != nil { if err2 != nil {
return &base.Response{ //nolint:nilerr return &base.Response{ //nolint:nilerr
StatusCode: base.StatusUnauthorized, StatusCode: base.StatusUnauthorized,