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

Unified Diff: webrtc/video/send_statistics_proxy_unittest.cc

Issue 2430603003: Implement qpSum stat for video send ssrc stats. (Closed)
Patch Set: Change type of qp_sum int -> uint32_t. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/video/send_statistics_proxy_unittest.cc
diff --git a/webrtc/video/send_statistics_proxy_unittest.cc b/webrtc/video/send_statistics_proxy_unittest.cc
index cb3bde442647856fab6cea7b41e575148105b45e..0e29533243b1df453bead155fe2ae65474eec3d4 100644
--- a/webrtc/video/send_statistics_proxy_unittest.cc
+++ b/webrtc/video/send_statistics_proxy_unittest.cc
@@ -311,6 +311,18 @@ TEST_F(SendStatisticsProxyTest, OnSendEncodedImageIncreasesFramesEncoded) {
}
}
+TEST_F(SendStatisticsProxyTest, OnSendEncodedImageIncreasesQpSum) {
+ EncodedImage encoded_image;
+ CodecSpecificInfo codec_info;
+ EXPECT_EQ(0u, statistics_proxy_->GetStats().qp_sum);
+ encoded_image.qp_ = 3;
+ statistics_proxy_->OnSendEncodedImage(encoded_image, &codec_info);
+ EXPECT_EQ(3u, statistics_proxy_->GetStats().qp_sum);
+ encoded_image.qp_ = 127;
+ statistics_proxy_->OnSendEncodedImage(encoded_image, &codec_info);
+ EXPECT_EQ(130u, statistics_proxy_->GetStats().qp_sum);
hta-webrtc 2016/10/21 09:13:12 Can you add an unittest that chekcs that if codec
sakal 2016/10/21 14:17:26 Since QP sum is an unsigned type, it cannot be -1.
+}
+
TEST_F(SendStatisticsProxyTest, SwitchContentTypeUpdatesHistograms) {
const int kWidth = 640;
const int kHeight = 480;

Powered by Google App Engine
This is Rietveld 408576698