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

Unified Diff: webrtc/media/base/videoengine_unittest.h

Issue 2484193002: Expose RtpCodecParameters to VideoMediaInfo stats. (Closed)
Patch Set: Addressed comments Created 4 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
Index: webrtc/media/base/videoengine_unittest.h
diff --git a/webrtc/media/base/videoengine_unittest.h b/webrtc/media/base/videoengine_unittest.h
index aaa03b3e867357bfb57c47d52ad6ed2e530480c0..9a966807fd573ffc60470ba108d5cc420b717902 100644
--- a/webrtc/media/base/videoengine_unittest.h
+++ b/webrtc/media/base/videoengine_unittest.h
@@ -423,6 +423,8 @@ class VideoMediaChannelTest : public testing::Test,
EXPECT_GT(info.senders[0].bytes_sent, 0);
EXPECT_EQ(NumRtpPackets(), info.senders[0].packets_sent);
EXPECT_EQ(0.0, info.senders[0].fraction_lost);
+ ASSERT_TRUE(info.senders[0].codec_payload_type);
+ EXPECT_EQ(DefaultCodec().id, *info.senders[0].codec_payload_type);
hta-webrtc 2016/11/11 12:45:20 Not for this CL, but: we've had several issues wh
EXPECT_EQ(0, info.senders[0].firs_rcvd);
EXPECT_EQ(0, info.senders[0].plis_rcvd);
EXPECT_EQ(0, info.senders[0].nacks_rcvd);
@@ -431,10 +433,16 @@ class VideoMediaChannelTest : public testing::Test,
EXPECT_GT(info.senders[0].framerate_input, 0);
EXPECT_GT(info.senders[0].framerate_sent, 0);
+ EXPECT_NE(info.send_codecs.end(), info.send_codecs.find(DefaultCodec().id));
magjed_webrtc 2016/11/14 08:58:13 nit: I would prefer this: EXPECT_EQ(0, info.send_c
hbos 2016/11/14 09:16:02 Done. ("EXPECT_EQ(1U", not 0.)
+ EXPECT_EQ(DefaultCodec().ToCodecParameters(),
+ info.send_codecs[DefaultCodec().id]);
+
ASSERT_EQ(1U, info.receivers.size());
EXPECT_EQ(1U, info.senders[0].ssrcs().size());
EXPECT_EQ(1U, info.receivers[0].ssrcs().size());
EXPECT_EQ(info.senders[0].ssrcs()[0], info.receivers[0].ssrcs()[0]);
+ ASSERT_TRUE(info.receivers[0].codec_payload_type);
+ EXPECT_EQ(DefaultCodec().id, *info.receivers[0].codec_payload_type);
EXPECT_EQ(NumRtpBytes(), info.receivers[0].bytes_rcvd);
EXPECT_EQ(NumRtpPackets(), info.receivers[0].packets_rcvd);
EXPECT_EQ(0.0, info.receivers[0].fraction_lost);
@@ -449,6 +457,11 @@ class VideoMediaChannelTest : public testing::Test,
EXPECT_GT(info.receivers[0].framerate_rcvd, 0);
EXPECT_GT(info.receivers[0].framerate_decoded, 0);
EXPECT_GT(info.receivers[0].framerate_output, 0);
+
+ EXPECT_NE(info.receive_codecs.end(),
magjed_webrtc 2016/11/14 08:58:13 nit: Same here, use map::count.
hbos 2016/11/14 09:16:02 Done.
+ info.receive_codecs.find(DefaultCodec().id));
+ EXPECT_EQ(DefaultCodec().ToCodecParameters(),
+ info.receive_codecs[DefaultCodec().id]);
}
cricket::VideoSenderInfo GetSenderStats(size_t i) {

Powered by Google App Engine
This is Rietveld 408576698