OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 EXPECT_EQ(DefaultCodec().width, GetSenderStats(0).send_frame_width); | 509 EXPECT_EQ(DefaultCodec().width, GetSenderStats(0).send_frame_width); |
510 EXPECT_EQ(DefaultCodec().height, GetSenderStats(0).send_frame_height); | 510 EXPECT_EQ(DefaultCodec().height, GetSenderStats(0).send_frame_height); |
511 | 511 |
512 ASSERT_EQ(2U, info.receivers.size()); | 512 ASSERT_EQ(2U, info.receivers.size()); |
513 for (size_t i = 0; i < info.receivers.size(); ++i) { | 513 for (size_t i = 0; i < info.receivers.size(); ++i) { |
514 EXPECT_EQ(1U, GetReceiverStats(i).ssrcs().size()); | 514 EXPECT_EQ(1U, GetReceiverStats(i).ssrcs().size()); |
515 EXPECT_EQ(i + 1, GetReceiverStats(i).ssrcs()[0]); | 515 EXPECT_EQ(i + 1, GetReceiverStats(i).ssrcs()[0]); |
516 EXPECT_EQ_WAIT(NumRtpBytes(), GetReceiverStats(i).bytes_rcvd, kTimeout); | 516 EXPECT_EQ_WAIT(NumRtpBytes(), GetReceiverStats(i).bytes_rcvd, kTimeout); |
517 EXPECT_EQ_WAIT(NumRtpPackets(), GetReceiverStats(i).packets_rcvd, | 517 EXPECT_EQ_WAIT(NumRtpPackets(), GetReceiverStats(i).packets_rcvd, |
518 kTimeout); | 518 kTimeout); |
519 EXPECT_EQ(DefaultCodec().width, GetReceiverStats(i).frame_width); | 519 EXPECT_EQ_WAIT(DefaultCodec().width, GetReceiverStats(i).frame_width, |
520 EXPECT_EQ(DefaultCodec().height, GetReceiverStats(i).frame_height); | 520 kTimeout); |
| 521 EXPECT_EQ_WAIT(DefaultCodec().height, GetReceiverStats(i).frame_height, |
| 522 kTimeout); |
521 } | 523 } |
522 } | 524 } |
523 // Test that stats work properly for a conf call with multiple send streams. | 525 // Test that stats work properly for a conf call with multiple send streams. |
524 void GetStatsMultipleSendStreams() { | 526 void GetStatsMultipleSendStreams() { |
525 // Normal setup; note that we set the SSRC explicitly to ensure that | 527 // Normal setup; note that we set the SSRC explicitly to ensure that |
526 // it will come first in the senders map. | 528 // it will come first in the senders map. |
527 EXPECT_TRUE(SetOneCodec(DefaultCodec())); | 529 EXPECT_TRUE(SetOneCodec(DefaultCodec())); |
528 cricket::VideoSendParameters parameters; | 530 cricket::VideoSendParameters parameters; |
529 parameters.codecs.push_back(DefaultCodec()); | 531 parameters.codecs.push_back(DefaultCodec()); |
530 parameters.conference_mode = true; | 532 parameters.conference_mode = true; |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 std::unique_ptr<C> channel_; | 1083 std::unique_ptr<C> channel_; |
1082 cricket::FakeNetworkInterface network_interface_; | 1084 cricket::FakeNetworkInterface network_interface_; |
1083 cricket::FakeVideoRenderer renderer_; | 1085 cricket::FakeVideoRenderer renderer_; |
1084 cricket::VideoMediaChannel::Error media_error_; | 1086 cricket::VideoMediaChannel::Error media_error_; |
1085 | 1087 |
1086 // Used by test cases where 2 streams are run on the same channel. | 1088 // Used by test cases where 2 streams are run on the same channel. |
1087 cricket::FakeVideoRenderer renderer2_; | 1089 cricket::FakeVideoRenderer renderer2_; |
1088 }; | 1090 }; |
1089 | 1091 |
1090 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT | 1092 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT |
OLD | NEW |