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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 EXPECT_EQ(DefaultCodec().id, *info.receivers[0].codec_payload_type); | 446 EXPECT_EQ(DefaultCodec().id, *info.receivers[0].codec_payload_type); |
447 EXPECT_EQ(NumRtpBytes(), info.receivers[0].bytes_rcvd); | 447 EXPECT_EQ(NumRtpBytes(), info.receivers[0].bytes_rcvd); |
448 EXPECT_EQ(NumRtpPackets(), info.receivers[0].packets_rcvd); | 448 EXPECT_EQ(NumRtpPackets(), info.receivers[0].packets_rcvd); |
449 EXPECT_EQ(0.0, info.receivers[0].fraction_lost); | 449 EXPECT_EQ(0.0, info.receivers[0].fraction_lost); |
450 EXPECT_EQ(0, info.receivers[0].packets_lost); | 450 EXPECT_EQ(0, info.receivers[0].packets_lost); |
451 // TODO(asapersson): Not set for webrtc. Handle missing stats. | 451 // TODO(asapersson): Not set for webrtc. Handle missing stats. |
452 // EXPECT_EQ(0, info.receivers[0].packets_concealed); | 452 // EXPECT_EQ(0, info.receivers[0].packets_concealed); |
453 EXPECT_EQ(0, info.receivers[0].firs_sent); | 453 EXPECT_EQ(0, info.receivers[0].firs_sent); |
454 EXPECT_EQ(0, info.receivers[0].plis_sent); | 454 EXPECT_EQ(0, info.receivers[0].plis_sent); |
455 EXPECT_EQ(0, info.receivers[0].nacks_sent); | 455 EXPECT_EQ(0, info.receivers[0].nacks_sent); |
456 EXPECT_EQ(kVideoWidth, info.receivers[0].frame_width); | 456 // Resolution may be lower than the initial capture resolution due to |
457 EXPECT_EQ(kVideoHeight, info.receivers[0].frame_height); | 457 // quality and cpu adaptation. |
| 458 EXPECT_LE(info.receivers[0].frame_width, kVideoWidth); |
| 459 EXPECT_GT(info.receivers[0].frame_width, kVideoWidth / 2); |
| 460 EXPECT_LE(info.receivers[0].frame_height, kVideoHeight); |
| 461 EXPECT_GT(info.receivers[0].frame_height, kVideoHeight / 2); |
458 EXPECT_GT(info.receivers[0].framerate_rcvd, 0); | 462 EXPECT_GT(info.receivers[0].framerate_rcvd, 0); |
459 EXPECT_GT(info.receivers[0].framerate_decoded, 0); | 463 EXPECT_GT(info.receivers[0].framerate_decoded, 0); |
460 EXPECT_GT(info.receivers[0].framerate_output, 0); | 464 EXPECT_GT(info.receivers[0].framerate_output, 0); |
461 | 465 |
462 EXPECT_EQ(1U, info.receive_codecs.count(DefaultCodec().id)); | 466 EXPECT_EQ(1U, info.receive_codecs.count(DefaultCodec().id)); |
463 EXPECT_EQ(DefaultCodec().ToCodecParameters(), | 467 EXPECT_EQ(DefaultCodec().ToCodecParameters(), |
464 info.receive_codecs[DefaultCodec().id]); | 468 info.receive_codecs[DefaultCodec().id]); |
465 } | 469 } |
466 | 470 |
467 cricket::VideoSenderInfo GetSenderStats(size_t i) { | 471 cricket::VideoSenderInfo GetSenderStats(size_t i) { |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 std::unique_ptr<C> channel_; | 942 std::unique_ptr<C> channel_; |
939 cricket::FakeNetworkInterface network_interface_; | 943 cricket::FakeNetworkInterface network_interface_; |
940 cricket::FakeVideoRenderer renderer_; | 944 cricket::FakeVideoRenderer renderer_; |
941 cricket::VideoMediaChannel::Error media_error_; | 945 cricket::VideoMediaChannel::Error media_error_; |
942 | 946 |
943 // Used by test cases where 2 streams are run on the same channel. | 947 // Used by test cases where 2 streams are run on the same channel. |
944 cricket::FakeVideoRenderer renderer2_; | 948 cricket::FakeVideoRenderer renderer2_; |
945 }; | 949 }; |
946 | 950 |
947 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT | 951 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT |
OLD | NEW |