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

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

Issue 2911193002: Implement timing frames. (Closed)
Patch Set: Fix CE Created 3 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 RTPVideoHeader rtp_video_header; 207 RTPVideoHeader rtp_video_header;
208 rtp_video_header.width = codec_.width; 208 rtp_video_header.width = codec_.width;
209 rtp_video_header.height = codec_.height; 209 rtp_video_header.height = codec_.height;
210 rtp_video_header.rotation = kVideoRotation_0; 210 rtp_video_header.rotation = kVideoRotation_0;
211 rtp_video_header.content_type = VideoContentType::UNSPECIFIED; 211 rtp_video_header.content_type = VideoContentType::UNSPECIFIED;
212 rtp_video_header.playout_delay = {-1, -1}; 212 rtp_video_header.playout_delay = {-1, -1};
213 rtp_video_header.is_first_packet_in_frame = true; 213 rtp_video_header.is_first_packet_in_frame = true;
214 rtp_video_header.simulcastIdx = 0; 214 rtp_video_header.simulcastIdx = 0;
215 rtp_video_header.codec = kRtpVideoVp8; 215 rtp_video_header.codec = kRtpVideoVp8;
216 rtp_video_header.codecHeader = {vp8_header}; 216 rtp_video_header.codecHeader = {vp8_header};
217 rtp_video_header.video_timing = {0u, 0u, 0u, 0u, 0u, 0u, false};
217 218
218 const uint8_t payload[100] = {0}; 219 const uint8_t payload[100] = {0};
219 EXPECT_EQ(true, module->impl_->SendOutgoingData( 220 EXPECT_EQ(true, module->impl_->SendOutgoingData(
220 kVideoFrameKey, codec_.plType, 0, 0, payload, 221 kVideoFrameKey, codec_.plType, 0, 0, payload,
221 sizeof(payload), nullptr, &rtp_video_header, nullptr)); 222 sizeof(payload), nullptr, &rtp_video_header, nullptr));
222 } 223 }
223 224
224 void IncomingRtcpNack(const RtpRtcpModule* module, uint16_t sequence_number) { 225 void IncomingRtcpNack(const RtpRtcpModule* module, uint16_t sequence_number) {
225 bool sender = module->impl_->SSRC() == kSenderSsrc; 226 bool sender = module->impl_->SSRC() == kSenderSsrc;
226 rtcp::Nack nack; 227 rtcp::Nack nack;
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 EXPECT_EQ(6U, receiver_.RtcpSent().unique_nack_requests); 561 EXPECT_EQ(6U, receiver_.RtcpSent().unique_nack_requests);
561 EXPECT_THAT(receiver_.LastNackListSent(), ElementsAre(11, 18, 20, 21)); 562 EXPECT_THAT(receiver_.LastNackListSent(), ElementsAre(11, 18, 20, 21));
562 563
563 // Send module receives the request. 564 // Send module receives the request.
564 EXPECT_EQ(2U, sender_.RtcpReceived().nack_packets); 565 EXPECT_EQ(2U, sender_.RtcpReceived().nack_packets);
565 EXPECT_EQ(8U, sender_.RtcpReceived().nack_requests); 566 EXPECT_EQ(8U, sender_.RtcpReceived().nack_requests);
566 EXPECT_EQ(6U, sender_.RtcpReceived().unique_nack_requests); 567 EXPECT_EQ(6U, sender_.RtcpReceived().unique_nack_requests);
567 EXPECT_EQ(75, sender_.RtcpReceived().UniqueNackRequestsInPercent()); 568 EXPECT_EQ(75, sender_.RtcpReceived().UniqueNackRequestsInPercent());
568 } 569 }
569 } // namespace webrtc 570 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698