| OLD | NEW |
| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 receiver_.transport_.SetRtpRtcpModule(sender_.impl_.get()); | 192 receiver_.transport_.SetRtpRtcpModule(sender_.impl_.get()); |
| 193 } | 193 } |
| 194 SimulatedClock clock_; | 194 SimulatedClock clock_; |
| 195 RtpRtcpModule sender_; | 195 RtpRtcpModule sender_; |
| 196 RtpRtcpModule receiver_; | 196 RtpRtcpModule receiver_; |
| 197 VideoCodec codec_; | 197 VideoCodec codec_; |
| 198 | 198 |
| 199 void SendFrame(const RtpRtcpModule* module, uint8_t tid) { | 199 void SendFrame(const RtpRtcpModule* module, uint8_t tid) { |
| 200 RTPVideoHeaderVP8 vp8_header = {}; | 200 RTPVideoHeaderVP8 vp8_header = {}; |
| 201 vp8_header.temporalIdx = tid; | 201 vp8_header.temporalIdx = tid; |
| 202 RTPVideoHeader rtp_video_header = { | 202 RTPVideoHeader rtp_video_header; |
| 203 codec_.width, codec_.height, kVideoRotation_0, {-1, -1}, true, 0, | 203 rtp_video_header.width = codec_.width; |
| 204 kRtpVideoVp8, {vp8_header}}; | 204 rtp_video_header.height = codec_.height; |
| 205 rtp_video_header.rotation = kVideoRotation_0; |
| 206 rtp_video_header.playout_delay = {-1, -1}; |
| 207 rtp_video_header.is_first_packet_in_frame = true; |
| 208 rtp_video_header.simulcastIdx = 0; |
| 209 rtp_video_header.codec = kRtpVideoVp8; |
| 210 rtp_video_header.codecHeader = {vp8_header}; |
| 205 | 211 |
| 206 const uint8_t payload[100] = {0}; | 212 const uint8_t payload[100] = {0}; |
| 207 EXPECT_EQ(true, module->impl_->SendOutgoingData( | 213 EXPECT_EQ(true, module->impl_->SendOutgoingData( |
| 208 kVideoFrameKey, codec_.plType, 0, 0, payload, | 214 kVideoFrameKey, codec_.plType, 0, 0, payload, |
| 209 sizeof(payload), nullptr, &rtp_video_header, nullptr)); | 215 sizeof(payload), nullptr, &rtp_video_header, nullptr)); |
| 210 } | 216 } |
| 211 | 217 |
| 212 void IncomingRtcpNack(const RtpRtcpModule* module, uint16_t sequence_number) { | 218 void IncomingRtcpNack(const RtpRtcpModule* module, uint16_t sequence_number) { |
| 213 bool sender = module->impl_->SSRC() == kSenderSsrc; | 219 bool sender = module->impl_->SSRC() == kSenderSsrc; |
| 214 rtcp::Nack nack; | 220 rtcp::Nack nack; |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 EXPECT_EQ(6U, receiver_.RtcpSent().unique_nack_requests); | 554 EXPECT_EQ(6U, receiver_.RtcpSent().unique_nack_requests); |
| 549 EXPECT_THAT(receiver_.LastNackListSent(), ElementsAre(11, 18, 20, 21)); | 555 EXPECT_THAT(receiver_.LastNackListSent(), ElementsAre(11, 18, 20, 21)); |
| 550 | 556 |
| 551 // Send module receives the request. | 557 // Send module receives the request. |
| 552 EXPECT_EQ(2U, sender_.RtcpReceived().nack_packets); | 558 EXPECT_EQ(2U, sender_.RtcpReceived().nack_packets); |
| 553 EXPECT_EQ(8U, sender_.RtcpReceived().nack_requests); | 559 EXPECT_EQ(8U, sender_.RtcpReceived().nack_requests); |
| 554 EXPECT_EQ(6U, sender_.RtcpReceived().unique_nack_requests); | 560 EXPECT_EQ(6U, sender_.RtcpReceived().unique_nack_requests); |
| 555 EXPECT_EQ(75, sender_.RtcpReceived().UniqueNackRequestsInPercent()); | 561 EXPECT_EQ(75, sender_.RtcpReceived().UniqueNackRequestsInPercent()); |
| 556 } | 562 } |
| 557 } // namespace webrtc | 563 } // namespace webrtc |
| OLD | NEW |