Add qp counter for H264 in SendStatisticsProxy.
BUG=webrtc:6578
Review-Url: https://codereview.webrtc.org/2437323002
Cr-Commit-Position: refs/heads/master@{#14895}
diff --git a/webrtc/video/send_statistics_proxy_unittest.cc b/webrtc/video/send_statistics_proxy_unittest.cc
index fcab7d1..a467f6c 100644
--- a/webrtc/video/send_statistics_proxy_unittest.cc
+++ b/webrtc/video/send_statistics_proxy_unittest.cc
@@ -467,6 +467,20 @@
EXPECT_EQ(1, metrics::NumEvents("WebRTC.Video.Encoded.Qp.Vp9", kQpIdx0));
}
+TEST_F(SendStatisticsProxyTest, VerifyQpHistogramStats_H264) {
+ EncodedImage encoded_image;
+ CodecSpecificInfo codec_info;
+ codec_info.codecType = kVideoCodecH264;
+
+ for (int i = 0; i < SendStatisticsProxy::kMinRequiredMetricsSamples; ++i) {
+ encoded_image.qp_ = kQpIdx0;
+ statistics_proxy_->OnSendEncodedImage(encoded_image, &codec_info);
+ }
+ statistics_proxy_.reset();
+ EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.Encoded.Qp.H264"));
+ EXPECT_EQ(1, metrics::NumEvents("WebRTC.Video.Encoded.Qp.H264", kQpIdx0));
+}
+
TEST_F(SendStatisticsProxyTest,
BandwidthLimitedHistogramsNotUpdatedWhenDisabled) {
EncodedImage encoded_image;