Index: webrtc/common_video/h264/profile_level_id_unittest.cc |
diff --git a/webrtc/common_video/h264/profile_level_id_unittest.cc b/webrtc/common_video/h264/profile_level_id_unittest.cc |
index 8237b20c2bb7da6fb31852430cce9d658f2282a8..dd9f82917ca92941e1aa3bec9b71717409664b09 100644 |
--- a/webrtc/common_video/h264/profile_level_id_unittest.cc |
+++ b/webrtc/common_video/h264/profile_level_id_unittest.cc |
@@ -70,6 +70,19 @@ TEST(H264ProfileLevelId, TestParsingConstrainedHigh) { |
EXPECT_EQ(kProfileConstrainedHigh, ParseProfileLevelId("640c1f")->profile); |
} |
+TEST(H264ProfileLevelId, TestSupportedLevel) { |
+ EXPECT_EQ(kLevel2_1, *SupportedLevel(640 * 480, 25)); |
+ EXPECT_EQ(kLevel3_1, *SupportedLevel(1280 * 720, 30)); |
+ EXPECT_EQ(kLevel4_2, *SupportedLevel(1920 * 1280, 60)); |
+} |
+ |
+// Test supported level below level 1 requirements. |
+TEST(H264ProfileLevelId, TestSupportedLevelInvalid) { |
+ EXPECT_FALSE(SupportedLevel(0, 0)); |
+ EXPECT_FALSE(SupportedLevel(1280 * 720, 5)); |
+ EXPECT_FALSE(SupportedLevel(183 * 137, 30)); |
hta-webrtc
2016/11/03 14:04:32
Please add a comment as to why these resolution/fr
magjed_webrtc
2016/11/03 14:53:39
Done.
|
+} |
+ |
TEST(H264ProfileLevelId, TestToString) { |
EXPECT_EQ("42e01f", ProfileLevelIdToString(ProfileLevelId( |
kProfileConstrainedBaseline, kLevel3_1))); |