Debian Codegraph @

rfc8888_test.go

raw symbols SCIP
1 // SPDX-FileCopyrightText: 2026 The Pion community <https://pion.ly>
2 // SPDX-License-Identifier: MIT
3
4 package rtcpscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/
5
6 import (
7 "bytesscip-go gomod github.com/golang/go/src go1.24.0 bytes/"
8 "fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/"
9 "testingscip-go gomod github.com/golang/go/src go1.24.0 testing/"
10
11 "github.com/stretchr/testify/assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/"
12 )
13
14 var _ Packetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/Packet# = (*CCFeedbackReportscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#)(nil) // assert is a Packet
15
16 func TestCCFeedbackMetricBlockUnmarshalMarshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/TestCCFeedbackMetricBlockUnmarshalMarshal().(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
17 for _, test := range []struct {
18 Name string
19 Data []byte
20 Want CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#
21 }{
22 {
23 Name: "NotReceived",
24 Data: []byte{0x00, 0x00},
25 Want: CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#{
26 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: false,
27 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
28 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 0,
29 },
30 },
31 {
32 Name: "ReceivedNoOffset",
33 Data: []byte{0x80, 0x00},
34 Want: CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#{
35 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: true,
36 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
37 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 0,
38 },
39 },
40 {
41 Name: "ReceivedOffset",
42 Data: []byte{0x9F, 0xFD},
43 Want: CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#{
44 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: true,
45 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
46 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 8189,
47 },
48 },
49 {
50 Name: "ReceivedOverRangeOffset",
51 Data: []byte{0x9F, 0xFE},
52 Want: CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#{
53 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: true,
54 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
55 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 8190,
56 },
57 },
58 {
59 Name: "ReceivedAfterReportTimestamp",
60 Data: []byte{0x9F, 0xFF},
61 Want: CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#{
62 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: true,
63 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
64 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 8191,
65 },
66 },
67 {
68 Name: "ReceivedECNCE",
69 Data: []byte{0xFF, 0xF8},
70 Want: CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#{
71 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: true,
72 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: ECNCEscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/ECNCE.,
73 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 8184,
74 },
75 },
76 } {
77 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().(fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Sprintf().("Unmarshal-%v", test.Name), func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
78 var block CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#
79 err := block.unmarshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#unmarshal().(test.Data)
80 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/NoError().(t, err)
81 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Equal().(t, test.Want, block)
82 })
83 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().(fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Sprintf().("Marshal-%v", test.Name), func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
84 buf, err := test.Want.marshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#marshal().()
85 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/NoError().(t, err)
86 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Equal().(t, test.Data, buf)
87 })
88 }
89
90 for _, test := range []struct {
91 Name string
92 Data []byte
93 Want CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#
94 }{
95 {
96 Name: "NotReceivedECNCE", // Not received must ignore 15 other bits
97 Data: []byte{0x62, 0x00},
98 Want: CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#{
99 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: false,
100 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: ECNNonECTscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/ECNNonECT.,
101 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 0,
102 },
103 },
104 {
105 Name: "NotReceivedECNECT1", // Not received must ignore 15 other bits
106 Data: []byte{0x22, 0x00},
107 Want: CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#{
108 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: false,
109 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: ECNNonECTscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/ECNNonECT.,
110 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 0,
111 },
112 },
113 } {
114 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().(fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Sprintf().("Unmarshal-%v", test.Name), func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
115 var block CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#
116 err := block.unmarshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#unmarshal().(test.Data)
117 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/NoError().(t, err)
118 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Equal().(t, test.Want, block)
119 })
120 }
121
122 for _, l := range []int{0, 1, 3} {
123 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().(fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Sprintf().("shortMetricBlock-%v", l), func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
124 var block CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#
125 data := make([]byte, l)
126 err := block.unmarshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#unmarshal().(data)
127 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Errorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Error().(t, err)
128 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.ErrorIsscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/ErrorIs().(t, err, errMetricBlockLengthscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/errMetricBlockLength.)
129 })
130 }
131 }
132
133 func TestCCFeedbackReportBlockUnmarshalMarshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/TestCCFeedbackReportBlockUnmarshalMarshal().(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
134 for _, test := range []struct {
135 Name string
136 Data []byte
137 Want CCFeedbackReportBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#
138 }{
139 {
140 Name: "ZeroLengthBlock",
141 Data: []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
142 Want: CCFeedbackReportBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#{
143 MediaSSRCscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#MediaSSRC.: 0,
144 BeginSequencescip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#BeginSequence.: 0,
145 },
146 },
147 {
148 Name: "ReceivedTwoOFFourBlocks",
149 Data: []byte{
150 0x00, 0x00, 0x00, 0x01, // SSRC
151 0x00, 0x02, 0x00, 0x04, // begin_seq, num_reports
152 0x9F, 0xFD, 0x9F, 0xFC, // reports[0], reports[1]
153 0x00, 0x00, 0x00, 0x00, // reports[2], reports[3]
154 },
155 Want: CCFeedbackReportBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#{
156 MediaSSRCscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#MediaSSRC.: 1,
157 BeginSequencescip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#BeginSequence.: 2,
158 MetricBlocksscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#MetricBlocks.: []CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#{
159 {
160 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: true,
161 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
162 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 8189,
163 },
164 {
165 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: true,
166 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
167 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 8188,
168 },
169 {
170 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: false,
171 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
172 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 0,
173 },
174 {
175 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: false,
176 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
177 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 0,
178 },
179 },
180 },
181 },
182 {
183 Name: "ReceivedTwoOFThreeBlocksPadding",
184 Data: []byte{
185 0x00, 0x00, 0x00, 0x01, // SSRC
186 0x00, 0x02, 0x00, 0x03, // begin_seq, num_reports
187 0x9F, 0xFD, 0x9F, 0xFC, // reports[0], reports[1]
188 0x00, 0x00, 0x00, 0x00, // reports[2], Padding
189 },
190 Want: CCFeedbackReportBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#{
191 MediaSSRCscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#MediaSSRC.: 1,
192 BeginSequencescip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#BeginSequence.: 2,
193 MetricBlocksscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#MetricBlocks.: []CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#{
194 {
195 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: true,
196 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
197 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 8189,
198 },
199 {
200 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: true,
201 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
202 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 8188,
203 },
204 {
205 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: false,
206 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
207 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 0,
208 },
209 },
210 },
211 },
212 {
213 Name: "WrapAroundSequenceNumber",
214 Data: []byte{
215 0x00, 0x00, 0x00, 0x01, // SSRC
216 0xff, 0xfe, 0x00, 0x04, // begin_seq, num_reports
217 0x9F, 0xFD, 0x9F, 0xFC, // reports[0], reports[1]
218 0x00, 0x00, 0x00, 0x00, // reports[2], reports[3]
219 },
220 Want: CCFeedbackReportBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#{
221 MediaSSRCscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#MediaSSRC.: 1,
222 BeginSequencescip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#BeginSequence.: 65534,
223 MetricBlocksscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#MetricBlocks.: []CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#{
224 {
225 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: true,
226 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
227 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 8189,
228 },
229 {
230 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: true,
231 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
232 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 8188,
233 },
234 {
235 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: false,
236 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
237 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 0,
238 },
239 {
240 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: false,
241 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
242 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 0,
243 },
244 },
245 },
246 },
247 } {
248 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().(fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Sprintf().("Unmarshal-%v", test.Name), func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
249 var block CCFeedbackReportBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#
250 err := block.unmarshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#unmarshal().(test.Data)
251 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/NoError().(t, err)
252 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Equal().(t, test.Want, block)
253 })
254 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().(fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Sprintf().("Marshal-%v", test.Name), func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
255 buf, err := test.Want.marshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#marshal().()
256 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/NoError().(t, err)
257 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Equal().(t, test.Data, buf)
258 })
259 }
260
261 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().("MarshalTooManyMetricBlocks", func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
262 block := CCFeedbackReportBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#{
263 MediaSSRCscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#MediaSSRC.: 0,
264 BeginSequencescip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#BeginSequence.: 0,
265 MetricBlocksscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#MetricBlocks.: make([]CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#, 16385),
266 }
267 _, err := block.marshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#marshal().()
268 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Errorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Error().(t, err)
269 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.ErrorIsscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/ErrorIs().(t, err, errTooManyReportsscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/errTooManyReports.)
270 })
271
272 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().("emptyRawPacket", func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
273 var block CCFeedbackReportBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#
274 data := []byte{}
275 err := block.unmarshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#unmarshal().(data)
276 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Errorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Error().(t, err)
277 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.ErrorIsscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/ErrorIs().(t, err, errReportBlockLengthscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/errReportBlockLength.)
278 })
279
280 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().("shortRawPacket", func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
281 var block CCFeedbackReportBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#
282 data := []byte{
283 0x00, 0x00, 0x00, 0x01, // SSRC
284 0x00, 0x02, // begin_seq
285 }
286 err := block.unmarshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#unmarshal().(data)
287 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Errorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Error().(t, err)
288 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.ErrorIsscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/ErrorIs().(t, err, errReportBlockLengthscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/errReportBlockLength.)
289 })
290
291 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().("incorrectNumReports", func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
292 var block CCFeedbackReportBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#
293 data := []byte{
294 0x00, 0x00, 0x00, 0x01, // SSRC
295 0x00, 0x02, 0x00, 0x05, // begin_seq, num_reports
296 0x9F, 0xFD, 0x9F, 0xFC, // reports[0], reports[1]
297 0x00, 0x00, 0x00, 0x00, // reports[2], reports[3]
298 }
299 err := block.unmarshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#unmarshal().(data)
300 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Errorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Error().(t, err)
301 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.ErrorIsscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/ErrorIs().(t, err, errIncorrectNumReportsscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/errIncorrectNumReports.)
302 })
303
304 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().("overflowNumReports", func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
305 var block CCFeedbackReportBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#
306 data := append([]byte{
307 0, 0, 0, 0, // SSRC
308 0, 0, 0x7F, 0xFB, // begin_seq, num_reports
309 }, bytesscip-go gomod github.com/golang/go/src go1.24.0 bytes/.Repeatscip-go gomod github.com/golang/go/src go1.24.0 bytes/Repeat().([]byte{0, 0}, 0x7FFF)...)
310 err := block.unmarshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#unmarshal().(data)
311 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/NoError().(t, err)
312 })
313 }
314
315 func TestCCFeedbackReportUnmarshalMarshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/TestCCFeedbackReportUnmarshalMarshal().(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
316 for _, test := range []struct {
317 Name string
318 Data []byte
319 Want CCFeedbackReportscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#
320 }{
321 {
322 Name: "EmtpyReport",
323 Data: []byte{
324 0x8B, 0xCD, 0x00, 0x02, // V=2, P=0, FMT=11, PT=205, Length=2
325 0x00, 0x00, 0x00, 0x01, // Sender SSRC=1
326
327 0x00, 0x00, 0x00, 0x01, // Report Timestamp=1
328 },
329 Want: CCFeedbackReportscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#{
330 SenderSSRCscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#SenderSSRC.: 1,
331 ReportBlocksscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#ReportBlocks.: []CCFeedbackReportBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#{},
332 ReportTimestampscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#ReportTimestamp.: 1,
333 },
334 },
335 {
336 Name: "Report",
337 Data: []byte{
338 0x8B, 0xCD, 0x00, 0x0A, // V=2, P=0, FMT=11, PT=205, Length=10
339 0x00, 0x00, 0x00, 0x01, // Sender SSRC=1
340
341 0x00, 0x00, 0x00, 0x01, // SSRC=1
342 0x00, 0x02, 0x00, 0x04, // begin_seq, num_reports
343 0x9F, 0xFD, 0x9F, 0xFC, // reports[0], reports[1]
344 0x00, 0x00, 0x00, 0x00, // reports[2], reports[3]
345
346 0x00, 0x00, 0x00, 0x02, // Media SSRC=2
347 0x00, 0x02, 0x00, 0x03, // begin_seq=2, num_reports=3
348 0x9F, 0xFD, 0x9F, 0xFC, // reports[0], reports[1]
349 0x00, 0x00, 0x00, 0x00, // reports[2], Padding
350
351 0x00, 0x00, 0x00, 0x01,
352 },
353 Want: CCFeedbackReportscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#{
354 SenderSSRCscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#SenderSSRC.: 1,
355 ReportBlocksscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#ReportBlocks.: []CCFeedbackReportBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#{
356 {
357 MediaSSRCscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#MediaSSRC.: 1,
358 BeginSequencescip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#BeginSequence.: 2,
359 MetricBlocksscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#MetricBlocks.: []CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#{
360 {
361 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: true,
362 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
363 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 8189,
364 },
365 {
366 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: true,
367 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
368 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 8188,
369 },
370 {
371 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: false,
372 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
373 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 0,
374 },
375 {
376 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: false,
377 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
378 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 0,
379 },
380 },
381 },
382 {
383 MediaSSRCscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#MediaSSRC.: 2,
384 BeginSequencescip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#BeginSequence.: 2,
385 MetricBlocksscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#MetricBlocks.: []CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#{
386 {
387 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: true,
388 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
389 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 8189,
390 },
391 {
392 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: true,
393 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
394 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 8188,
395 },
396 {
397 Receivedscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#Received.: false,
398 ECNscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ECN.: 0,
399 ArrivalTimeOffsetscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#ArrivalTimeOffset.: 0,
400 },
401 },
402 },
403 },
404 ReportTimestampscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#ReportTimestamp.: 1,
405 },
406 },
407 } {
408 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().(fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Sprintf().("Unmarshal-%v", test.Name), func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
409 pkts, err := Unmarshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/Unmarshal().(test.Data)
410 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/NoError().(t, err)
411 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Lenscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Len().(t, pkts, 1)
412
413 var ok bool
414 var report *CCFeedbackReportscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#
415 report, ok = pkts[0].(*CCFeedbackReportscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#)
416 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Truescip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/True().(t, ok)
417
418 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Equal().(t, test.Want, *report)
419 })
420 t.Runscip-go gomod github.com/golang/go/src go1.24.0 testing/T#Run().(fmtscip-go gomod github.com/golang/go/src go1.24.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.0 fmt/Sprintf().("Marshal-%v", test.Name), func(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
421 buf, err := test.Want.Marshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#Marshal().()
422 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/NoError().(t, err)
423 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Equal().(t, test.Data, buf)
424 })
425 }
426 }
427
428 func TestCCFeedbackOverflowscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/TestCCFeedbackOverflow().(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
429 p := &CCFeedbackReportscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#{}
430 err := p.Unmarshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#Unmarshal().(append([]byte{
431 // Header
432 0b10000000, // V = 2
433 205, // h.Type = TypeTransportSpecificFeedback
434 0, 0, // h.Length (unused)
435 // SSRC
436 0, 0, 0, 0,
437 // CCFeedbackReportBlock
438 0, 0, 0, 0, 0, 0,
439 0x7F, 0xFB, // numReportsField
440 }, bytesscip-go gomod github.com/golang/go/src go1.24.0 bytes/.Repeatscip-go gomod github.com/golang/go/src go1.24.0 bytes/Repeat().([]byte{0, 0}, 0x7FFF)...))
441 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.ErrorIsscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/ErrorIs().(t, err, errReportBlockLengthscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/errReportBlockLength.)
442 }
443
444 func TestCCFeedbackReportMarshalMaxLengthscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/TestCCFeedbackReportMarshalMaxLength().(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) {
445 report := CCFeedbackReportscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#{
446 SenderSSRCscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#SenderSSRC.: 1,
447 ReportTimestampscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#ReportTimestamp.: 2,
448 ReportBlocksscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#ReportBlocks.: make([]CCFeedbackReportBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#, 8),
449 }
450
451 for i := range 7 {
452 report.ReportBlocksscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#ReportBlocks.[i] = CCFeedbackReportBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#{
453 MediaSSRCscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#MediaSSRC.: uint32(i + 1),
454 MetricBlocksscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#MetricBlocks.: make([]CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#, maxMetricBlocksscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/maxMetricBlocks.),
455 }
456 }
457 report.ReportBlocksscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#ReportBlocks.[7] = CCFeedbackReportBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#{
458 MediaSSRCscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#MediaSSRC.: 8,
459 MetricBlocksscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReportBlock#MetricBlocks.: make([]CCFeedbackMetricBlockscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackMetricBlock#, 16346),
460 }
461
462 buf, err := report.Marshalscip-go gomod github.com/pion/rtcp . `github.com/pion/rtcp`/CCFeedbackReport#Marshal().()
463 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/NoError().(t, err)
464 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Lenscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Len().(t, buf, 4*(0xFFFF+1))
465 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Equal().(t, []byte{0x8b, 0xcd, 0xff, 0xff}, buf[:4])
466 assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Equal().(t, []byte{0x00, 0x00, 0x00, 0x02}, buf[len(buf)-4:])
467 }