mirror of
https://github.com/pion/webrtc.git
synced 2025-09-26 19:21:12 +08:00
Upgrade pion/rtp to v2
Also updates interceptor and srtp
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
"github.com/pion/interceptor"
|
||||
"github.com/pion/rtcp"
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/v2"
|
||||
"github.com/pion/webrtc/v3"
|
||||
"github.com/pion/webrtc/v3/examples/internal/signal"
|
||||
)
|
||||
|
@@ -10,7 +10,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/pion/rtcp"
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/v2"
|
||||
"github.com/pion/webrtc/v3"
|
||||
"github.com/pion/webrtc/v3/examples/internal/signal"
|
||||
)
|
||||
|
6
go.mod
6
go.mod
@@ -8,14 +8,14 @@ require (
|
||||
github.com/pion/datachannel v1.4.21
|
||||
github.com/pion/dtls/v2 v2.0.9
|
||||
github.com/pion/ice/v2 v2.1.10
|
||||
github.com/pion/interceptor v0.0.13
|
||||
github.com/pion/interceptor v0.0.14
|
||||
github.com/pion/logging v0.2.2
|
||||
github.com/pion/randutil v0.1.0
|
||||
github.com/pion/rtcp v1.2.6
|
||||
github.com/pion/rtp v1.6.5
|
||||
github.com/pion/rtp/v2 v2.0.0
|
||||
github.com/pion/sctp v1.7.12
|
||||
github.com/pion/sdp/v3 v3.0.4
|
||||
github.com/pion/srtp/v2 v2.0.2
|
||||
github.com/pion/srtp/v2 v2.0.3
|
||||
github.com/pion/transport v0.12.3
|
||||
github.com/sclevine/agouti v3.0.0+incompatible
|
||||
github.com/stretchr/testify v1.7.0
|
||||
|
13
go.sum
13
go.sum
@@ -43,8 +43,8 @@ github.com/pion/dtls/v2 v2.0.9 h1:7Ow+V++YSZQMYzggI0P9vLJz/hUFcffsfGMfT/Qy+u8=
|
||||
github.com/pion/dtls/v2 v2.0.9/go.mod h1:O0Wr7si/Zj5/EBFlDzDd6UtVxx25CE1r7XM7BQKYQho=
|
||||
github.com/pion/ice/v2 v2.1.10 h1:Jt/BfUsaP+Dr6E5rbsy+w7w1JtHyFN0w2DkgfWq7Fko=
|
||||
github.com/pion/ice/v2 v2.1.10/go.mod h1:kV4EODVD5ux2z8XncbLHIOtcXKtYXVgLVCeVqnpoeP0=
|
||||
github.com/pion/interceptor v0.0.13 h1:fnV+b0p/KEzwwr/9z2nsSqA9IQRMsM4nF5HjrNSWwBo=
|
||||
github.com/pion/interceptor v0.0.13/go.mod h1:svsW2QoLHLoGLUr4pDoSopGBEWk8FZwlfxId/OKRKzo=
|
||||
github.com/pion/interceptor v0.0.14 h1:gZqh9DMqE+UAnct37CfvAJj7KyYpKaFe9JkYOKMrHFU=
|
||||
github.com/pion/interceptor v0.0.14/go.mod h1:brot6Cq/5/C8oQM+NwftyvCNZWYtIVRucQ67+adgA7g=
|
||||
github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
|
||||
github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
|
||||
github.com/pion/mdns v0.0.5 h1:Q2oj/JB3NqfzY9xGZ1fPzZzK7sDSD8rZPOvcIQ10BCw=
|
||||
@@ -53,16 +53,15 @@ github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
|
||||
github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
|
||||
github.com/pion/rtcp v1.2.6 h1:1zvwBbyd0TeEuuWftrd/4d++m+/kZSeiguxU61LFWpo=
|
||||
github.com/pion/rtcp v1.2.6/go.mod h1:52rMNPWFsjr39z9B9MhnkqhPLoeHTv1aN63o/42bWE0=
|
||||
github.com/pion/rtp v1.6.2/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
|
||||
github.com/pion/rtp v1.6.5 h1:o2cZf8OascA5HF/b0PAbTxRKvOWxTQxWYt7SlToxFGI=
|
||||
github.com/pion/rtp v1.6.5/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
|
||||
github.com/pion/rtp/v2 v2.0.0 h1:8s4xPETm04IugKZaykpJnJ8LAGDLOQpsIpRXMzgM6Ow=
|
||||
github.com/pion/rtp/v2 v2.0.0/go.mod h1:Vj+rrFbJCT3yxqE/VSwaOo9DQ2pMKGPxuE7hplGOlOs=
|
||||
github.com/pion/sctp v1.7.10/go.mod h1:EhpTUQu1/lcK3xI+eriS6/96fWetHGCvBi9MSsnaBN0=
|
||||
github.com/pion/sctp v1.7.12 h1:GsatLufywVruXbZZT1CKg+Jr8ZTkwiPnmUC/oO9+uuY=
|
||||
github.com/pion/sctp v1.7.12/go.mod h1:xFe9cLMZ5Vj6eOzpyiKjT9SwGM4KpK/8Jbw5//jc+0s=
|
||||
github.com/pion/sdp/v3 v3.0.4 h1:2Kf+dgrzJflNCSw3TV5v2VLeI0s/qkzy2r5jlR0wzf8=
|
||||
github.com/pion/sdp/v3 v3.0.4/go.mod h1:bNiSknmJE0HYBprTHXKPQ3+JjacTv5uap92ueJZKsRk=
|
||||
github.com/pion/srtp/v2 v2.0.2 h1:664iGzVmaY7KYS5M0gleY0DscRo9ReDfTxQrq4UgGoU=
|
||||
github.com/pion/srtp/v2 v2.0.2/go.mod h1:VEyLv4CuxrwGY8cxM+Ng3bmVy8ckz/1t6A0q/msKOw0=
|
||||
github.com/pion/srtp/v2 v2.0.3 h1:MUnSpDGPezbthRMTcjYouIrOIIvDqFZwAmLs1agcrcE=
|
||||
github.com/pion/srtp/v2 v2.0.3/go.mod h1:2WNQl3ijuEAkDYfTpW8BXkfOey8zIYsoqemr6cYmdVw=
|
||||
github.com/pion/stun v0.3.5 h1:uLUCBCkQby4S1cf6CGuR9QrVOKcvUwFeemaC865QHDg=
|
||||
github.com/pion/stun v0.3.5/go.mod h1:gDMim+47EeEtfWogA37n6qXZS88L5V6LqFcf+DZA2UA=
|
||||
github.com/pion/transport v0.10.1/go.mod h1:PBis1stIILMiis0PewDw91WJeLJkyIMcEk+DwKOzf4A=
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/pion/interceptor"
|
||||
"github.com/pion/interceptor/pkg/nack"
|
||||
"github.com/pion/interceptor/pkg/report"
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/v2"
|
||||
)
|
||||
|
||||
// RegisterDefaultInterceptors will register some useful interceptors.
|
||||
|
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
"github.com/pion/interceptor"
|
||||
mock_interceptor "github.com/pion/interceptor/pkg/mock"
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/v2"
|
||||
"github.com/pion/transport/test"
|
||||
"github.com/pion/webrtc/v3/pkg/media"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
@@ -9,8 +9,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/codecs"
|
||||
"github.com/pion/rtp/v2"
|
||||
"github.com/pion/rtp/v2/codecs"
|
||||
"github.com/pion/sdp/v3"
|
||||
)
|
||||
|
||||
|
@@ -19,7 +19,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/pion/ice/v2"
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/v2"
|
||||
"github.com/pion/transport/test"
|
||||
"github.com/pion/transport/vnet"
|
||||
"github.com/pion/webrtc/v3/internal/util"
|
||||
@@ -1091,7 +1091,6 @@ func TestPeerConnection_MassiveTracks(t *testing.T) {
|
||||
Extension: false,
|
||||
ExtensionProfile: 1,
|
||||
Version: 2,
|
||||
PayloadOffset: 20,
|
||||
SequenceNumber: 27023,
|
||||
Timestamp: 3653407706,
|
||||
CSRC: []uint32{},
|
||||
|
@@ -16,7 +16,7 @@ import (
|
||||
|
||||
"github.com/pion/randutil"
|
||||
"github.com/pion/rtcp"
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/v2"
|
||||
"github.com/pion/transport/test"
|
||||
"github.com/pion/webrtc/v3/pkg/media"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
@@ -7,8 +7,8 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/codecs"
|
||||
"github.com/pion/rtp/v2"
|
||||
"github.com/pion/rtp/v2/codecs"
|
||||
)
|
||||
|
||||
type (
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@@ -7,8 +7,8 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/codecs"
|
||||
"github.com/pion/rtp/v2"
|
||||
"github.com/pion/rtp/v2/codecs"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@@ -5,8 +5,8 @@ import (
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/codecs"
|
||||
"github.com/pion/rtp/v2"
|
||||
"github.com/pion/rtp/v2/codecs"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@@ -33,7 +33,6 @@ func TestIVFWriter_AddPacketAndClose(t *testing.T) {
|
||||
Extension: true,
|
||||
ExtensionProfile: 1,
|
||||
Version: 2,
|
||||
PayloadOffset: 20,
|
||||
PayloadType: 96,
|
||||
SequenceNumber: 27023,
|
||||
Timestamp: 3653407706,
|
||||
@@ -41,7 +40,6 @@ func TestIVFWriter_AddPacketAndClose(t *testing.T) {
|
||||
CSRC: []uint32{},
|
||||
},
|
||||
Payload: rawValidPkt[20:],
|
||||
Raw: rawValidPkt,
|
||||
}
|
||||
assert.NoError(t, validPacket.SetExtension(0, []byte{0xFF, 0xFF, 0xFF, 0xFF}))
|
||||
|
||||
@@ -57,7 +55,6 @@ func TestIVFWriter_AddPacketAndClose(t *testing.T) {
|
||||
Extension: true,
|
||||
ExtensionProfile: 1,
|
||||
Version: 2,
|
||||
PayloadOffset: 20,
|
||||
PayloadType: 96,
|
||||
SequenceNumber: 27023,
|
||||
Timestamp: 3653407706,
|
||||
@@ -65,7 +62,6 @@ func TestIVFWriter_AddPacketAndClose(t *testing.T) {
|
||||
CSRC: []uint32{},
|
||||
},
|
||||
Payload: rawMidPartPkt[20:],
|
||||
Raw: rawMidPartPkt,
|
||||
}
|
||||
assert.NoError(t, midPartPacket.SetExtension(0, []byte{0xFF, 0xFF, 0xFF, 0xFF}))
|
||||
|
||||
@@ -81,7 +77,6 @@ func TestIVFWriter_AddPacketAndClose(t *testing.T) {
|
||||
Extension: true,
|
||||
ExtensionProfile: 1,
|
||||
Version: 2,
|
||||
PayloadOffset: 20,
|
||||
PayloadType: 96,
|
||||
SequenceNumber: 27023,
|
||||
Timestamp: 3653407706,
|
||||
@@ -89,7 +84,6 @@ func TestIVFWriter_AddPacketAndClose(t *testing.T) {
|
||||
CSRC: []uint32{},
|
||||
},
|
||||
Payload: rawKeyframePkt[20:],
|
||||
Raw: rawKeyframePkt,
|
||||
}
|
||||
assert.NoError(t, keyframePacket.SetExtension(0, []byte{0xFF, 0xFF, 0xFF, 0xFF}))
|
||||
|
||||
|
@@ -4,7 +4,7 @@ package media
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/v2"
|
||||
)
|
||||
|
||||
// A Sample contains encoded media and timing information
|
||||
|
@@ -8,8 +8,8 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/pion/randutil"
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/codecs"
|
||||
"github.com/pion/rtp/v2"
|
||||
"github.com/pion/rtp/v2/codecs"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@@ -31,7 +31,6 @@ func TestOggWriter_AddPacketAndClose(t *testing.T) {
|
||||
Extension: true,
|
||||
ExtensionProfile: 1,
|
||||
Version: 2,
|
||||
PayloadOffset: 20,
|
||||
PayloadType: 111,
|
||||
SequenceNumber: 27023,
|
||||
Timestamp: 3653407706,
|
||||
@@ -39,7 +38,6 @@ func TestOggWriter_AddPacketAndClose(t *testing.T) {
|
||||
CSRC: []uint32{},
|
||||
},
|
||||
Payload: rawPkt[20:],
|
||||
Raw: rawPkt,
|
||||
}
|
||||
assert.NoError(t, validPacket.SetExtension(0, []byte{0xFF, 0xFF, 0xFF, 0xFF}))
|
||||
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/v2"
|
||||
"github.com/pion/webrtc/v3/pkg/media"
|
||||
)
|
||||
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/v2"
|
||||
"github.com/pion/webrtc/v3/pkg/media"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/pion/interceptor"
|
||||
"github.com/pion/randutil"
|
||||
"github.com/pion/rtcp"
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/v2"
|
||||
)
|
||||
|
||||
// RTPSender allows an application to control how a given Track is encoded and transmitted to a remote peer
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/v2"
|
||||
)
|
||||
|
||||
// RTPTransceiver represents a combination of an RTPSender and an RTPReceiver that share a common mid.
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/v2"
|
||||
"github.com/pion/srtp/v2"
|
||||
)
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package webrtc
|
||||
|
||||
import "github.com/pion/rtp"
|
||||
import "github.com/pion/rtp/v2"
|
||||
|
||||
// TrackLocalWriter is the Writer for outbound RTP Packets
|
||||
type TrackLocalWriter interface {
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/v2"
|
||||
"github.com/pion/webrtc/v3/internal/util"
|
||||
"github.com/pion/webrtc/v3/pkg/media"
|
||||
)
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/v2"
|
||||
"github.com/pion/transport/test"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/pion/interceptor"
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/rtp/v2"
|
||||
)
|
||||
|
||||
// TrackRemote represents a single inbound source of media
|
||||
|
Reference in New Issue
Block a user