Repository: pion/interceptor
Pull request #48 (2021-07-09 14:40:25)

Update github.com/pion/rtp to v2
Bump major version.

### Reference issue
https://github.com/pion/rtp/issues/90


codecov[bot]: # [Codecov](https://codecov.io/gh/pion/interceptor/pull/48?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) Report
> Merging [#48](https://codecov.io/gh/pion/interceptor/pull/48?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) (3a4d88f) into [master](https://codecov.io/gh/pion/interceptor/commit/960ff884e63b71228020a14e137f57a07ca72618?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) (960ff88) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pion/interceptor/pull/48/graphs/tree.svg?width=650&height=150&src=pr&token=FNH9xUG6AX&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion)](https://codecov.io/gh/pion/interceptor/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion)

```diff
@@           Coverage Diff           @@
##           master      #48   +/-   ##
=======================================
  Coverage   80.89%   80.89%           
=======================================
  Files          24       24           
  Lines         806      806           
=======================================
  Hits          652      652           
  Misses        102      102           
  Partials       52       52           
```

| Flag | Coverage Δ | |
|---|---|---|
| go | `80.89% <ø> (ø)` | |
| wasm | `79.03% <ø> (ø)` | |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/pion/interceptor/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | Coverage Δ | |
|---|---|---|
| [interceptor.go](https://codecov.io/gh/pion/interceptor/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-aW50ZXJjZXB0b3IuZ28=) | `66.66% <ø> (ø)` | |
| [internal/test/mock\_stream.go](https://codecov.io/gh/pion/interceptor/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-aW50ZXJuYWwvdGVzdC9tb2NrX3N0cmVhbS5nbw==) | `74.68% <ø> (ø)` | |
| [pkg/mock/interceptor.go](https://codecov.io/gh/pion/interceptor/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-cGtnL21vY2svaW50ZXJjZXB0b3IuZ28=) | `82.60% <ø> (ø)` | |
| [pkg/nack/generator\_interceptor.go](https://codecov.io/gh/pion/interceptor/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-cGtnL25hY2svZ2VuZXJhdG9yX2ludGVyY2VwdG9yLmdv) | `74.24% <ø> (ø)` | |
| [pkg/nack/responder\_interceptor.go](https://codecov.io/gh/pion/interceptor/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-cGtnL25hY2svcmVzcG9uZGVyX2ludGVyY2VwdG9yLmdv) | `65.11% <ø> (ø)` | |
| [pkg/nack/send\_buffer.go](https://codecov.io/gh/pion/interceptor/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-cGtnL25hY2svc2VuZF9idWZmZXIuZ28=) | `83.87% <ø> (ø)` | |
| [pkg/report/receiver\_interceptor.go](https://codecov.io/gh/pion/interceptor/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-cGtnL3JlcG9ydC9yZWNlaXZlcl9pbnRlcmNlcHRvci5nbw==) | `77.61% <ø> (ø)` | |
| [pkg/report/receiver\_stream.go](https://codecov.io/gh/pion/interceptor/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-cGtnL3JlcG9ydC9yZWNlaXZlcl9zdHJlYW0uZ28=) | `91.42% <ø> (ø)` | |
| [pkg/report/sender\_interceptor.go](https://codecov.io/gh/pion/interceptor/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-cGtnL3JlcG9ydC9zZW5kZXJfaW50ZXJjZXB0b3IuZ28=) | `86.20% <ø> (ø)` | |
| [pkg/report/sender\_stream.go](https://codecov.io/gh/pion/interceptor/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#diff-cGtnL3JlcG9ydC9zZW5kZXJfc3RyZWFtLmdv) | `100.00% <ø> (ø)` | |
| ... and [2 more](https://codecov.io/gh/pion/interceptor/pull/48/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pion/interceptor/pull/48?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pion/interceptor/pull/48?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion). Last update [960ff88...3a4d88f](https://codecov.io/gh/pion/interceptor/pull/48?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion).


Patch:
diff --git a/examples/nack/main.go b/examples/nack/main.go
index 45e892a..201a4f1 100644
--- a/examples/nack/main.go
+++ b/examples/nack/main.go
@@ -9,7 +9,7 @@ import (
 	"github.com/pion/interceptor"
 	"github.com/pion/interceptor/pkg/nack"
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 const (
diff --git a/go.mod b/go.mod
index 568b53b..974b361 100644
--- a/go.mod
+++ b/go.mod
@@ -5,6 +5,6 @@ go 1.15
 require (
 	github.com/pion/logging v0.2.2
 	github.com/pion/rtcp v1.2.6
-	github.com/pion/rtp v1.6.5
+	github.com/pion/rtp/v2 v2.0.0
 	github.com/stretchr/testify v1.7.0
 )
diff --git a/go.sum b/go.sum
index 4edae47..99afa3e 100644
--- a/go.sum
+++ b/go.sum
@@ -6,8 +6,8 @@ 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.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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
diff --git a/interceptor.go b/interceptor.go
index 2d1b97e..3dba930 100644
--- a/interceptor.go
+++ b/interceptor.go
@@ -6,7 +6,7 @@ import (
 	"io"
 
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 // Interceptor can be used to add functionality to you PeerConnections by modifying any incoming/outgoing rtp/rtcp
diff --git a/pkg/mock/interceptor.go b/pkg/mock/interceptor.go
index 81395fb..617ca2f 100644
--- a/pkg/mock/interceptor.go
+++ b/pkg/mock/interceptor.go
@@ -4,7 +4,7 @@ package mock
 import (
 	"github.com/pion/interceptor"
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 // Interceptor is an mock Interceptor fot testing.
diff --git a/pkg/nack/generator_interceptor.go b/pkg/nack/generator_interceptor.go
index 7b805df..6aca3de 100644
--- a/pkg/nack/generator_interceptor.go
+++ b/pkg/nack/generator_interceptor.go
@@ -8,7 +8,7 @@ import (
 	"github.com/pion/interceptor"
 	"github.com/pion/logging"
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 // GeneratorInterceptor interceptor generates nack feedback messages.
diff --git a/pkg/nack/responder_interceptor.go b/pkg/nack/responder_interceptor.go
index 121657e..a8ac10d 100644
--- a/pkg/nack/responder_interceptor.go
+++ b/pkg/nack/responder_interceptor.go
@@ -6,7 +6,7 @@ import (
 	"github.com/pion/interceptor"
 	"github.com/pion/logging"
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 // ResponderInterceptor responds to nack feedback messages
diff --git a/pkg/nack/send_buffer.go b/pkg/nack/send_buffer.go
index cf3f020..9bf479f 100644
--- a/pkg/nack/send_buffer.go
+++ b/pkg/nack/send_buffer.go
@@ -3,7 +3,7 @@ package nack
 import (
 	"fmt"
 
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 const (
diff --git a/pkg/report/receiver_interceptor.go b/pkg/report/receiver_interceptor.go
index 40a4677..a0c728e 100644
--- a/pkg/report/receiver_interceptor.go
+++ b/pkg/report/receiver_interceptor.go
@@ -7,7 +7,7 @@ import (
 	"github.com/pion/interceptor"
 	"github.com/pion/logging"
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 // ReceiverInterceptor interceptor generates receiver reports.
diff --git a/pkg/report/receiver_stream.go b/pkg/report/receiver_stream.go
index 569715d..25f6638 100644
--- a/pkg/report/receiver_stream.go
+++ b/pkg/report/receiver_stream.go
@@ -6,7 +6,7 @@ import (
 	"time"
 
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 type receiverStream struct {
diff --git a/pkg/report/sender_interceptor.go b/pkg/report/sender_interceptor.go
index 661640a..e1ec06a 100644
--- a/pkg/report/sender_interceptor.go
+++ b/pkg/report/sender_interceptor.go
@@ -7,7 +7,7 @@ import (
 	"github.com/pion/interceptor"
 	"github.com/pion/logging"
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 func ntpTime(t time.Time) uint64 {
diff --git a/pkg/report/sender_stream.go b/pkg/report/sender_stream.go
index 851d70e..6570aa6 100644
--- a/pkg/report/sender_stream.go
+++ b/pkg/report/sender_stream.go
@@ -4,7 +4,7 @@ import (
 	"sync"
 	"time"
 
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 type senderStream struct {
diff --git a/pkg/twcc/header_extension.go b/pkg/twcc/header_extension.go
index d1254b1..fb32df9 100644
--- a/pkg/twcc/header_extension.go
+++ b/pkg/twcc/header_extension.go
@@ -4,7 +4,7 @@ import (
 	"sync/atomic"
 
 	"github.com/pion/interceptor"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 // HeaderExtensionInterceptor adds transport wide sequence numbers as header extension to each RTP packet
diff --git a/pkg/twcc/sender_interceptor.go b/pkg/twcc/sender_interceptor.go
index cb2ab0b..3493c23 100644
--- a/pkg/twcc/sender_interceptor.go
+++ b/pkg/twcc/sender_interceptor.go
@@ -7,7 +7,7 @@ import (
 
 	"github.com/pion/interceptor"
 	"github.com/pion/logging"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 // SenderInterceptor sends transport wide congestion control reports as specified in:


Test patch:
diff --git a/internal/test/mock_stream.go b/internal/test/mock_stream.go
index 4134ab0..ee2cfde 100644
--- a/internal/test/mock_stream.go
+++ b/internal/test/mock_stream.go
@@ -6,7 +6,7 @@ import (
 
 	"github.com/pion/interceptor"
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 )
 
 // MockStream is a helper struct for testing interceptors.
diff --git a/internal/test/mock_stream_test.go b/internal/test/mock_stream_test.go
index dbffbdb..a3631ff 100644
--- a/internal/test/mock_stream_test.go
+++ b/internal/test/mock_stream_test.go
@@ -6,7 +6,7 @@ import (
 
 	"github.com/pion/interceptor"
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/pkg/nack/generator_interceptor_test.go b/pkg/nack/generator_interceptor_test.go
index aa9cbc7..925e8b6 100644
--- a/pkg/nack/generator_interceptor_test.go
+++ b/pkg/nack/generator_interceptor_test.go
@@ -8,7 +8,7 @@ import (
 	"github.com/pion/interceptor/internal/test"
 	"github.com/pion/logging"
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/pkg/nack/responder_interceptor_test.go b/pkg/nack/responder_interceptor_test.go
index 5ff322d..b51642d 100644
--- a/pkg/nack/responder_interceptor_test.go
+++ b/pkg/nack/responder_interceptor_test.go
@@ -8,7 +8,7 @@ import (
 	"github.com/pion/interceptor/internal/test"
 	"github.com/pion/logging"
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/pkg/nack/send_buffer_test.go b/pkg/nack/send_buffer_test.go
index afba216..cbb0960 100644
--- a/pkg/nack/send_buffer_test.go
+++ b/pkg/nack/send_buffer_test.go
@@ -3,7 +3,7 @@ package nack
 import (
 	"testing"
 
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/pkg/report/receiver_interceptor_test.go b/pkg/report/receiver_interceptor_test.go
index 412a016..f2c334a 100644
--- a/pkg/report/receiver_interceptor_test.go
+++ b/pkg/report/receiver_interceptor_test.go
@@ -8,7 +8,7 @@ import (
 	"github.com/pion/interceptor/internal/test"
 	"github.com/pion/logging"
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/pkg/report/sender_interceptor_test.go b/pkg/report/sender_interceptor_test.go
index 5a53491..aa90b1c 100644
--- a/pkg/report/sender_interceptor_test.go
+++ b/pkg/report/sender_interceptor_test.go
@@ -8,7 +8,7 @@ import (
 	"github.com/pion/interceptor/internal/test"
 	"github.com/pion/logging"
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/pkg/twcc/header_extension_test.go b/pkg/twcc/header_extension_test.go
index aea0a53..371b375 100644
--- a/pkg/twcc/header_extension_test.go
+++ b/pkg/twcc/header_extension_test.go
@@ -7,7 +7,7 @@ import (
 
 	"github.com/pion/interceptor"
 	"github.com/pion/interceptor/internal/test"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/pkg/twcc/sender_interceptor_test.go b/pkg/twcc/sender_interceptor_test.go
index 61a024f..69ad787 100644
--- a/pkg/twcc/sender_interceptor_test.go
+++ b/pkg/twcc/sender_interceptor_test.go
@@ -7,7 +7,7 @@ import (
 	"github.com/pion/interceptor"
 	"github.com/pion/interceptor/internal/test"
 	"github.com/pion/rtcp"
-	"github.com/pion/rtp"
+	"github.com/pion/rtp/v2"
 	"github.com/stretchr/testify/assert"
 )