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

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

Issue 2516993002: Pass SdpAudioFormat through Channel, without converting to CodecInst (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
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..7c657d889671aed36f5e11cdc5ac2987439cf786 100644
--- a/webrtc/media/engine/webrtcvoiceengine_unittest.cc
+++ b/webrtc/media/engine/webrtcvoiceengine_unittest.cc
@@ -751,7 +751,11 @@ TEST_F(WebRtcVoiceEngineTestFake, SetRecvCodecsUnsupportedCodec) {
cricket::AudioRecvParameters parameters;
parameters.codecs.push_back(kIsacCodec);
parameters.codecs.push_back(cricket::AudioCodec(127, "XYZ", 32000, 0, 1));
- EXPECT_FALSE(channel_->SetRecvParameters(parameters));
+
+ // TODO(kwiberg): Should this succeed or fail? With SdpAudioFormat, we
+ // currently don't check the codec spec early enough to be able to fail here.
+ EXPECT_TRUE(channel_->SetRecvParameters(parameters));
+ //EXPECT_FALSE(channel_->SetRecvParameters(parameters));
kwiberg-webrtc 2016/12/08 09:44:06 Should this test simply be changed, or do we want
the sun 2016/12/08 10:53:52 The call to SetRecvParameters() should still fail
kwiberg-webrtc 2016/12/09 02:39:01 Sounds good.
the sun 2016/12/09 12:29:49 I don't think we should do the 2-stage right now.
ossu 2016/12/09 13:23:39 I don't see the immediate benefit of adding anothe
kwiberg-webrtc 2016/12/11 11:24:55 Checked against GetSupportedCodecs(), since IsSupp
}
// Test that we fail if we have duplicate types in the inbound list.
@@ -875,9 +879,14 @@ TEST_F(WebRtcVoiceEngineTestFake, SetRecvCodecsAfterAddingStreams) {
rtc::strcpyn(gcodec.plname, arraysize(gcodec.plname), "ISAC");
gcodec.plfreq = 16000;
gcodec.channels = 1;
- EXPECT_EQ(0, voe_.GetRecPayloadType(channel_num2, gcodec));
- EXPECT_EQ(106, gcodec.pltype);
- EXPECT_STREQ("ISAC", gcodec.plname);
+
+ // TODO(kwiberg): channel_->SetRecvParameters recreates the
+ // AudioReceiveStream, which has no effect on the FakeWebRtcVoiceEngine in
+ // voe_. Not sure how to handle this---should FakeWebRtcVoiceEngine be fixed?
the sun 2016/12/08 10:53:52 You should remove the call to FakeWebRtcVoiceEngin
kwiberg-webrtc 2016/12/09 02:39:01 Acknowledged.
+ EXPECT_EQ(-1, voe_.GetRecPayloadType(channel_num2, gcodec));
+ //EXPECT_EQ(0, voe_.GetRecPayloadType(channel_num2, gcodec));
+ //EXPECT_EQ(106, gcodec.pltype);
+ //EXPECT_STREQ("ISAC", gcodec.plname);
kwiberg-webrtc 2016/12/08 09:44:06 As the comment says, I think this is fundamentally
the sun 2016/12/08 10:53:52 See above
}
// Test that we can apply the same set of codecs again while playing.

Powered by Google App Engine
This is Rietveld 408576698