Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc

Issue 2007743003: Add sender controlled playout delay limits (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@cleanup_rtp_hdr_extensions
Patch Set: Rename OnReceivedRtcpReport to OnReceivedRtcpReportBlocks Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 receiver_.transport_.SetRtpRtcpModule(sender_.impl_.get()); 188 receiver_.transport_.SetRtpRtcpModule(sender_.impl_.get());
189 } 189 }
190 SimulatedClock clock_; 190 SimulatedClock clock_;
191 RtpRtcpModule sender_; 191 RtpRtcpModule sender_;
192 RtpRtcpModule receiver_; 192 RtpRtcpModule receiver_;
193 VideoCodec codec_; 193 VideoCodec codec_;
194 194
195 void SendFrame(const RtpRtcpModule* module, uint8_t tid) { 195 void SendFrame(const RtpRtcpModule* module, uint8_t tid) {
196 RTPVideoHeaderVP8 vp8_header = {}; 196 RTPVideoHeaderVP8 vp8_header = {};
197 vp8_header.temporalIdx = tid; 197 vp8_header.temporalIdx = tid;
198 RTPVideoHeader rtp_video_header = {codec_.width, 198 RTPVideoHeader rtp_video_header = {
199 codec_.height, 199 codec_.width, codec_.height, kVideoRotation_0, {-1, -1}, true, 0,
200 kVideoRotation_0, 200 kRtpVideoVp8, {vp8_header}};
201 true,
202 0,
203 kRtpVideoVp8,
204 {vp8_header}};
205 201
206 const uint8_t payload[100] = {0}; 202 const uint8_t payload[100] = {0};
207 EXPECT_EQ(0, module->impl_->SendOutgoingData(kVideoFrameKey, 203 EXPECT_EQ(0, module->impl_->SendOutgoingData(kVideoFrameKey,
208 codec_.plType, 204 codec_.plType,
209 0, 205 0,
210 0, 206 0,
211 payload, 207 payload,
212 sizeof(payload), 208 sizeof(payload),
213 NULL, 209 NULL,
214 &rtp_video_header)); 210 &rtp_video_header));
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 EXPECT_EQ(6U, receiver_.RtcpSent().unique_nack_requests); 539 EXPECT_EQ(6U, receiver_.RtcpSent().unique_nack_requests);
544 EXPECT_THAT(receiver_.LastNackListSent(), ElementsAre(11, 18, 20, 21)); 540 EXPECT_THAT(receiver_.LastNackListSent(), ElementsAre(11, 18, 20, 21));
545 541
546 // Send module receives the request. 542 // Send module receives the request.
547 EXPECT_EQ(2U, sender_.RtcpReceived().nack_packets); 543 EXPECT_EQ(2U, sender_.RtcpReceived().nack_packets);
548 EXPECT_EQ(8U, sender_.RtcpReceived().nack_requests); 544 EXPECT_EQ(8U, sender_.RtcpReceived().nack_requests);
549 EXPECT_EQ(6U, sender_.RtcpReceived().unique_nack_requests); 545 EXPECT_EQ(6U, sender_.RtcpReceived().unique_nack_requests);
550 EXPECT_EQ(75, sender_.RtcpReceived().UniqueNackRequestsInPercent()); 546 EXPECT_EQ(75, sender_.RtcpReceived().UniqueNackRequestsInPercent());
551 } 547 }
552 } // namespace webrtc 548 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698