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

Unified Diff: talk/media/webrtc/webrtcvideoengine2_unittest.cc

Issue 1264693003: Add QP stats for sent video streams to StatsReport. Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: add unit tests Created 5 years, 1 month 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
« no previous file with comments | « talk/media/webrtc/webrtcvideoengine2.cc ('k') | webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/webrtc/webrtcvideoengine2_unittest.cc
diff --git a/talk/media/webrtc/webrtcvideoengine2_unittest.cc b/talk/media/webrtc/webrtcvideoengine2_unittest.cc
index 832c4d06233a71c40c6c1749eb9f88e626554095..985d92a0bb0c8f020e4c3a4688cb1a6afe8a10b1 100644
--- a/talk/media/webrtc/webrtcvideoengine2_unittest.cc
+++ b/talk/media/webrtc/webrtcvideoengine2_unittest.cc
@@ -2472,6 +2472,26 @@ TEST_F(WebRtcVideoChannel2Test, GetStatsReportsUpperResolution) {
EXPECT_EQ(90, info.senders[0].send_frame_height);
}
+TEST_F(WebRtcVideoChannel2Test, GetStatsReportsQpForUpperResolution) {
+ FakeVideoSendStream* stream = AddSendStream();
+ webrtc::VideoSendStream::Stats stats;
+ stats.substreams[17].width = 320;
+ stats.substreams[17].height = 180;
+ stats.substreams[17].qp = 20;
+ stats.substreams[42].width = 1280;
+ stats.substreams[42].height = 720;
+ stats.substreams[42].qp = 21;
+ stats.substreams[11].width = 640;
+ stats.substreams[11].height = 360;
+ stats.substreams[11].qp = 22;
+ stream->SetStats(stats);
+
+ cricket::VideoMediaInfo info;
+ ASSERT_TRUE(channel_->GetStats(&info));
+ ASSERT_EQ(1u, info.senders.size());
+ EXPECT_EQ(21, info.senders[0].qp);
+}
+
TEST_F(WebRtcVideoChannel2Test, GetStatsTracksAdaptationStats) {
AddSendStream(cricket::CreateSimStreamParams("cname", MAKE_VECTOR(kSsrcs3)));
« no previous file with comments | « talk/media/webrtc/webrtcvideoengine2.cc ('k') | webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698