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

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

Issue 1420963005: Add QP stats for received video streams to StatsReport. Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: add unit test Created 5 years 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 | « talk/media/webrtc/webrtcvideoengine2.cc ('k') | webrtc/video/receive_statistics_proxy.h » ('j') | 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 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 2518 matching lines...) Expand 10 before | Expand all | Expand 10 after
2529 ASSERT_TRUE(channel_->GetStats(&info)); 2529 ASSERT_TRUE(channel_->GetStats(&info));
2530 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms); 2530 EXPECT_EQ(stats.decode_ms, info.receivers[0].decode_ms);
2531 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms); 2531 EXPECT_EQ(stats.max_decode_ms, info.receivers[0].max_decode_ms);
2532 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms); 2532 EXPECT_EQ(stats.current_delay_ms, info.receivers[0].current_delay_ms);
2533 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms); 2533 EXPECT_EQ(stats.target_delay_ms, info.receivers[0].target_delay_ms);
2534 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms); 2534 EXPECT_EQ(stats.jitter_buffer_ms, info.receivers[0].jitter_buffer_ms);
2535 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms); 2535 EXPECT_EQ(stats.min_playout_delay_ms, info.receivers[0].min_playout_delay_ms);
2536 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms); 2536 EXPECT_EQ(stats.render_delay_ms, info.receivers[0].render_delay_ms);
2537 } 2537 }
2538 2538
2539 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceiveQpStatsCorrectly) {
2540 FakeVideoReceiveStream* stream = AddRecvStream();
2541 webrtc::VideoReceiveStream::Stats stats;
2542 stats.qp = 9;
2543 stream->SetStats(stats);
2544
2545 cricket::VideoMediaInfo info;
2546 ASSERT_TRUE(channel_->GetStats(&info));
2547 EXPECT_EQ(stats.qp, info.receivers[0].qp);
2548 }
2549
2539 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) { 2550 TEST_F(WebRtcVideoChannel2Test, GetStatsTranslatesReceivePacketStatsCorrectly) {
2540 FakeVideoReceiveStream* stream = AddRecvStream(); 2551 FakeVideoReceiveStream* stream = AddRecvStream();
2541 webrtc::VideoReceiveStream::Stats stats; 2552 webrtc::VideoReceiveStream::Stats stats;
2542 stats.rtp_stats.transmitted.payload_bytes = 2; 2553 stats.rtp_stats.transmitted.payload_bytes = 2;
2543 stats.rtp_stats.transmitted.header_bytes = 3; 2554 stats.rtp_stats.transmitted.header_bytes = 3;
2544 stats.rtp_stats.transmitted.padding_bytes = 4; 2555 stats.rtp_stats.transmitted.padding_bytes = 4;
2545 stats.rtp_stats.transmitted.packets = 5; 2556 stats.rtp_stats.transmitted.packets = 5;
2546 stats.rtcp_stats.cumulative_lost = 6; 2557 stats.rtcp_stats.cumulative_lost = 6;
2547 stats.rtcp_stats.fraction_lost = 7; 2558 stats.rtcp_stats.fraction_lost = 7;
2548 stream->SetStats(stats); 2559 stream->SetStats(stats);
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
3226 // Ensures that the correct settings are applied to the codec when two temporal 3237 // Ensures that the correct settings are applied to the codec when two temporal
3227 // layer screencasting is enabled, and that the correct simulcast settings are 3238 // layer screencasting is enabled, and that the correct simulcast settings are
3228 // reapplied when disabling screencasting. 3239 // reapplied when disabling screencasting.
3229 TEST_F(WebRtcVideoChannel2SimulcastTest, 3240 TEST_F(WebRtcVideoChannel2SimulcastTest,
3230 DISABLED_TwoTemporalLayerScreencastSettings) { 3241 DISABLED_TwoTemporalLayerScreencastSettings) {
3231 // TODO(pbos): Implement. 3242 // TODO(pbos): Implement.
3232 FAIL() << "Not implemented."; 3243 FAIL() << "Not implemented.";
3233 } 3244 }
3234 3245
3235 } // namespace cricket 3246 } // namespace cricket
OLDNEW
« no previous file with comments | « talk/media/webrtc/webrtcvideoengine2.cc ('k') | webrtc/video/receive_statistics_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698