From fbf8e82db53a3738132620e2641ea35073c97760 Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Wed, 28 Dec 2022 20:32:03 +0100 Subject: [PATCH] update gortsplib --- go.mod | 2 +- go.sum | 4 +-- internal/core/api_test.go | 2 +- internal/core/formatprocessor_h264.go | 2 +- internal/core/formatprocessor_h265.go | 16 ++++++------ internal/core/hls_muxer.go | 2 +- internal/core/hls_source_test.go | 2 +- internal/core/rtmp_conn.go | 4 +-- internal/core/rtmp_server_test.go | 2 +- internal/core/rtmp_source.go | 2 +- internal/core/rtmp_source_test.go | 2 +- internal/core/rtsp_source_test.go | 26 +++++++++---------- internal/core/webrtc_conn.go | 2 +- internal/hls/client_processor_fmp4.go | 2 +- internal/hls/client_processor_mpegts.go | 4 +-- internal/hls/client_test.go | 2 +- internal/hls/fmp4/init.go | 2 +- internal/hls/fmp4/init_test.go | 2 +- internal/hls/fmp4/init_track.go | 2 +- internal/hls/mpegts/tracks.go | 2 +- internal/hls/mpegts/writer.go | 4 +-- internal/hls/mpegts/writer_test.go | 4 +-- internal/hls/muxer_test.go | 2 +- internal/hls/muxer_variant_fmp4_part.go | 2 +- internal/hls/muxer_variant_fmp4_segmenter.go | 2 +- .../hls/muxer_variant_mpegts_segmenter.go | 2 +- internal/rpicamera/rpicamera.go | 2 +- internal/rtmp/conn.go | 12 ++++----- internal/rtmp/conn_test.go | 4 +-- 29 files changed, 59 insertions(+), 59 deletions(-) diff --git a/go.mod b/go.mod index b8cd4b0bfbb..0c8b26e5999 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( code.cloudfoundry.org/bytefmt v0.0.0-20211005130812-5bb3c17173e5 github.com/abema/go-mp4 v0.8.0 - github.com/aler9/gortsplib/v2 v2.0.0-20221227124323-91f18ab6d93f + github.com/aler9/gortsplib/v2 v2.0.0-20221228192116-da21f946e562 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 diff --git a/go.sum b/go.sum index 37a485dd8b5..8fbbc4b3794 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,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/v2 v2.0.0-20221227124323-91f18ab6d93f h1:a3Hlki1+w0czcwKHOTAm9RBdIzGuQr2DF0CklloGwXU= -github.com/aler9/gortsplib/v2 v2.0.0-20221227124323-91f18ab6d93f/go.mod h1:lMdAxc6daduSzVwh75yQkvH9UHCYHpng/vJ8uXKFzdA= +github.com/aler9/gortsplib/v2 v2.0.0-20221228192116-da21f946e562 h1://BJIsHw2vYKdPL6sKbxZEnlGPpj2PTznNzRpou87ds= +github.com/aler9/gortsplib/v2 v2.0.0-20221228192116-da21f946e562/go.mod h1:lMdAxc6daduSzVwh75yQkvH9UHCYHpng/vJ8uXKFzdA= github.com/aler9/writerseeker v0.0.0-20220601075008-6f0e685b9c82 h1:9WgSzBLo3a9ToSVV7sRTBYZ1GGOZUpq4+5H3SN0UZq4= github.com/aler9/writerseeker v0.0.0-20220601075008-6f0e685b9c82/go.mod h1:qsMrZCbeBf/mCLOeF16KDkPu4gktn/pOWyaq1aYQE7U= github.com/asticode/go-astikit v0.20.0 h1:+7N+J4E4lWx2QOkRdOf6DafWJMv6O4RRfgClwQokrH8= diff --git a/internal/core/api_test.go b/internal/core/api_test.go index ca44840d61a..e3756813fe4 100644 --- a/internal/core/api_test.go +++ b/internal/core/api_test.go @@ -14,9 +14,9 @@ import ( "time" "github.com/aler9/gortsplib/v2" + "github.com/aler9/gortsplib/v2/pkg/codecs/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/format" "github.com/aler9/gortsplib/v2/pkg/media" - "github.com/aler9/gortsplib/v2/pkg/mpeg4audio" "github.com/pion/rtp" "github.com/stretchr/testify/require" diff --git a/internal/core/formatprocessor_h264.go b/internal/core/formatprocessor_h264.go index 932626a0850..9d390fa706c 100644 --- a/internal/core/formatprocessor_h264.go +++ b/internal/core/formatprocessor_h264.go @@ -4,9 +4,9 @@ import ( "bytes" "time" + "github.com/aler9/gortsplib/v2/pkg/codecs/h264" "github.com/aler9/gortsplib/v2/pkg/format" "github.com/aler9/gortsplib/v2/pkg/formatdecenc/rtph264" - "github.com/aler9/gortsplib/v2/pkg/h264" "github.com/pion/rtp" ) diff --git a/internal/core/formatprocessor_h265.go b/internal/core/formatprocessor_h265.go index 3027e6244e7..70af98f96e2 100644 --- a/internal/core/formatprocessor_h265.go +++ b/internal/core/formatprocessor_h265.go @@ -4,9 +4,9 @@ import ( "bytes" "time" + "github.com/aler9/gortsplib/v2/pkg/codecs/h265" "github.com/aler9/gortsplib/v2/pkg/format" "github.com/aler9/gortsplib/v2/pkg/formatdecenc/rtph265" - "github.com/aler9/gortsplib/v2/pkg/h265" "github.com/pion/rtp" ) @@ -19,16 +19,16 @@ func rtpH265ExtractVPSSPSPPS(pkt *rtp.Packet) ([]byte, []byte, []byte) { typ := h265.NALUType((pkt.Payload[0] >> 1) & 0b111111) switch typ { - case h265.NALUTypeVPS: + case h265.NALUType_VPS_NUT: return pkt.Payload, nil, nil - case h265.NALUTypeSPS: + case h265.NALUType_SPS_NUT: return nil, pkt.Payload, nil - case h265.NALUTypePPS: + case h265.NALUType_PPS_NUT: return nil, nil, pkt.Payload - case h265.NALUTypeAggregationUnit: + case h265.NALUType_AggregationUnit: payload := pkt.Payload[2:] var vps []byte var sps []byte @@ -56,13 +56,13 @@ func rtpH265ExtractVPSSPSPPS(pkt *rtp.Packet) ([]byte, []byte, []byte) { typ = h265.NALUType((pkt.Payload[0] >> 1) & 0b111111) switch typ { - case h265.NALUTypeVPS: + case h265.NALUType_VPS_NUT: vps = nalu - case h265.NALUTypeSPS: + case h265.NALUType_SPS_NUT: sps = nalu - case h265.NALUTypePPS: + case h265.NALUType_PPS_NUT: pps = nalu } } diff --git a/internal/core/hls_muxer.go b/internal/core/hls_muxer.go index f45a9cf828b..8889b9aca26 100644 --- a/internal/core/hls_muxer.go +++ b/internal/core/hls_muxer.go @@ -12,9 +12,9 @@ import ( "sync/atomic" "time" + "github.com/aler9/gortsplib/v2/pkg/codecs/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/format" "github.com/aler9/gortsplib/v2/pkg/media" - "github.com/aler9/gortsplib/v2/pkg/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/ringbuffer" "github.com/gin-gonic/gin" diff --git a/internal/core/hls_source_test.go b/internal/core/hls_source_test.go index 2cad56da59d..4b43bc7d9dc 100644 --- a/internal/core/hls_source_test.go +++ b/internal/core/hls_source_test.go @@ -10,7 +10,7 @@ import ( "time" "github.com/aler9/gortsplib/v2" - "github.com/aler9/gortsplib/v2/pkg/h264" + "github.com/aler9/gortsplib/v2/pkg/codecs/h264" "github.com/aler9/gortsplib/v2/pkg/url" "github.com/asticode/go-astits" "github.com/gin-gonic/gin" diff --git a/internal/core/rtmp_conn.go b/internal/core/rtmp_conn.go index 21e7445dcec..f6767f926a7 100644 --- a/internal/core/rtmp_conn.go +++ b/internal/core/rtmp_conn.go @@ -10,10 +10,10 @@ import ( "sync" "time" + "github.com/aler9/gortsplib/v2/pkg/codecs/h264" + "github.com/aler9/gortsplib/v2/pkg/codecs/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/h264" "github.com/aler9/gortsplib/v2/pkg/media" - "github.com/aler9/gortsplib/v2/pkg/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/ringbuffer" "github.com/google/uuid" "github.com/notedit/rtmp/format/flv/flvio" diff --git a/internal/core/rtmp_server_test.go b/internal/core/rtmp_server_test.go index 9db29243634..2f2c217583d 100644 --- a/internal/core/rtmp_server_test.go +++ b/internal/core/rtmp_server_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" + "github.com/aler9/gortsplib/v2/pkg/codecs/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/mpeg4audio" "github.com/notedit/rtmp/format/flv/flvio" "github.com/stretchr/testify/require" diff --git a/internal/core/rtmp_source.go b/internal/core/rtmp_source.go index 0d2c8dc6b92..d0b44dae9b5 100644 --- a/internal/core/rtmp_source.go +++ b/internal/core/rtmp_source.go @@ -11,8 +11,8 @@ import ( "strings" "time" + "github.com/aler9/gortsplib/v2/pkg/codecs/h264" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/h264" "github.com/aler9/gortsplib/v2/pkg/media" "github.com/notedit/rtmp/format/flv/flvio" diff --git a/internal/core/rtmp_source_test.go b/internal/core/rtmp_source_test.go index d49b10dd2ac..6025a1dbae8 100644 --- a/internal/core/rtmp_source_test.go +++ b/internal/core/rtmp_source_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/aler9/gortsplib/v2" + "github.com/aler9/gortsplib/v2/pkg/codecs/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/url" "github.com/notedit/rtmp/format/flv/flvio" "github.com/pion/rtp" diff --git a/internal/core/rtsp_source_test.go b/internal/core/rtsp_source_test.go index 52d680741fc..1a035bb21f8 100644 --- a/internal/core/rtsp_source_test.go +++ b/internal/core/rtsp_source_test.go @@ -12,9 +12,9 @@ import ( "github.com/aler9/gortsplib/v2" "github.com/aler9/gortsplib/v2/pkg/auth" "github.com/aler9/gortsplib/v2/pkg/base" + "github.com/aler9/gortsplib/v2/pkg/codecs/h265" "github.com/aler9/gortsplib/v2/pkg/conn" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/h265" "github.com/aler9/gortsplib/v2/pkg/headers" "github.com/aler9/gortsplib/v2/pkg/media" "github.com/aler9/gortsplib/v2/pkg/url" @@ -385,42 +385,42 @@ func TestRTSPSourceDynamicH264Params(t *testing.T) { enc := forma.CreateEncoder() - pkts, err := enc.Encode([][]byte{{byte(h265.NALUTypeVPS) << 1, 1, 2, 3}}, 0) + pkts, err := enc.Encode([][]byte{{byte(h265.NALUType_VPS_NUT) << 1, 1, 2, 3}}, 0) require.NoError(t, err) stream.WritePacketRTP(medi, pkts[0]) - pkts, err = enc.Encode([][]byte{{byte(h265.NALUTypeSPS) << 1, 4, 5, 6}}, 0) + pkts, err = enc.Encode([][]byte{{byte(h265.NALUType_SPS_NUT) << 1, 4, 5, 6}}, 0) require.NoError(t, err) stream.WritePacketRTP(medi, pkts[0]) - pkts, err = enc.Encode([][]byte{{byte(h265.NALUTypePPS) << 1, 7, 8, 9}}, 0) + pkts, err = enc.Encode([][]byte{{byte(h265.NALUType_PPS_NUT) << 1, 7, 8, 9}}, 0) require.NoError(t, err) stream.WritePacketRTP(medi, pkts[0]) checkTrack(t, &format.H265{ PayloadTyp: 96, - VPS: []byte{byte(h265.NALUTypeVPS) << 1, 1, 2, 3}, - SPS: []byte{byte(h265.NALUTypeSPS) << 1, 4, 5, 6}, - PPS: []byte{byte(h265.NALUTypePPS) << 1, 7, 8, 9}, + VPS: []byte{byte(h265.NALUType_VPS_NUT) << 1, 1, 2, 3}, + SPS: []byte{byte(h265.NALUType_SPS_NUT) << 1, 4, 5, 6}, + PPS: []byte{byte(h265.NALUType_PPS_NUT) << 1, 7, 8, 9}, }) - pkts, err = enc.Encode([][]byte{{byte(h265.NALUTypeVPS) << 1, 10, 11, 12}}, 0) + pkts, err = enc.Encode([][]byte{{byte(h265.NALUType_VPS_NUT) << 1, 10, 11, 12}}, 0) require.NoError(t, err) stream.WritePacketRTP(medi, pkts[0]) - pkts, err = enc.Encode([][]byte{{byte(h265.NALUTypeSPS) << 1, 13, 14, 15}}, 0) + pkts, err = enc.Encode([][]byte{{byte(h265.NALUType_SPS_NUT) << 1, 13, 14, 15}}, 0) require.NoError(t, err) stream.WritePacketRTP(medi, pkts[0]) - pkts, err = enc.Encode([][]byte{{byte(h265.NALUTypePPS) << 1, 16, 17, 18}}, 0) + pkts, err = enc.Encode([][]byte{{byte(h265.NALUType_PPS_NUT) << 1, 16, 17, 18}}, 0) require.NoError(t, err) stream.WritePacketRTP(medi, pkts[0]) checkTrack(t, &format.H265{ PayloadTyp: 96, - VPS: []byte{byte(h265.NALUTypeVPS) << 1, 10, 11, 12}, - SPS: []byte{byte(h265.NALUTypeSPS) << 1, 13, 14, 15}, - PPS: []byte{byte(h265.NALUTypePPS) << 1, 16, 17, 18}, + VPS: []byte{byte(h265.NALUType_VPS_NUT) << 1, 10, 11, 12}, + SPS: []byte{byte(h265.NALUType_SPS_NUT) << 1, 13, 14, 15}, + PPS: []byte{byte(h265.NALUType_PPS_NUT) << 1, 16, 17, 18}, }) }) } diff --git a/internal/core/webrtc_conn.go b/internal/core/webrtc_conn.go index 7f0b2843eaf..1743b01d17f 100644 --- a/internal/core/webrtc_conn.go +++ b/internal/core/webrtc_conn.go @@ -15,11 +15,11 @@ import ( "sync" "time" + "github.com/aler9/gortsplib/v2/pkg/codecs/h264" "github.com/aler9/gortsplib/v2/pkg/format" "github.com/aler9/gortsplib/v2/pkg/formatdecenc/rtph264" "github.com/aler9/gortsplib/v2/pkg/formatdecenc/rtpvp8" "github.com/aler9/gortsplib/v2/pkg/formatdecenc/rtpvp9" - "github.com/aler9/gortsplib/v2/pkg/h264" "github.com/aler9/gortsplib/v2/pkg/media" "github.com/aler9/gortsplib/v2/pkg/ringbuffer" "github.com/google/uuid" diff --git a/internal/hls/client_processor_fmp4.go b/internal/hls/client_processor_fmp4.go index 71ba572f02b..e56137eca24 100644 --- a/internal/hls/client_processor_fmp4.go +++ b/internal/hls/client_processor_fmp4.go @@ -5,8 +5,8 @@ import ( "fmt" "time" + "github.com/aler9/gortsplib/v2/pkg/codecs/h264" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/h264" "github.com/aler9/rtsp-simple-server/internal/hls/fmp4" ) diff --git a/internal/hls/client_processor_mpegts.go b/internal/hls/client_processor_mpegts.go index 392aa42a995..26f41e62622 100644 --- a/internal/hls/client_processor_mpegts.go +++ b/internal/hls/client_processor_mpegts.go @@ -7,9 +7,9 @@ import ( "strings" "time" + "github.com/aler9/gortsplib/v2/pkg/codecs/h264" + "github.com/aler9/gortsplib/v2/pkg/codecs/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/h264" - "github.com/aler9/gortsplib/v2/pkg/mpeg4audio" "github.com/asticode/go-astits" "github.com/aler9/rtsp-simple-server/internal/hls/mpegts" diff --git a/internal/hls/client_test.go b/internal/hls/client_test.go index 5552f7a7d3a..b630fcc5cc9 100644 --- a/internal/hls/client_test.go +++ b/internal/hls/client_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" + "github.com/aler9/gortsplib/v2/pkg/codecs/h264" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/h264" "github.com/asticode/go-astits" "github.com/gin-gonic/gin" "github.com/stretchr/testify/require" diff --git a/internal/hls/fmp4/init.go b/internal/hls/fmp4/init.go index c6db04ad8e6..3f94007cf5b 100644 --- a/internal/hls/fmp4/init.go +++ b/internal/hls/fmp4/init.go @@ -5,8 +5,8 @@ import ( "fmt" gomp4 "github.com/abema/go-mp4" + "github.com/aler9/gortsplib/v2/pkg/codecs/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/mpeg4audio" ) // Init is a FMP4 initialization file. diff --git a/internal/hls/fmp4/init_test.go b/internal/hls/fmp4/init_test.go index 6c6f207f1fb..433e65f7c2b 100644 --- a/internal/hls/fmp4/init_test.go +++ b/internal/hls/fmp4/init_test.go @@ -4,8 +4,8 @@ package fmp4 import ( "testing" + "github.com/aler9/gortsplib/v2/pkg/codecs/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/mpeg4audio" "github.com/stretchr/testify/require" ) diff --git a/internal/hls/fmp4/init_track.go b/internal/hls/fmp4/init_track.go index e68249e20c9..737876f3dda 100644 --- a/internal/hls/fmp4/init_track.go +++ b/internal/hls/fmp4/init_track.go @@ -2,8 +2,8 @@ package fmp4 import ( gomp4 "github.com/abema/go-mp4" + "github.com/aler9/gortsplib/v2/pkg/codecs/h264" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/h264" ) // InitTrack is a track of Init. diff --git a/internal/hls/mpegts/tracks.go b/internal/hls/mpegts/tracks.go index e0ec8497aef..cb3a0fc5b7a 100644 --- a/internal/hls/mpegts/tracks.go +++ b/internal/hls/mpegts/tracks.go @@ -5,8 +5,8 @@ import ( "context" "fmt" + "github.com/aler9/gortsplib/v2/pkg/codecs/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/mpeg4audio" "github.com/asticode/go-astits" ) diff --git a/internal/hls/mpegts/writer.go b/internal/hls/mpegts/writer.go index 43d1471c345..7b59a12c512 100644 --- a/internal/hls/mpegts/writer.go +++ b/internal/hls/mpegts/writer.go @@ -6,9 +6,9 @@ import ( "context" "time" + "github.com/aler9/gortsplib/v2/pkg/codecs/h264" + "github.com/aler9/gortsplib/v2/pkg/codecs/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/h264" - "github.com/aler9/gortsplib/v2/pkg/mpeg4audio" "github.com/asticode/go-astits" ) diff --git a/internal/hls/mpegts/writer_test.go b/internal/hls/mpegts/writer_test.go index 58ca0105e87..9e750b346e1 100644 --- a/internal/hls/mpegts/writer_test.go +++ b/internal/hls/mpegts/writer_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" + "github.com/aler9/gortsplib/v2/pkg/codecs/h264" + "github.com/aler9/gortsplib/v2/pkg/codecs/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/h264" - "github.com/aler9/gortsplib/v2/pkg/mpeg4audio" "github.com/asticode/go-astits" "github.com/stretchr/testify/require" ) diff --git a/internal/hls/muxer_test.go b/internal/hls/muxer_test.go index 975cdb55f81..0acb153ff16 100644 --- a/internal/hls/muxer_test.go +++ b/internal/hls/muxer_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" + "github.com/aler9/gortsplib/v2/pkg/codecs/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/mpeg4audio" "github.com/stretchr/testify/require" ) diff --git a/internal/hls/muxer_variant_fmp4_part.go b/internal/hls/muxer_variant_fmp4_part.go index 9586f97667c..5ad4a66b97f 100644 --- a/internal/hls/muxer_variant_fmp4_part.go +++ b/internal/hls/muxer_variant_fmp4_part.go @@ -6,8 +6,8 @@ import ( "strconv" "time" + "github.com/aler9/gortsplib/v2/pkg/codecs/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/mpeg4audio" "github.com/aler9/rtsp-simple-server/internal/hls/fmp4" ) diff --git a/internal/hls/muxer_variant_fmp4_segmenter.go b/internal/hls/muxer_variant_fmp4_segmenter.go index 2a22ec3746a..72fbf84edf0 100644 --- a/internal/hls/muxer_variant_fmp4_segmenter.go +++ b/internal/hls/muxer_variant_fmp4_segmenter.go @@ -4,8 +4,8 @@ import ( "bytes" "time" + "github.com/aler9/gortsplib/v2/pkg/codecs/h264" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/h264" "github.com/aler9/rtsp-simple-server/internal/hls/fmp4" ) diff --git a/internal/hls/muxer_variant_mpegts_segmenter.go b/internal/hls/muxer_variant_mpegts_segmenter.go index 721e30e9400..c9cccf0c926 100644 --- a/internal/hls/muxer_variant_mpegts_segmenter.go +++ b/internal/hls/muxer_variant_mpegts_segmenter.go @@ -3,8 +3,8 @@ package hls import ( "time" + "github.com/aler9/gortsplib/v2/pkg/codecs/h264" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/h264" "github.com/aler9/rtsp-simple-server/internal/hls/mpegts" ) diff --git a/internal/rpicamera/rpicamera.go b/internal/rpicamera/rpicamera.go index 07e9972e23c..53544a8ace4 100644 --- a/internal/rpicamera/rpicamera.go +++ b/internal/rpicamera/rpicamera.go @@ -13,7 +13,7 @@ import ( "strings" "time" - "github.com/aler9/gortsplib/v2/pkg/h264" + "github.com/aler9/gortsplib/v2/pkg/codecs/h264" ) //go:embed exe/exe diff --git a/internal/rtmp/conn.go b/internal/rtmp/conn.go index 12a1926cff4..16c1e839faa 100644 --- a/internal/rtmp/conn.go +++ b/internal/rtmp/conn.go @@ -9,10 +9,10 @@ import ( "strings" "time" + "github.com/aler9/gortsplib/v2/pkg/codecs/h264" + "github.com/aler9/gortsplib/v2/pkg/codecs/h265" + "github.com/aler9/gortsplib/v2/pkg/codecs/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/h264" - "github.com/aler9/gortsplib/v2/pkg/h265" - "github.com/aler9/gortsplib/v2/pkg/mpeg4audio" "github.com/notedit/rtmp/format/flv/flvio" "github.com/aler9/rtsp-simple-server/internal/rtmp/bytecounter" @@ -720,13 +720,13 @@ func (c *Conn) readTracksFromMetadata(payload []interface{}) (format.Format, *fo typ := h265.NALUType((nalu[0] >> 1) & 0b111111) switch typ { - case h265.NALUTypeVPS: + case h265.NALUType_VPS_NUT: h265VPS = append([]byte(nil), nalu...) - case h265.NALUTypeSPS: + case h265.NALUType_SPS_NUT: h265SPS = append([]byte(nil), nalu...) - case h265.NALUTypePPS: + case h265.NALUType_PPS_NUT: h265PPS = append([]byte(nil), nalu...) } } diff --git a/internal/rtmp/conn_test.go b/internal/rtmp/conn_test.go index f5dc67371ef..c8c5c2f1d62 100644 --- a/internal/rtmp/conn_test.go +++ b/internal/rtmp/conn_test.go @@ -6,9 +6,9 @@ import ( "net/url" "testing" + "github.com/aler9/gortsplib/v2/pkg/codecs/h264" + "github.com/aler9/gortsplib/v2/pkg/codecs/mpeg4audio" "github.com/aler9/gortsplib/v2/pkg/format" - "github.com/aler9/gortsplib/v2/pkg/h264" - "github.com/aler9/gortsplib/v2/pkg/mpeg4audio" "github.com/notedit/rtmp/format/flv/flvio" "github.com/stretchr/testify/require"