From 80a133afc9542d0408d634cfb06fcbf5196ba163 Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Tue, 11 Jun 2024 22:43:27 +0200 Subject: [PATCH] bump dependencies (#3457) --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- internal/core/api_test.go | 4 ++-- internal/core/metrics_test.go | 2 +- internal/protocols/mpegts/from_stream.go | 4 ++-- internal/protocols/mpegts/to_stream.go | 4 ++-- internal/record/format_mpegts.go | 4 ++-- internal/servers/hls/muxer_instance.go | 4 ++-- internal/servers/hls/server_test.go | 3 --- internal/servers/srt/server_test.go | 6 +++--- internal/staticsources/hls/source_test.go | 2 +- internal/staticsources/srt/source_test.go | 2 +- internal/staticsources/udp/source_test.go | 4 ++-- 13 files changed, 30 insertions(+), 33 deletions(-) diff --git a/go.mod b/go.mod index f72fe77b..12075484 100644 --- a/go.mod +++ b/go.mod @@ -8,9 +8,9 @@ require ( github.com/MicahParks/keyfunc/v3 v3.3.3 github.com/abema/go-mp4 v1.2.0 github.com/alecthomas/kong v0.9.0 - github.com/bluenviron/gohlslib v1.3.3 - github.com/bluenviron/gortsplib/v4 v4.10.0 - github.com/bluenviron/mediacommon v1.11.0 + github.com/bluenviron/gohlslib v1.4.0 + github.com/bluenviron/gortsplib/v4 v4.10.1 + github.com/bluenviron/mediacommon v1.12.0 github.com/datarhei/gosrt v0.6.0 github.com/fsnotify/fsnotify v1.7.0 github.com/gin-gonic/gin v1.10.0 @@ -70,7 +70,7 @@ require ( github.com/ugorji/go/codec v1.2.12 // indirect github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect golang.org/x/arch v0.8.0 // indirect - golang.org/x/net v0.25.0 // indirect + golang.org/x/net v0.26.0 // indirect golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 // indirect google.golang.org/protobuf v1.34.1 // indirect diff --git a/go.sum b/go.sum index 3eada60c..316ed2d9 100644 --- a/go.sum +++ b/go.sum @@ -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/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.3.3 h1:Ji4PW9QHHCbpBteZCKk+rGY6emFNSGVFMsAa/3xFChk= -github.com/bluenviron/gohlslib v1.3.3/go.mod h1:MQcRjI9fYBNb9QhZO3RydgtbfCRhjogj6YMrpCDuTvY= -github.com/bluenviron/gortsplib/v4 v4.10.0 h1:9vJsUDuBgSinm41CR6yWnSMZ7TRWeB/oiAuN4lo30bU= -github.com/bluenviron/gortsplib/v4 v4.10.0/go.mod h1:iLJ1tmwGMbaN04ZYh/KRlAHsCbz9Rycn7cPAvdR+Vkc= -github.com/bluenviron/mediacommon v1.11.0 h1:1xY4QGYz7da9tsV2Xvd+ol+Ul5qq2g7ADJtIlVkQSRI= -github.com/bluenviron/mediacommon v1.11.0/go.mod h1:HDyW2CzjvhYJXtdxstdFPio3G0qSocPhqkhUt/qffec= +github.com/bluenviron/gohlslib v1.4.0 h1:3a9W1x8eqlxJUKt1sJCunPGtti5ALIY2ik4GU0RVe7E= +github.com/bluenviron/gohlslib v1.4.0/go.mod h1:q5ZElzNw5GRbV1VEI45qkcPbKBco6BP58QEY5HyFsmo= +github.com/bluenviron/gortsplib/v4 v4.10.1 h1:v+X5HcNOEiUurK16Y30sl/UjqCDodx4aywvoSsFS49A= +github.com/bluenviron/gortsplib/v4 v4.10.1/go.mod h1:ElIedl4To6FQpxjgGnbf4NK/je57JqZMO2EAndIWX4o= +github.com/bluenviron/mediacommon v1.12.0 h1:j6L3Ikn+dyJvvG3rbm0gjbsUJ11fqh5nIlhNgYAjEx8= +github.com/bluenviron/mediacommon v1.12.0/go.mod h1:HDyW2CzjvhYJXtdxstdFPio3G0qSocPhqkhUt/qffec= github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0= github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4= github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM= @@ -230,8 +230,8 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= 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= diff --git a/internal/core/api_test.go b/internal/core/api_test.go index 33cf0a3d..3390727c 100644 --- a/internal/core/api_test.go +++ b/internal/core/api_test.go @@ -546,7 +546,7 @@ func TestAPIProtocolListGet(t *testing.T) { w := mpegts.NewWriter(bw, []*mpegts.Track{track}) require.NoError(t, err) - err = w.WriteH26x(track, 0, 0, true, [][]byte{{1}}) + err = w.WriteH264(track, 0, 0, true, [][]byte{{1}}) require.NoError(t, err) err = bw.Flush() @@ -1021,7 +1021,7 @@ func TestAPIProtocolKick(t *testing.T) { w := mpegts.NewWriter(bw, []*mpegts.Track{track}) require.NoError(t, err) - err = w.WriteH26x(track, 0, 0, true, [][]byte{{1}}) + err = w.WriteH264(track, 0, 0, true, [][]byte{{1}}) require.NoError(t, err) err = bw.Flush() diff --git a/internal/core/metrics_test.go b/internal/core/metrics_test.go index 5237e57c..e586c840 100644 --- a/internal/core/metrics_test.go +++ b/internal/core/metrics_test.go @@ -218,7 +218,7 @@ webrtc_sessions_bytes_sent 0 w := mpegts.NewWriter(bw, []*mpegts.Track{track}) require.NoError(t, err) - err = w.WriteH26x(track, 0, 0, true, [][]byte{ + err = w.WriteH264(track, 0, 0, true, [][]byte{ test.FormatH264.SPS, test.FormatH264.PPS, {0x05, 1}, // IDR diff --git a/internal/protocols/mpegts/from_stream.go b/internal/protocols/mpegts/from_stream.go index 48989aff..47abf82a 100644 --- a/internal/protocols/mpegts/from_stream.go +++ b/internal/protocols/mpegts/from_stream.go @@ -69,7 +69,7 @@ func FromStream( } sconn.SetWriteDeadline(time.Now().Add(writeTimeout)) - err = (*w).WriteH26x(track, durationGoToMPEGTS(tunit.PTS), durationGoToMPEGTS(dts), randomAccess, tunit.AU) + err = (*w).WriteH265(track, durationGoToMPEGTS(tunit.PTS), durationGoToMPEGTS(dts), randomAccess, tunit.AU) if err != nil { return err } @@ -102,7 +102,7 @@ func FromStream( } sconn.SetWriteDeadline(time.Now().Add(writeTimeout)) - err = (*w).WriteH26x(track, durationGoToMPEGTS(tunit.PTS), durationGoToMPEGTS(dts), idrPresent, tunit.AU) + err = (*w).WriteH264(track, durationGoToMPEGTS(tunit.PTS), durationGoToMPEGTS(dts), idrPresent, tunit.AU) if err != nil { return err } diff --git a/internal/protocols/mpegts/to_stream.go b/internal/protocols/mpegts/to_stream.go index d3c17228..282a78ae 100644 --- a/internal/protocols/mpegts/to_stream.go +++ b/internal/protocols/mpegts/to_stream.go @@ -41,7 +41,7 @@ func ToStream(r *mpegts.Reader, stream **stream.Stream) ([]*description.Media, e }}, } - r.OnDataH26x(track, func(pts int64, _ int64, au [][]byte) error { + r.OnDataH265(track, func(pts int64, _ int64, au [][]byte) error { (*stream).WriteUnit(medi, medi.Formats[0], &unit.H265{ Base: unit.Base{ NTP: time.Now(), @@ -61,7 +61,7 @@ func ToStream(r *mpegts.Reader, stream **stream.Stream) ([]*description.Media, e }}, } - r.OnDataH26x(track, func(pts int64, _ int64, au [][]byte) error { + r.OnDataH264(track, func(pts int64, _ int64, au [][]byte) error { (*stream).WriteUnit(medi, medi.Formats[0], &unit.H264{ Base: unit.Base{ NTP: time.Now(), diff --git a/internal/record/format_mpegts.go b/internal/record/format_mpegts.go index d7d4e652..381cb839 100644 --- a/internal/record/format_mpegts.go +++ b/internal/record/format_mpegts.go @@ -97,7 +97,7 @@ func (f *formatMPEGTS) initialize() { true, randomAccess, func() error { - return f.mw.WriteH26x(track, durationGoToMPEGTS(tunit.PTS), durationGoToMPEGTS(dts), randomAccess, tunit.AU) + return f.mw.WriteH265(track, durationGoToMPEGTS(tunit.PTS), durationGoToMPEGTS(dts), randomAccess, tunit.AU) }, ) }) @@ -133,7 +133,7 @@ func (f *formatMPEGTS) initialize() { true, randomAccess, func() error { - return f.mw.WriteH26x(track, durationGoToMPEGTS(tunit.PTS), durationGoToMPEGTS(dts), randomAccess, tunit.AU) + return f.mw.WriteH264(track, durationGoToMPEGTS(tunit.PTS), durationGoToMPEGTS(dts), randomAccess, tunit.AU) }, ) }) diff --git a/internal/servers/hls/muxer_instance.go b/internal/servers/hls/muxer_instance.go index a2290760..c1d87c7f 100644 --- a/internal/servers/hls/muxer_instance.go +++ b/internal/servers/hls/muxer_instance.go @@ -155,7 +155,7 @@ func (mi *muxerInstance) createVideoTrack() *gohlslib.Track { return nil } - err := mi.hmuxer.WriteH26x(tunit.NTP, tunit.PTS, tunit.AU) + err := mi.hmuxer.WriteH265(tunit.NTP, tunit.PTS, tunit.AU) if err != nil { return fmt.Errorf("muxer error: %w", err) } @@ -185,7 +185,7 @@ func (mi *muxerInstance) createVideoTrack() *gohlslib.Track { return nil } - err := mi.hmuxer.WriteH26x(tunit.NTP, tunit.PTS, tunit.AU) + err := mi.hmuxer.WriteH264(tunit.NTP, tunit.PTS, tunit.AU) if err != nil { return fmt.Errorf("muxer error: %w", err) } diff --git a/internal/servers/hls/server_test.go b/internal/servers/hls/server_test.go index 0db2bb65..5db01b81 100644 --- a/internal/servers/hls/server_test.go +++ b/internal/servers/hls/server_test.go @@ -11,7 +11,6 @@ import ( "github.com/bluenviron/gohlslib" "github.com/bluenviron/gohlslib/pkg/codecs" "github.com/bluenviron/gortsplib/v4/pkg/description" - "github.com/bluenviron/mediacommon/pkg/codecs/h264" "github.com/bluenviron/mediamtx/internal/auth" "github.com/bluenviron/mediamtx/internal/conf" "github.com/bluenviron/mediamtx/internal/defs" @@ -175,7 +174,6 @@ func TestServerRead(t *testing.T) { require.Equal(t, time.Duration(0), pts) require.Equal(t, time.Duration(0), dts) require.Equal(t, [][]byte{ - {byte(h264.NALUTypeAccessUnitDelimiter), 0xf0}, test.FormatH264.SPS, test.FormatH264.PPS, {5, 1}, @@ -276,7 +274,6 @@ func TestServerRead(t *testing.T) { require.Equal(t, time.Duration(0), pts) require.Equal(t, time.Duration(0), dts) require.Equal(t, [][]byte{ - {0x09, 0xf0}, test.FormatH264.SPS, test.FormatH264.PPS, {5, 1}, diff --git a/internal/servers/srt/server_test.go b/internal/servers/srt/server_test.go index 74645d64..e9fc4ce8 100644 --- a/internal/servers/srt/server_test.go +++ b/internal/servers/srt/server_test.go @@ -127,7 +127,7 @@ func TestServerPublish(t *testing.T) { w := mpegts.NewWriter(bw, []*mpegts.Track{track}) require.NoError(t, err) - err = w.WriteH26x(track, 0, 0, true, [][]byte{ + err = w.WriteH264(track, 0, 0, true, [][]byte{ test.FormatH264.SPS, test.FormatH264.PPS, {0x05, 1}, // IDR @@ -156,7 +156,7 @@ func TestServerPublish(t *testing.T) { return nil }) - err = w.WriteH26x(track, 0, 0, true, [][]byte{ + err = w.WriteH264(track, 0, 0, true, [][]byte{ {5, 2}, }) require.NoError(t, err) @@ -237,7 +237,7 @@ func TestServerRead(t *testing.T) { received := false - r.OnDataH26x(r.Tracks()[0], func(pts int64, dts int64, au [][]byte) error { + r.OnDataH264(r.Tracks()[0], func(pts int64, dts int64, au [][]byte) error { require.Equal(t, int64(0), pts) require.Equal(t, int64(0), dts) require.Equal(t, [][]byte{ diff --git a/internal/staticsources/hls/source_test.go b/internal/staticsources/hls/source_test.go index b4d9faef..bd38bede 100644 --- a/internal/staticsources/hls/source_test.go +++ b/internal/staticsources/hls/source_test.go @@ -63,7 +63,7 @@ func TestSource(t *testing.T) { err := w.WriteMPEG4Audio(track2, 1*90000, [][]byte{{1, 2, 3, 4}}) require.NoError(t, err) - err = w.WriteH26x(track1, 2*90000, 2*90000, true, [][]byte{ + err = w.WriteH264(track1, 2*90000, 2*90000, true, [][]byte{ {7, 1, 2, 3}, // SPS {8}, // PPS }) diff --git a/internal/staticsources/srt/source_test.go b/internal/staticsources/srt/source_test.go index 07d179ee..8222956f 100644 --- a/internal/staticsources/srt/source_test.go +++ b/internal/staticsources/srt/source_test.go @@ -40,7 +40,7 @@ func TestSource(t *testing.T) { w := mpegts.NewWriter(bw, []*mpegts.Track{track}) require.NoError(t, err) - err = w.WriteH26x(track, 0, 0, true, [][]byte{{ // IDR + err = w.WriteH264(track, 0, 0, true, [][]byte{{ // IDR 5, 1, }}) require.NoError(t, err) diff --git a/internal/staticsources/udp/source_test.go b/internal/staticsources/udp/source_test.go index f13bd3ad..9b40bad4 100644 --- a/internal/staticsources/udp/source_test.go +++ b/internal/staticsources/udp/source_test.go @@ -41,12 +41,12 @@ func TestSource(t *testing.T) { w := mpegts.NewWriter(bw, []*mpegts.Track{track}) require.NoError(t, err) - err = w.WriteH26x(track, 0, 0, true, [][]byte{{ // IDR + err = w.WriteH264(track, 0, 0, true, [][]byte{{ // IDR 5, 1, }}) require.NoError(t, err) - err = w.WriteH26x(track, 0, 0, true, [][]byte{{ // non-IDR + err = w.WriteH264(track, 0, 0, true, [][]byte{{ // non-IDR 5, 2, }}) require.NoError(t, err)