Chromium Code Reviews| 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 3307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3318 stats.target_delay_ms = 5; | 3318 stats.target_delay_ms = 5; |
| 3319 stats.jitter_buffer_ms = 6; | 3319 stats.jitter_buffer_ms = 6; |
| 3320 stats.min_playout_delay_ms = 7; | 3320 stats.min_playout_delay_ms = 7; |
| 3321 stats.render_delay_ms = 8; | 3321 stats.render_delay_ms = 8; |
| 3322 stats.width = 9; | 3322 stats.width = 9; |
| 3323 stats.height = 10; | 3323 stats.height = 10; |
| 3324 stats.frame_counts.key_frames = 11; | 3324 stats.frame_counts.key_frames = 11; |
| 3325 stats.frame_counts.delta_frames = 12; | 3325 stats.frame_counts.delta_frames = 12; |
| 3326 stats.frames_rendered = 13; | 3326 stats.frames_rendered = 13; |
| 3327 stats.frames_decoded = 14; | 3327 stats.frames_decoded = 14; |
| 3328 stats.qp_sum = rtc::Optional<uint64_t>(15); | |
| 3328 stream->SetStats(stats); | 3329 stream->SetStats(stats); |
| 3329 | 3330 |
| 3330 cricket::VideoMediaInfo info; | 3331 cricket::VideoMediaInfo info; |
| 3331 ASSERT_TRUE(channel_->GetStats(&info)); | 3332 ASSERT_TRUE(channel_->GetStats(&info)); |
| 3332 EXPECT_EQ(stats.decoder_implementation_name, | 3333 EXPECT_EQ(stats.decoder_implementation_name, |
| 3333 info.receivers[0].decoder_implementation_name); | 3334 info.receivers[0].decoder_implementation_name); |
| 3334 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms); | 3335 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms); |
| 3335 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms); | 3336 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms); |
| 3336 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms); | 3337 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms); |
| 3337 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms); | 3338 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms); |
| 3338 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms); | 3339 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms); |
| 3339 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms); | 3340 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms); |
| 3340 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms); | 3341 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms); |
| 3341 EXPECT_EQ(stats.width, info.receivers[0].frame_width); | 3342 EXPECT_EQ(stats.width, info.receivers[0].frame_width); |
| 3342 EXPECT_EQ(stats.height, info.receivers[0].frame_height); | 3343 EXPECT_EQ(stats.height, info.receivers[0].frame_height); |
| 3343 EXPECT_EQ(stats.frame_counts.key_frames + stats.frame_counts.delta_frames, | 3344 EXPECT_EQ(stats.frame_counts.key_frames + stats.frame_counts.delta_frames, |
| 3344 info.receivers[0].frames_received); | 3345 info.receivers[0].frames_received); |
| 3345 EXPECT_EQ(stats.frames_rendered, info.receivers[0].frames_rendered); | 3346 EXPECT_EQ(stats.frames_rendered, info.receivers[0].frames_rendered); |
| 3346 EXPECT_EQ(stats.frames_decoded, info.receivers[0].frames_decoded); | 3347 EXPECT_EQ(stats.frames_decoded, info.receivers[0].frames_decoded); |
| 3348 EXPECT_EQ(stats.qp_sum, info.receivers[0].qp_sum); | |
|
hta-webrtc
2017/01/26 12:54:52
Will this comparision be correct? If stats.qp_sum
| |
| 3347 } | 3349 } |
| 3348 | 3350 |
| 3349 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) { | 3351 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) { |
| 3350 FakeVideoReceiveStream* stream = AddRecvStream(); | 3352 FakeVideoReceiveStream* stream = AddRecvStream(); |
| 3351 webrtc::VideoReceiveStream::Stats stats; | 3353 webrtc::VideoReceiveStream::Stats stats; |
| 3352 stats.rtp_stats.transmitted.payload_bytes = 2; | 3354 stats.rtp_stats.transmitted.payload_bytes = 2; |
| 3353 stats.rtp_stats.transmitted.header_bytes = 3; | 3355 stats.rtp_stats.transmitted.header_bytes = 3; |
| 3354 stats.rtp_stats.transmitted.padding_bytes = 4; | 3356 stats.rtp_stats.transmitted.padding_bytes = 4; |
| 3355 stats.rtp_stats.transmitted.packets = 5; | 3357 stats.rtp_stats.transmitted.packets = 5; |
| 3356 stats.rtcp_stats.cumulative_lost = 6; | 3358 stats.rtcp_stats.cumulative_lost = 6; |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4091 | 4093 |
| 4092 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) { | 4094 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) { |
| 4093 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 3); | 4095 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 3); |
| 4094 } | 4096 } |
| 4095 | 4097 |
| 4096 // Test that we normalize send codec format size in simulcast. | 4098 // Test that we normalize send codec format size in simulcast. |
| 4097 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { | 4099 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { |
| 4098 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 541, 271, 2, 2); | 4100 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 541, 271, 2, 2); |
| 4099 } | 4101 } |
| 4100 } // namespace cricket | 4102 } // namespace cricket |
| OLD | NEW |