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

Unified Diff: webrtc/media/base/codec_unittest.cc

Issue 1917193008: Adding getParameters/setParameters APIs to RtpReceiver. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: objc compile errors Created 4 years, 7 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
« no previous file with comments | « webrtc/api/webrtcsession_unittest.cc ('k') | webrtc/media/base/fakemediaengine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/codec_unittest.cc
diff --git a/webrtc/media/base/codec_unittest.cc b/webrtc/media/base/codec_unittest.cc
index 26a6ddae188324e83c57b254095f74107f8cb474..a3468803973373893b6a9aabc9b1c01f9cd75bcf 100644
--- a/webrtc/media/base/codec_unittest.cc
+++ b/webrtc/media/base/codec_unittest.cc
@@ -321,3 +321,19 @@ TEST_F(CodecTest, TestValidateCodecFormat) {
different_bitrates.params[kCodecParamMaxBitrate] = "100";
EXPECT_TRUE(different_bitrates.ValidateCodecFormat());
}
+
+TEST_F(CodecTest, TestToCodecParameters) {
+ const VideoCodec v(96, "V", 320, 200, 30);
+ webrtc::RtpCodecParameters codec_params_1 = v.ToCodecParameters();
+ EXPECT_EQ(96, codec_params_1.payload_type);
+ EXPECT_EQ("V", codec_params_1.mime_type);
+ EXPECT_EQ(cricket::kVideoCodecClockrate, codec_params_1.clock_rate);
+ EXPECT_EQ(1, codec_params_1.channels);
+
+ const AudioCodec a(97, "A", 44100, 20000, 2);
+ webrtc::RtpCodecParameters codec_params_2 = a.ToCodecParameters();
+ EXPECT_EQ(97, codec_params_2.payload_type);
+ EXPECT_EQ("A", codec_params_2.mime_type);
+ EXPECT_EQ(44100, codec_params_2.clock_rate);
+ EXPECT_EQ(2, codec_params_2.channels);
+}
« no previous file with comments | « webrtc/api/webrtcsession_unittest.cc ('k') | webrtc/media/base/fakemediaengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698