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

Unified Diff: webrtc/media/engine/webrtcvoiceengine_unittest.cc

Issue 2568553002: Add SSRC to RtpEncodingParameters for audio. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvoiceengine_unittest.cc
diff --git a/webrtc/media/engine/webrtcvoiceengine_unittest.cc b/webrtc/media/engine/webrtcvoiceengine_unittest.cc
index d90695de26a310fb94cf9ef8a189c08cfd60f6aa..bddefdd145fe33e1a4b386a859aa1af456318cea 100644
--- a/webrtc/media/engine/webrtcvoiceengine_unittest.cc
+++ b/webrtc/media/engine/webrtcvoiceengine_unittest.cc
@@ -1113,6 +1113,14 @@ TEST_F(WebRtcVoiceEngineTestFake, GetRtpSendParametersCodecs) {
EXPECT_EQ(kPcmuCodec.ToCodecParameters(), rtp_parameters.codecs[1]);
}
+// Test that GetRtpSendParameters returns an SSRC.
+TEST_F(WebRtcVoiceEngineTestFake, GetRtpSendParametersSsrc) {
+ EXPECT_TRUE(SetupSendStream());
+ webrtc::RtpParameters rtp_parameters = channel_->GetRtpSendParameters(kSsrc1);
+ ASSERT_EQ(1u, rtp_parameters.encodings.size());
+ EXPECT_EQ(kSsrc1, rtp_parameters.encodings[0].ssrc);
+}
+
// Test that if we set/get parameters multiple times, we get the same results.
TEST_F(WebRtcVoiceEngineTestFake, SetAndGetRtpSendParameters) {
EXPECT_TRUE(SetupSendStream());
@@ -1146,6 +1154,15 @@ TEST_F(WebRtcVoiceEngineTestFake, GetRtpReceiveParametersCodecs) {
EXPECT_EQ(kPcmuCodec.ToCodecParameters(), rtp_parameters.codecs[1]);
}
+// Test that GetRtpReceiveParameters returns an SSRC.
+TEST_F(WebRtcVoiceEngineTestFake, GetRtpReceiveParametersSsrc) {
+ EXPECT_TRUE(SetupRecvStream());
+ webrtc::RtpParameters rtp_parameters =
the sun 2016/12/12 08:59:19 note: you could use 'auto' here and avoid a line b
Taylor Brandstetter 2016/12/12 18:50:17 I think I'll leave it in this case, for consistenc
+ channel_->GetRtpReceiveParameters(kSsrc1);
+ ASSERT_EQ(1u, rtp_parameters.encodings.size());
+ EXPECT_EQ(kSsrc1, rtp_parameters.encodings[0].ssrc);
+}
+
// Test that if we set/get parameters multiple times, we get the same results.
TEST_F(WebRtcVoiceEngineTestFake, SetAndGetRtpReceiveParameters) {
EXPECT_TRUE(SetupRecvStream());
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698