Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2_unittest.cc

Issue 2607913002: RTCMediaStreamTrackStats.framesReceived collected by RTCStatsCollector. (Closed)
Patch Set: Rebase with master Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3283 matching lines...) Expand 10 before | Expand all | Expand 10 after
3294 stats.decoder_implementation_name = "decoder_implementation_name"; 3294 stats.decoder_implementation_name = "decoder_implementation_name";
3295 stats.decode_ms = 2; 3295 stats.decode_ms = 2;
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.frames_decoded = 11; 3304 stats.frame_counts.key_frames = 11;
3305 stats.frame_counts.delta_frames = 12;
3306 stats.frames_decoded = 13;
3305 stream->SetStats(stats); 3307 stream->SetStats(stats);
3306 3308
3307 cricket::VideoMediaInfo info; 3309 cricket::VideoMediaInfo info;
3308 ASSERT_TRUE(channel_->GetStats(&info)); 3310 ASSERT_TRUE(channel_->GetStats(&info));
3309 EXPECT_EQ(stats.decoder_implementation_name, 3311 EXPECT_EQ(stats.decoder_implementation_name,
3310 info.receivers[0].decoder_implementation_name); 3312 info.receivers[0].decoder_implementation_name);
3311 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms); 3313 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms);
3312 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms); 3314 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms);
3313 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms); 3315 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms);
3314 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms); 3316 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms);
3315 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms); 3317 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms);
3316 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms); 3318 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms);
3317 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms); 3319 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms);
3318 EXPECT_EQ(stats.width, info.receivers[0].frame_width); 3320 EXPECT_EQ(stats.width, info.receivers[0].frame_width);
3319 EXPECT_EQ(stats.height, info.receivers[0].frame_height); 3321 EXPECT_EQ(stats.height, info.receivers[0].frame_height);
3322 EXPECT_EQ(stats.frame_counts.key_frames + stats.frame_counts.delta_frames,
3323 info.receivers[0].frames_received);
3320 EXPECT_EQ(stats.frames_decoded, info.receivers[0].frames_decoded); 3324 EXPECT_EQ(stats.frames_decoded, info.receivers[0].frames_decoded);
3321 } 3325 }
3322 3326
3323 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) { 3327 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) {
3324 FakeVideoReceiveStream* stream = AddRecvStream(); 3328 FakeVideoReceiveStream* stream = AddRecvStream();
3325 webrtc::VideoReceiveStream::Stats stats; 3329 webrtc::VideoReceiveStream::Stats stats;
3326 stats.rtp_stats.transmitted.payload_bytes = 2; 3330 stats.rtp_stats.transmitted.payload_bytes = 2;
3327 stats.rtp_stats.transmitted.header_bytes = 3; 3331 stats.rtp_stats.transmitted.header_bytes = 3;
3328 stats.rtp_stats.transmitted.padding_bytes = 4; 3332 stats.rtp_stats.transmitted.padding_bytes = 4;
3329 stats.rtp_stats.transmitted.packets = 5; 3333 stats.rtp_stats.transmitted.packets = 5;
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
4065 4069
4066 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) { 4070 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) {
4067 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 3); 4071 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 3);
4068 } 4072 }
4069 4073
4070 // Test that we normalize send codec format size in simulcast. 4074 // Test that we normalize send codec format size in simulcast.
4071 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { 4075 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) {
4072 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 541, 271, 2, 2); 4076 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 541, 271, 2, 2);
4073 } 4077 }
4074 } // namespace cricket 4078 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698