Skip to content

Commit

Permalink
update dependencies (#2687)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 authored Nov 12, 2023
1 parent 687d868 commit 7a1e155
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 35 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ require (
github.com/abema/go-mp4 v1.1.1
github.com/alecthomas/kong v0.8.1
github.com/aler9/writerseeker v1.1.0
github.com/bluenviron/gohlslib v1.0.4
github.com/bluenviron/gortsplib/v4 v4.4.0
github.com/bluenviron/gohlslib v1.0.5
github.com/bluenviron/gortsplib/v4 v4.5.0
github.com/bluenviron/mediacommon v1.5.0
github.com/datarhei/gosrt v0.5.4
github.com/fsnotify/fsnotify v1.7.0
Expand Down Expand Up @@ -65,7 +65,7 @@ require (
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ 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/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/bluenviron/gohlslib v1.0.4 h1:cNpNQSPzomM7fqSaGPbdRxpq5QtI3b0vjT3nWQ5/LrU=
github.com/bluenviron/gohlslib v1.0.4/go.mod h1:yMw/Gm+SeC498fHc7DnqKvczTMZGBdJdJUmAM+k+pu0=
github.com/bluenviron/gortsplib/v4 v4.4.0 h1:6dP2MtADHXgnRcxfred+wFjsjyCqfFnh/x6crhV2g00=
github.com/bluenviron/gortsplib/v4 v4.4.0/go.mod h1:4XBcXsbK4MDFqnraexSDeKj++ZzrSd81CVplSpSNqKk=
github.com/bluenviron/gohlslib v1.0.5 h1:AZsNdMI2ZvPHE0Yi3ZjGJO7DGhBh4bZAYgiGocYYPWs=
github.com/bluenviron/gohlslib v1.0.5/go.mod h1:yMw/Gm+SeC498fHc7DnqKvczTMZGBdJdJUmAM+k+pu0=
github.com/bluenviron/gortsplib/v4 v4.5.0 h1:bTF244GOx5GVwfwA4vYYDNoAql9c9/WhfBPqGc3pH20=
github.com/bluenviron/gortsplib/v4 v4.5.0/go.mod h1:hb4lwJ+LMLfk0YbImTIrWLA8u3yWj77z4nzv2kxYLdk=
github.com/bluenviron/mediacommon v1.5.0 h1:lS0YKNo22ZOyCsYcLh3jn3TgUALqYw0f7RVwalC09vI=
github.com/bluenviron/mediacommon v1.5.0/go.mod h1:Ij/kE1LEucSjryNBVTyPL/gBI0d6/Css3f5PyrM957w=
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
Expand Down Expand Up @@ -224,8 +224,8 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg=
golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down
8 changes: 4 additions & 4 deletions internal/conf/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"strings"
"time"

"github.com/bluenviron/gortsplib/v4/pkg/base"
"github.com/bluenviron/gortsplib/v4/pkg/headers"
"github.com/bluenviron/gortsplib/v4/pkg/url"
)

var rePathName = regexp.MustCompile(`^[0-9a-zA-Z_\-/\.~]+$`)
Expand Down Expand Up @@ -244,7 +244,7 @@ func (pconf *Path) check(conf *Conf, name string) error {
return fmt.Errorf("a path with a regular expression (or path 'all') cannot have a RTSP source. use another path")
}

_, err := url.Parse(pconf.Source)
_, err := base.ParseURL(pconf.Source)
if err != nil {
return fmt.Errorf("'%s' is not a valid URL", pconf.Source)
}
Expand Down Expand Up @@ -398,7 +398,7 @@ func (pconf *Path) check(conf *Conf, name string) error {
return fmt.Errorf("'%s': %s", pconf.Fallback, err)
}
} else {
_, err := url.Parse(pconf.Fallback)
_, err := base.ParseURL(pconf.Fallback)
if err != nil {
return fmt.Errorf("'%s' is not a valid RTSP URL", pconf.Fallback)
}
Expand Down Expand Up @@ -431,7 +431,7 @@ func (pconf *Path) check(conf *Conf, name string) error {
return fmt.Errorf("source redirect must be filled")
}

_, err := url.Parse(pconf.SourceRedirect)
_, err := base.ParseURL(pconf.SourceRedirect)
if err != nil {
return fmt.Errorf("'%s' is not a valid RTSP URL", pconf.SourceRedirect)
}
Expand Down
5 changes: 2 additions & 3 deletions internal/core/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (

"github.com/bluenviron/gortsplib/v4/pkg/base"
"github.com/bluenviron/gortsplib/v4/pkg/description"
"github.com/bluenviron/gortsplib/v4/pkg/url"
"github.com/google/uuid"

"github.com/bluenviron/mediamtx/internal/conf"
Expand Down Expand Up @@ -66,7 +65,7 @@ type pathAccessRequest struct {
proto authProtocol
id *uuid.UUID
rtspRequest *base.Request
rtspBaseURL *url.URL
rtspBaseURL *base.URL
rtspNonce string
}

Expand Down Expand Up @@ -555,7 +554,7 @@ func (pa *path) doDescribe(req pathDescribeReq) {
if pa.conf.Fallback != "" {
fallbackURL := func() string {
if strings.HasPrefix(pa.conf.Fallback, "/") {
ur := url.URL{
ur := base.URL{
Scheme: req.accessRequest.rtspRequest.URL.Scheme,
User: req.accessRequest.rtspRequest.URL.User,
Host: req.accessRequest.rtspRequest.URL.Host,
Expand Down
5 changes: 2 additions & 3 deletions internal/core/path_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"github.com/bluenviron/gortsplib/v4/pkg/base"
"github.com/bluenviron/gortsplib/v4/pkg/headers"
"github.com/bluenviron/gortsplib/v4/pkg/url"
"github.com/stretchr/testify/require"
)

Expand All @@ -26,7 +25,7 @@ func TestPathAutoDeletion(t *testing.T) {
br := bufio.NewReader(conn)

if ca == "describe" {
u, err := url.Parse("rtsp://localhost:8554/mypath")
u, err := base.ParseURL("rtsp://localhost:8554/mypath")
require.NoError(t, err)

byts, _ := base.Request{
Expand All @@ -44,7 +43,7 @@ func TestPathAutoDeletion(t *testing.T) {
require.NoError(t, err)
require.Equal(t, base.StatusNotFound, res.StatusCode)
} else {
u, err := url.Parse("rtsp://localhost:8554/mypath/trackID=0")
u, err := base.ParseURL("rtsp://localhost:8554/mypath/trackID=0")
require.NoError(t, err)

byts, _ := base.Request{
Expand Down
9 changes: 4 additions & 5 deletions internal/core/path_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/bluenviron/gortsplib/v4/pkg/description"
"github.com/bluenviron/gortsplib/v4/pkg/headers"
"github.com/bluenviron/gortsplib/v4/pkg/sdp"
rtspurl "github.com/bluenviron/gortsplib/v4/pkg/url"
"github.com/datarhei/gosrt"
"github.com/pion/rtp"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -126,7 +125,7 @@ func TestPathRunOnDemand(t *testing.T) {
br := bufio.NewReader(conn)

if ca == "describe" || ca == "describe and setup" {
u, err := rtspurl.Parse("rtsp://localhost:8554/ondemand?param=value")
u, err := base.ParseURL("rtsp://localhost:8554/ondemand?param=value")
require.NoError(t, err)

byts, _ := base.Request{
Expand All @@ -153,7 +152,7 @@ func TestPathRunOnDemand(t *testing.T) {
}

if ca == "setup" || ca == "describe and setup" {
u, err := rtspurl.Parse(control)
u, err := base.ParseURL(control)
require.NoError(t, err)

byts, _ := base.Request{
Expand Down Expand Up @@ -328,7 +327,7 @@ func TestPathRunOnRead(t *testing.T) {
case "rtsp":
reader := gortsplib.Client{}

u, err := rtspurl.Parse("rtsp://127.0.0.1:8554/test?query=value")
u, err := base.ParseURL("rtsp://127.0.0.1:8554/test?query=value")
require.NoError(t, err)

err = reader.Start(u.Scheme, u.Host)
Expand Down Expand Up @@ -428,7 +427,7 @@ func TestPathMaxReaders(t *testing.T) {
for i := 0; i < 2; i++ {
reader := gortsplib.Client{}

u, err := rtspurl.Parse("rtsp://127.0.0.1:8554/mystream")
u, err := base.ParseURL("rtsp://127.0.0.1:8554/mystream")
require.NoError(t, err)

err = reader.Start(u.Scheme, u.Host)
Expand Down
10 changes: 5 additions & 5 deletions internal/core/rtsp_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"

"github.com/bluenviron/gortsplib/v4"
"github.com/bluenviron/gortsplib/v4/pkg/base"
"github.com/bluenviron/gortsplib/v4/pkg/description"
"github.com/bluenviron/gortsplib/v4/pkg/url"
"github.com/pion/rtp"
"github.com/stretchr/testify/require"
)
Expand Down Expand Up @@ -70,7 +70,7 @@ func TestRTSPServer(t *testing.T) {

reader := gortsplib.Client{}

u, err := url.Parse("rtsp://testreader:testpass@127.0.0.1:8554/teststream?param=value")
u, err := base.ParseURL("rtsp://testreader:testpass@127.0.0.1:8554/teststream?param=value")
require.NoError(t, err)

err = reader.Start(u.Scheme, u.Host)
Expand Down Expand Up @@ -191,7 +191,7 @@ func TestRTSPServerAuthFail(t *testing.T) {

c := gortsplib.Client{}

u, err := url.Parse("rtsp://" + ca.user + ":" + ca.pass + "@localhost:8554/test/stream")
u, err := base.ParseURL("rtsp://" + ca.user + ":" + ca.pass + "@localhost:8554/test/stream")
require.NoError(t, err)

err = c.Start(u.Scheme, u.Host)
Expand Down Expand Up @@ -288,7 +288,7 @@ func TestRTSPServerPublisherOverride(t *testing.T) {

c := gortsplib.Client{}

u, err := url.Parse("rtsp://localhost:8554/teststream")
u, err := base.ParseURL("rtsp://localhost:8554/teststream")
require.NoError(t, err)

err = c.Start(u.Scheme, u.Host)
Expand Down Expand Up @@ -378,7 +378,7 @@ func TestRTSPServerFallback(t *testing.T) {
require.NoError(t, err)
defer source.Close()

u, err := url.Parse("rtsp://localhost:8554/path1")
u, err := base.ParseURL("rtsp://localhost:8554/path1")
require.NoError(t, err)

dest := gortsplib.Client{}
Expand Down
3 changes: 1 addition & 2 deletions internal/core/rtsp_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/bluenviron/gortsplib/v4"
"github.com/bluenviron/gortsplib/v4/pkg/auth"
"github.com/bluenviron/gortsplib/v4/pkg/base"
"github.com/bluenviron/gortsplib/v4/pkg/url"
"github.com/google/uuid"
"github.com/pion/rtp"

Expand Down Expand Up @@ -199,7 +198,7 @@ func (s *rtspSession) onSetup(c *rtspConn, ctx *gortsplib.ServerHandlerOnSetupCt

switch s.session.State() {
case gortsplib.ServerSessionStateInitial, gortsplib.ServerSessionStatePrePlay: // play
baseURL := &url.URL{
baseURL := &base.URL{
Scheme: ctx.Request.URL.Scheme,
Host: ctx.Request.URL.Host,
Path: ctx.Path,
Expand Down
4 changes: 2 additions & 2 deletions internal/core/webrtc_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"time"

"github.com/bluenviron/gortsplib/v4"
"github.com/bluenviron/gortsplib/v4/pkg/base"
"github.com/bluenviron/gortsplib/v4/pkg/description"
"github.com/bluenviron/gortsplib/v4/pkg/format"
rtspurl "github.com/bluenviron/gortsplib/v4/pkg/url"
"github.com/pion/rtp"
pwebrtc "github.com/pion/webrtc/v3"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -317,7 +317,7 @@ func TestWebRTCPublish(t *testing.T) {
},
}

u, err := rtspurl.Parse("rtsp://testreader:testpass@127.0.0.1:8554/teststream?param=value")
u, err := base.ParseURL("rtsp://testreader:testpass@127.0.0.1:8554/teststream?param=value")
require.NoError(t, err)

err = c.Start(u.Scheme, u.Host)
Expand Down
3 changes: 1 addition & 2 deletions internal/staticsources/rtsp/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/bluenviron/gortsplib/v4/pkg/headers"
"github.com/pion/rtp"

"github.com/bluenviron/gortsplib/v4/pkg/url"
"github.com/bluenviron/mediamtx/internal/conf"
"github.com/bluenviron/mediamtx/internal/defs"
"github.com/bluenviron/mediamtx/internal/logger"
Expand Down Expand Up @@ -104,7 +103,7 @@ func (s *Source) Run(params defs.StaticSourceRunParams) error {
},
}

u, err := url.Parse(params.Conf.Source)
u, err := base.ParseURL(params.Conf.Source)
if err != nil {
return err
}
Expand Down

0 comments on commit 7a1e155

Please sign in to comment.