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

Unified Diff: webrtc/api/webrtcsdp_unittest.cc

Issue 1845673002: Removing `preference` field from `cricket::Codec`. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding back a unit test. Created 4 years, 8 months 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/api/webrtcsdp_unittest.cc
diff --git a/webrtc/api/webrtcsdp_unittest.cc b/webrtc/api/webrtcsdp_unittest.cc
index c52720453b7021042760dabc688efd5768dc94fd..d2b9ee3f0f6fb60fec67e77531b7a33ec6f18c2a 100644
--- a/webrtc/api/webrtcsdp_unittest.cc
+++ b/webrtc/api/webrtcsdp_unittest.cc
@@ -1028,10 +1028,10 @@ class WebRtcSdpTest : public testing::Test {
"inline:NzB4d1BINUAvLEw6UzF3WSJ+PSdFcGdUJShpX1Zj|2^20|1:32",
"dummy_session_params"));
audio->set_protocol(cricket::kMediaProtocolSavpf);
- AudioCodec opus(111, "opus", 48000, 0, 2, 3);
+ AudioCodec opus(111, "opus", 48000, 0, 2);
audio->AddCodec(opus);
- audio->AddCodec(AudioCodec(103, "ISAC", 16000, 32000, 1, 2));
- audio->AddCodec(AudioCodec(104, "ISAC", 32000, 56000, 1, 1));
+ audio->AddCodec(AudioCodec(103, "ISAC", 16000, 32000, 1));
+ audio->AddCodec(AudioCodec(104, "ISAC", 32000, 56000, 1));
return audio;
}
@@ -1047,8 +1047,7 @@ class WebRtcSdpTest : public testing::Test {
VideoCodec(120, JsepSessionDescription::kDefaultVideoCodecName,
JsepSessionDescription::kMaxVideoCodecWidth,
JsepSessionDescription::kMaxVideoCodecHeight,
- JsepSessionDescription::kDefaultVideoCodecFramerate,
- JsepSessionDescription::kDefaultVideoCodecPreference));
+ JsepSessionDescription::kDefaultVideoCodecFramerate));
return video;
}
@@ -1398,7 +1397,7 @@ class WebRtcSdpTest : public testing::Test {
data_desc_ = data.get();
data_desc_->set_protocol(cricket::kMediaProtocolDtlsSctp);
DataCodec codec(cricket::kGoogleSctpDataCodecId,
- cricket::kGoogleSctpDataCodecName, 0);
+ cricket::kGoogleSctpDataCodecName);
codec.SetParam(cricket::kCodecParamPort, kDefaultSctpPort);
data_desc_->AddCodec(codec);
desc_.AddContent(kDataContentName, NS_JINGLE_DRAFT_SCTP, data.release());
@@ -1411,7 +1410,7 @@ class WebRtcSdpTest : public testing::Test {
new DataContentDescription());
data_desc_ = data.get();
- data_desc_->AddCodec(DataCodec(101, "google-data", 1));
+ data_desc_->AddCodec(DataCodec(101, "google-data"));
StreamParams data_stream;
data_stream.id = kDataChannelMsid;
data_stream.cname = kDataChannelCname;
@@ -1993,8 +1992,8 @@ TEST_F(WebRtcSdpTest, SerializeWithSctpDataChannelAndNewPort) {
jsep_desc.description()->GetContentDescriptionByName(kDataContentName));
const int kNewPort = 1234;
- cricket::DataCodec codec(
- cricket::kGoogleSctpDataCodecId, cricket::kGoogleSctpDataCodecName, 0);
+ cricket::DataCodec codec(cricket::kGoogleSctpDataCodecId,
+ cricket::kGoogleSctpDataCodecName);
codec.SetParam(cricket::kCodecParamPort, kNewPort);
dcdesc->AddOrReplaceCodec(codec);
@@ -2149,9 +2148,9 @@ TEST_F(WebRtcSdpTest, DeserializeSessionDescriptionWithoutRtpmap) {
jdesc.description()->GetContentDescriptionByName(cricket::CN_AUDIO));
AudioCodecs ref_codecs;
// The codecs in the AudioContentDescription will be sorted by preference.
pbos-webrtc 2016/04/05 09:30:32 This is no longer correct, grep for preference a b
Taylor Brandstetter 2016/04/05 17:57:13 Well they're still sorted by preference (the order
pbos-webrtc 2016/04/05 18:11:35 Can you clarify that in the comment (preferred cod
Taylor Brandstetter 2016/04/06 01:11:15 Comment has been clarified. Only reference to "pre
- ref_codecs.push_back(AudioCodec(0, "PCMU", 8000, 0, 1, 3));
- ref_codecs.push_back(AudioCodec(18, "G729", 16000, 0, 1, 2));
- ref_codecs.push_back(AudioCodec(103, "ISAC", 16000, 32000, 1, 1));
+ ref_codecs.push_back(AudioCodec(0, "PCMU", 8000, 0, 1));
+ ref_codecs.push_back(AudioCodec(18, "G729", 16000, 0, 1));
+ ref_codecs.push_back(AudioCodec(103, "ISAC", 16000, 32000, 1));
EXPECT_EQ(ref_codecs, audio->codecs());
}

Powered by Google App Engine
This is Rietveld 408576698