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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 }; | 161 }; |
162 } // namespace | 162 } // namespace |
163 | 163 |
164 class RtpRtcpImplTest : public ::testing::Test { | 164 class RtpRtcpImplTest : public ::testing::Test { |
165 protected: | 165 protected: |
166 RtpRtcpImplTest() | 166 RtpRtcpImplTest() |
167 : clock_(133590000000000), | 167 : clock_(133590000000000), |
168 sender_(&clock_), | 168 sender_(&clock_), |
169 receiver_(&clock_) { | 169 receiver_(&clock_) { |
170 // Send module. | 170 // Send module. |
| 171 sender_.impl_->SetSSRC(kSenderSsrc); |
171 EXPECT_EQ(0, sender_.impl_->SetSendingStatus(true)); | 172 EXPECT_EQ(0, sender_.impl_->SetSendingStatus(true)); |
172 sender_.impl_->SetSendingMediaStatus(true); | 173 sender_.impl_->SetSendingMediaStatus(true); |
173 sender_.impl_->SetSSRC(kSenderSsrc); | |
174 sender_.SetRemoteSsrc(kReceiverSsrc); | 174 sender_.SetRemoteSsrc(kReceiverSsrc); |
175 sender_.impl_->SetSequenceNumber(kSequenceNumber); | 175 sender_.impl_->SetSequenceNumber(kSequenceNumber); |
176 sender_.impl_->SetStorePacketsStatus(true, 100); | 176 sender_.impl_->SetStorePacketsStatus(true, 100); |
177 | 177 |
178 memset(&codec_, 0, sizeof(VideoCodec)); | 178 memset(&codec_, 0, sizeof(VideoCodec)); |
179 codec_.plType = 100; | 179 codec_.plType = 100; |
180 strncpy(codec_.plName, "VP8", 3); | 180 strncpy(codec_.plName, "VP8", 3); |
181 codec_.width = 320; | 181 codec_.width = 320; |
182 codec_.height = 180; | 182 codec_.height = 180; |
183 EXPECT_EQ(0, sender_.impl_->RegisterSendPayload(codec_)); | 183 EXPECT_EQ(0, sender_.impl_->RegisterSendPayload(codec_)); |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 EXPECT_EQ(6U, receiver_.RtcpSent().unique_nack_requests); | 554 EXPECT_EQ(6U, receiver_.RtcpSent().unique_nack_requests); |
555 EXPECT_THAT(receiver_.LastNackListSent(), ElementsAre(11, 18, 20, 21)); | 555 EXPECT_THAT(receiver_.LastNackListSent(), ElementsAre(11, 18, 20, 21)); |
556 | 556 |
557 // Send module receives the request. | 557 // Send module receives the request. |
558 EXPECT_EQ(2U, sender_.RtcpReceived().nack_packets); | 558 EXPECT_EQ(2U, sender_.RtcpReceived().nack_packets); |
559 EXPECT_EQ(8U, sender_.RtcpReceived().nack_requests); | 559 EXPECT_EQ(8U, sender_.RtcpReceived().nack_requests); |
560 EXPECT_EQ(6U, sender_.RtcpReceived().unique_nack_requests); | 560 EXPECT_EQ(6U, sender_.RtcpReceived().unique_nack_requests); |
561 EXPECT_EQ(75, sender_.RtcpReceived().UniqueNackRequestsInPercent()); | 561 EXPECT_EQ(75, sender_.RtcpReceived().UniqueNackRequestsInPercent()); |
562 } | 562 } |
563 } // namespace webrtc | 563 } // namespace webrtc |
OLD | NEW |