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

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

Issue 2649133005: Add QP sum stats for received streams. (Closed)
Patch Set: Rebase. Created 3 years, 10 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
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 3405 matching lines...) Expand 10 before | Expand all | Expand 10 after
3416 stats.target_delay_ms = 5; 3416 stats.target_delay_ms = 5;
3417 stats.jitter_buffer_ms = 6; 3417 stats.jitter_buffer_ms = 6;
3418 stats.min_playout_delay_ms = 7; 3418 stats.min_playout_delay_ms = 7;
3419 stats.render_delay_ms = 8; 3419 stats.render_delay_ms = 8;
3420 stats.width = 9; 3420 stats.width = 9;
3421 stats.height = 10; 3421 stats.height = 10;
3422 stats.frame_counts.key_frames = 11; 3422 stats.frame_counts.key_frames = 11;
3423 stats.frame_counts.delta_frames = 12; 3423 stats.frame_counts.delta_frames = 12;
3424 stats.frames_rendered = 13; 3424 stats.frames_rendered = 13;
3425 stats.frames_decoded = 14; 3425 stats.frames_decoded = 14;
3426 stats.qp_sum = rtc::Optional<uint64_t>(15);
3426 stream->SetStats(stats); 3427 stream->SetStats(stats);
3427 3428
3428 cricket::VideoMediaInfo info; 3429 cricket::VideoMediaInfo info;
3429 ASSERT_TRUE(channel_->GetStats(&info)); 3430 ASSERT_TRUE(channel_->GetStats(&info));
3430 EXPECT_EQ(stats.decoder_implementation_name, 3431 EXPECT_EQ(stats.decoder_implementation_name,
3431 info.receivers[0].decoder_implementation_name); 3432 info.receivers[0].decoder_implementation_name);
3432 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms); 3433 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms);
3433 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms); 3434 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms);
3434 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms); 3435 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms);
3435 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms); 3436 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms);
3436 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms); 3437 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms);
3437 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms); 3438 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms);
3438 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms); 3439 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms);
3439 EXPECT_EQ(stats.width, info.receivers[0].frame_width); 3440 EXPECT_EQ(stats.width, info.receivers[0].frame_width);
3440 EXPECT_EQ(stats.height, info.receivers[0].frame_height); 3441 EXPECT_EQ(stats.height, info.receivers[0].frame_height);
3441 EXPECT_EQ(stats.frame_counts.key_frames + stats.frame_counts.delta_frames, 3442 EXPECT_EQ(stats.frame_counts.key_frames + stats.frame_counts.delta_frames,
3442 info.receivers[0].frames_received); 3443 info.receivers[0].frames_received);
3443 EXPECT_EQ(stats.frames_rendered, info.receivers[0].frames_rendered); 3444 EXPECT_EQ(stats.frames_rendered, info.receivers[0].frames_rendered);
3444 EXPECT_EQ(stats.frames_decoded, info.receivers[0].frames_decoded); 3445 EXPECT_EQ(stats.frames_decoded, info.receivers[0].frames_decoded);
3446 EXPECT_EQ(stats.qp_sum, info.receivers[0].qp_sum);
3445 } 3447 }
3446 3448
3447 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) { 3449 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) {
3448 FakeVideoReceiveStream* stream = AddRecvStream(); 3450 FakeVideoReceiveStream* stream = AddRecvStream();
3449 webrtc::VideoReceiveStream::Stats stats; 3451 webrtc::VideoReceiveStream::Stats stats;
3450 stats.rtp_stats.transmitted.payload_bytes = 2; 3452 stats.rtp_stats.transmitted.payload_bytes = 2;
3451 stats.rtp_stats.transmitted.header_bytes = 3; 3453 stats.rtp_stats.transmitted.header_bytes = 3;
3452 stats.rtp_stats.transmitted.padding_bytes = 4; 3454 stats.rtp_stats.transmitted.padding_bytes = 4;
3453 stats.rtp_stats.transmitted.packets = 5; 3455 stats.rtp_stats.transmitted.packets = 5;
3454 stats.rtcp_stats.cumulative_lost = 6; 3456 stats.rtcp_stats.cumulative_lost = 6;
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
4240 } 4242 }
4241 4243
4242 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsForSimulcastScreenshare) { 4244 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsForSimulcastScreenshare) {
4243 webrtc::test::ScopedFieldTrials override_field_trials_( 4245 webrtc::test::ScopedFieldTrials override_field_trials_(
4244 "WebRTC-SimulcastScreenshare/Enabled/"); 4246 "WebRTC-SimulcastScreenshare/Enabled/");
4245 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 2, true, 4247 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 2, true,
4246 true); 4248 true);
4247 } 4249 }
4248 4250
4249 } // namespace cricket 4251 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | webrtc/modules/video_coding/codecs/test/videoprocessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698