From f2191fbfa7f6ede87e3837cf6b1e5a4a92e18b62 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Mon, 13 Jan 2025 15:25:13 +0100 Subject: [PATCH] Finish moving SDESRTPStreamIDURI (#3000) Finish moving SDESRTPStreamIDURI from here to pion/sdp. --- constants.go | 2 -- go.mod | 2 +- go.sum | 12 ++---------- interceptor.go | 2 +- peerconnection.go | 2 +- peerconnection_media_test.go | 4 ++-- rtpreceiver_go_test.go | 2 +- 7 files changed, 8 insertions(+), 18 deletions(-) diff --git a/constants.go b/constants.go index bd3e8921c49..5a22e339fdd 100644 --- a/constants.go +++ b/constants.go @@ -33,8 +33,6 @@ const ( generatedCertificateOrigin = "WebRTC" - sdesRepairRTPStreamIDURI = "urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id" - // AttributeRtxPayloadType is the interceptor attribute added when Read() returns an RTX packet containing the RTX stream payload type AttributeRtxPayloadType = "rtx_payload_type" // AttributeRtxSsrc is the interceptor attribute added when Read() returns an RTX packet containing the RTX stream SSRC diff --git a/go.mod b/go.mod index 8fc8e074b07..e3ca0695684 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/pion/rtcp v1.2.15 github.com/pion/rtp v1.8.10 github.com/pion/sctp v1.8.35 - github.com/pion/sdp/v3 v3.0.9 + github.com/pion/sdp/v3 v3.0.10 github.com/pion/srtp/v3 v3.0.4 github.com/pion/stun/v3 v3.0.0 github.com/pion/transport/v3 v3.0.7 diff --git a/go.sum b/go.sum index 75f117ca4e7..543a9e52ecf 100644 --- a/go.sum +++ b/go.sum @@ -55,8 +55,8 @@ github.com/pion/rtp v1.8.10 h1:puphjdbjPB+L+NFaVuZ5h6bt1g5q4kFIoI+r5q/g0CU= github.com/pion/rtp v1.8.10/go.mod h1:8uMBJj32Pa1wwx8Fuv/AsFhn8jsgw+3rUC2PfoBZ8p4= github.com/pion/sctp v1.8.35 h1:qwtKvNK1Wc5tHMIYgTDJhfZk7vATGVHhXbUDfHbYwzA= github.com/pion/sctp v1.8.35/go.mod h1:EcXP8zCYVTRy3W9xtOF7wJm1L1aXfKRQzaM33SjQlzg= -github.com/pion/sdp/v3 v3.0.9 h1:pX++dCHoHUwq43kuwf3PyJfHlwIj4hXA7Vrifiq0IJY= -github.com/pion/sdp/v3 v3.0.9/go.mod h1:B5xmvENq5IXJimIO4zfp6LAe1fD9N+kFv+V/1lOdz8M= +github.com/pion/sdp/v3 v3.0.10 h1:6MChLE/1xYB+CjumMw+gZ9ufp2DPApuVSnDT8t5MIgA= +github.com/pion/sdp/v3 v3.0.10/go.mod h1:88GMahN5xnScv1hIMTqLdu/cOcUkj6a9ytbncwMCq2E= github.com/pion/srtp/v3 v3.0.4 h1:2Z6vDVxzrX3UHEgrUyIGM4rRouoC7v+NiF1IHtp9B5M= github.com/pion/srtp/v3 v3.0.4/go.mod h1:1Jx3FwDoxpRaTh1oRV8A/6G1BnFL+QI82eK4ms8EEJQ= github.com/pion/stun/v3 v3.0.0 h1:4h1gwhWLWuZWOJIJR9s2ferRO+W3zA/b6ijOI6mKzUw= @@ -70,14 +70,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/sclevine/agouti v3.0.0+incompatible h1:8IBJS6PWz3uTlMP3YBIR5f+KAldcGuOeFkFbUWfBgK4= github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/wlynxg/anet v0.0.5 h1:J3VJGi1gvo0JwZ/P1/Yc/8p63SoW98B5dHkYDmpgvvU= @@ -143,6 +136,5 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/interceptor.go b/interceptor.go index 0a8bde25ec4..b9e7f40d7ad 100644 --- a/interceptor.go +++ b/interceptor.go @@ -138,7 +138,7 @@ func ConfigureSimulcastExtensionHeaders(mediaEngine *MediaEngine) error { return err } - return mediaEngine.RegisterHeaderExtension(RTPHeaderExtensionCapability{URI: sdesRepairRTPStreamIDURI}, RTPCodecTypeVideo) + return mediaEngine.RegisterHeaderExtension(RTPHeaderExtensionCapability{URI: sdp.SDESRepairRTPStreamIDURI}, RTPCodecTypeVideo) } type interceptorToTrackLocalWriter struct{ interceptor atomic.Value } // interceptor.RTPWriter } diff --git a/peerconnection.go b/peerconnection.go index dc61b2b54ae..5e613c224cc 100644 --- a/peerconnection.go +++ b/peerconnection.go @@ -1616,7 +1616,7 @@ func (pc *PeerConnection) handleIncomingSSRC(rtpStream io.Reader, ssrc SSRC) err return errPeerConnSimulcastStreamIDRTPExtensionRequired } - repairStreamIDExtensionID, _, _ := pc.api.mediaEngine.getHeaderExtensionID(RTPHeaderExtensionCapability{sdesRepairRTPStreamIDURI}) + repairStreamIDExtensionID, _, _ := pc.api.mediaEngine.getHeaderExtensionID(RTPHeaderExtensionCapability{sdp.SDESRepairRTPStreamIDURI}) b := make([]byte, pc.api.settingEngine.getReceiveMTU()) diff --git a/peerconnection_media_test.go b/peerconnection_media_test.go index a9450096334..23259bfbdc8 100644 --- a/peerconnection_media_test.go +++ b/peerconnection_media_test.go @@ -1504,7 +1504,7 @@ func TestPeerConnection_Simulcast_RTX(t *testing.T) { midID = uint8(extension.ID) case sdp.SDESRTPStreamIDURI: ridID = uint8(extension.ID) - case sdesRepairRTPStreamIDURI: + case sdp.SDESRepairRTPStreamIDURI: rsid = uint8(extension.ID) } } @@ -1678,7 +1678,7 @@ func TestPeerConnection_Simulcast_NoDataChannel(t *testing.T) { midID = uint8(extension.ID) case sdp.SDESRTPStreamIDURI: ridID = uint8(extension.ID) - case sdesRepairRTPStreamIDURI: + case sdp.SDESRepairRTPStreamIDURI: rsidID = uint8(extension.ID) } } diff --git a/rtpreceiver_go_test.go b/rtpreceiver_go_test.go index 0d3ef2d4bf0..d9f8eb85849 100644 --- a/rtpreceiver_go_test.go +++ b/rtpreceiver_go_test.go @@ -37,7 +37,7 @@ func TestSetRTPParameters(t *testing.T) { HeaderExtensions: []RTPHeaderExtensionParameter{ {URI: sdp.SDESMidURI}, {URI: sdp.SDESRTPStreamIDURI}, - {URI: sdesRepairRTPStreamIDURI}, + {URI: sdp.SDESRepairRTPStreamIDURI}, }, }