OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 3285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3296 stats.max_decode_ms = 3; | 3296 stats.max_decode_ms = 3; |
3297 stats.current_delay_ms = 4; | 3297 stats.current_delay_ms = 4; |
3298 stats.target_delay_ms = 5; | 3298 stats.target_delay_ms = 5; |
3299 stats.jitter_buffer_ms = 6; | 3299 stats.jitter_buffer_ms = 6; |
3300 stats.min_playout_delay_ms = 7; | 3300 stats.min_playout_delay_ms = 7; |
3301 stats.render_delay_ms = 8; | 3301 stats.render_delay_ms = 8; |
3302 stats.width = 9; | 3302 stats.width = 9; |
3303 stats.height = 10; | 3303 stats.height = 10; |
3304 stats.frame_counts.key_frames = 11; | 3304 stats.frame_counts.key_frames = 11; |
3305 stats.frame_counts.delta_frames = 12; | 3305 stats.frame_counts.delta_frames = 12; |
3306 stats.frames_decoded = 13; | 3306 stats.frames_rendered = 13; |
| 3307 stats.frames_decoded = 14; |
3307 stream->SetStats(stats); | 3308 stream->SetStats(stats); |
3308 | 3309 |
3309 cricket::VideoMediaInfo info; | 3310 cricket::VideoMediaInfo info; |
3310 ASSERT_TRUE(channel_->GetStats(&info)); | 3311 ASSERT_TRUE(channel_->GetStats(&info)); |
3311 EXPECT_EQ(stats.decoder_implementation_name, | 3312 EXPECT_EQ(stats.decoder_implementation_name, |
3312 info.receivers[0].decoder_implementation_name); | 3313 info.receivers[0].decoder_implementation_name); |
3313 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms); | 3314 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms); |
3314 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms); | 3315 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms); |
3315 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms); | 3316 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms); |
3316 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms); | 3317 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms); |
3317 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms); | 3318 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms); |
3318 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms); | 3319 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms); |
3319 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms); | 3320 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms); |
3320 EXPECT_EQ(stats.width, info.receivers[0].frame_width); | 3321 EXPECT_EQ(stats.width, info.receivers[0].frame_width); |
3321 EXPECT_EQ(stats.height, info.receivers[0].frame_height); | 3322 EXPECT_EQ(stats.height, info.receivers[0].frame_height); |
3322 EXPECT_EQ(stats.frame_counts.key_frames + stats.frame_counts.delta_frames, | 3323 EXPECT_EQ(stats.frame_counts.key_frames + stats.frame_counts.delta_frames, |
3323 info.receivers[0].frames_received); | 3324 info.receivers[0].frames_received); |
| 3325 EXPECT_EQ(stats.frames_rendered, info.receivers[0].frames_rendered); |
3324 EXPECT_EQ(stats.frames_decoded, info.receivers[0].frames_decoded); | 3326 EXPECT_EQ(stats.frames_decoded, info.receivers[0].frames_decoded); |
3325 } | 3327 } |
3326 | 3328 |
3327 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) { | 3329 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) { |
3328 FakeVideoReceiveStream* stream = AddRecvStream(); | 3330 FakeVideoReceiveStream* stream = AddRecvStream(); |
3329 webrtc::VideoReceiveStream::Stats stats; | 3331 webrtc::VideoReceiveStream::Stats stats; |
3330 stats.rtp_stats.transmitted.payload_bytes = 2; | 3332 stats.rtp_stats.transmitted.payload_bytes = 2; |
3331 stats.rtp_stats.transmitted.header_bytes = 3; | 3333 stats.rtp_stats.transmitted.header_bytes = 3; |
3332 stats.rtp_stats.transmitted.padding_bytes = 4; | 3334 stats.rtp_stats.transmitted.padding_bytes = 4; |
3333 stats.rtp_stats.transmitted.packets = 5; | 3335 stats.rtp_stats.transmitted.packets = 5; |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4069 | 4071 |
4070 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) { | 4072 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) { |
4071 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 3); | 4073 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 3); |
4072 } | 4074 } |
4073 | 4075 |
4074 // Test that we normalize send codec format size in simulcast. | 4076 // Test that we normalize send codec format size in simulcast. |
4075 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { | 4077 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { |
4076 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 541, 271, 2, 2); | 4078 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 541, 271, 2, 2); |
4077 } | 4079 } |
4078 } // namespace cricket | 4080 } // namespace cricket |
OLD | NEW |