 Chromium Code Reviews
 Chromium Code Reviews Issue 1292703005:
  Remove constraint_set_flag checks from ParseH264CodecID().  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1292703005:
  Remove constraint_set_flag checks from ParseH264CodecID().  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: content/browser/media/media_canplaytype_browsertest.cc | 
| diff --git a/content/browser/media/media_canplaytype_browsertest.cc b/content/browser/media/media_canplaytype_browsertest.cc | 
| index ec85647f2eaa3ffdfdf3fe1fbdbede4e64c32cde..4a9045540dfbb4385dea1b821f4d79281e8d7aa4 100644 | 
| --- a/content/browser/media/media_canplaytype_browsertest.cc | 
| +++ b/content/browser/media/media_canplaytype_browsertest.cc | 
| @@ -594,9 +594,9 @@ IN_PROC_BROWSER_TEST_F(MediaCanPlayTypeTest, CodecSupportTest_Avc1Variants) { | 
| // | 
| // Baseline Profile (66 == 0x42). | 
| - // The first two digits must be 42. The second two must be valid hex, but | 
| - // constraint_set_flags are ignored. The last two digits must be any valid | 
| - // level. | 
| + // The first two digits must be 42. The second (constraint_set_flags) must | 
| 
wolenetz
2015/08/20 21:06:43
Here and below, s/second/third digit, and s/fourth
 
sandersd (OOO until July 31)
2015/08/20 21:14:00
Done.
 | 
| + // be valid hex but it otherwise is ignored. The fourth (reserved) must be 0. | 
| + // The last two digits must be any valid level. | 
| // | 
| EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1.42001E\"'")); | 
| EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1.42E00A\"'")); | 
| @@ -607,32 +607,29 @@ IN_PROC_BROWSER_TEST_F(MediaCanPlayTypeTest, CodecSupportTest_Avc1Variants) { | 
| // | 
| // Main Profile (77 == 0x4D). | 
| - // The first four digits must be 4D40. | 
| + // The first two digits must be 4D. The second (constraint_set_flags) must | 
| + // be valid hex but it otherwise is ignored. The fourth (reserved) must be 0. | 
| // The last two digits must be any valid level. | 
| // | 
| - EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1.4D400A\"'")); | 
| - EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1.4D401E\"'")); | 
| + EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1.4D001E\"'")); | 
| + EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1.4DE00A\"'")); | 
| + EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc1.4DG01E\"'")); | 
| - // Other values are not allowed for the third and fourth digits. | 
| - EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc1.4D301E\"'")); | 
| - EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc1.4D501E\"'")); | 
| - EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc1.4D411E\"'")); | 
| - EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc1.4D4F1E\"'")); | 
| + // The fourth digit must be 0. | 
| + EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc1.4DE11E\"'")); | 
| // | 
| // High Profile (100 == 0x64). | 
| - // The first four digits must be 6400. | 
| + // The first two digits must be 64. The second (constraint_set_flags) must | 
| + // be valid hex but it otherwise is ignored. The fourth (reserved) must be 0. | 
| // The last two digits must be any valid level. | 
| // | 
| - EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1.64000A\"'")); | 
| EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1.64001E\"'")); | 
| - EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1.64001F\"'")); | 
| + EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc1.64E00A\"'")); | 
| + EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc1.64G01E\"'")); | 
| - // Other values are not allowed for the third and fourth digits. | 
| - EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc1.64101E\"'")); | 
| - EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc1.64f01E\"'")); | 
| - EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc1.64011E\"'")); | 
| - EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc1.640F1E\"'")); | 
| + // The fourth digit must be 0. | 
| + EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc1.64E11E\"'")); | 
| // | 
| // Other profiles are not known to be supported. | 
| @@ -666,9 +663,9 @@ IN_PROC_BROWSER_TEST_F(MediaCanPlayTypeTest, CodecSupportTest_Avc3Variants) { | 
| // | 
| // Baseline Profile (66 == 0x42). | 
| - // The first two digits must be 42. The second two must be valid hex, but | 
| - // constraint_set_flags are ignored. The last two digits must be any valid | 
| - // level. | 
| + // The first two digits must be 42. The second (constraint_set_flags) must | 
| + // be valid hex but it otherwise is ignored. The fourth (reserved) must be 0. | 
| + // The last two digits must be any valid level. | 
| // | 
| EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc3.42001E\"'")); | 
| EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc3.42E00A\"'")); | 
| @@ -679,32 +676,29 @@ IN_PROC_BROWSER_TEST_F(MediaCanPlayTypeTest, CodecSupportTest_Avc3Variants) { | 
| // | 
| // Main Profile (77 == 0x4D). | 
| - // The first four digits must be 4D40. | 
| + // The first two digits must be 4D. The second (constraint_set_flags) must | 
| + // be valid hex but it otherwise is ignored. The fourth (reserved) must be 0. | 
| // The last two digits must be any valid level. | 
| // | 
| - EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc3.4D400A\"'")); | 
| - EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc3.4D401E\"'")); | 
| + EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc3.4D001E\"'")); | 
| + EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc3.4DE00A\"'")); | 
| + EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3.4DG01E\"'")); | 
| - // Other values are not allowed for the third and fourth digits. | 
| - EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3.4D301E\"'")); | 
| - EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3.4D501E\"'")); | 
| - EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3.4D411E\"'")); | 
| - EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3.4D4F1E\"'")); | 
| + // The fourth digit must be 0. | 
| + EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3.4DE11E\"'")); | 
| // | 
| // High Profile (100 == 0x64). | 
| - // The first four digits must be 6400. | 
| + // The first two digits must be 64. The second (constraint_set_flags) must | 
| + // be valid hex but it otherwise is ignored. The fourth (reserved) must be 0. | 
| // The last two digits must be any valid level. | 
| // | 
| - EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc3.64000A\"'")); | 
| EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc3.64001E\"'")); | 
| - EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc3.64001F\"'")); | 
| + EXPECT_EQ(kPropProbably, CanPlay("'video/mp4; codecs=\"avc3.64E00A\"'")); | 
| + EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3.64G01E\"'")); | 
| - // Other values are not allowed for the third and fourth digits. | 
| - EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3.64101E\"'")); | 
| - EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3.64f01E\"'")); | 
| - EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3.64011E\"'")); | 
| - EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3.640F1E\"'")); | 
| + // The fourth digit must be 0. | 
| + EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3.64E11E\"'")); | 
| // | 
| // Other profiles are not known to be supported. |