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

Unified Diff: content/browser/media/media_canplaytype_browsertest.cc

Issue 1837963004: Make CanPlayType return "probably" for HI10P h264 videos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: negative test for encrypted video added Created 4 years, 9 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: 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 1a3af5a3c6e5ffd53ecca8329e1c9178f43a980a..9d23c04309e669f40562e131d67851130678035e 100644
--- a/content/browser/media/media_canplaytype_browsertest.cc
+++ b/content/browser/media/media_canplaytype_browsertest.cc
@@ -73,6 +73,12 @@ const char* kMp2tsAc3Eac3Probably = kPropProbably;
const char* kMp2tsAc3Eac3Probably = kNot;
#endif
+#if !defined(MEDIA_DISABLE_FFMPEG) && !defined(OS_ANDROID)
+const char* kHI10PProbably = kPropProbably;
ddorwin 2016/03/31 22:31:12 The logic above might not be clear, so you might c
hubbe 2016/04/01 00:20:58 Comment added.
+#else
+const char* kHI10PProbably = kMaybe;
ddorwin 2016/03/31 22:31:12 nit: lowercase 'i' is probably more appropriate.
hubbe 2016/04/01 00:20:58 Done (I also lower-cased the first P)
+#endif
+
namespace content {
class MediaCanPlayTypeTest : public MediaBrowserTest {
@@ -1075,6 +1081,21 @@ IN_PROC_BROWSER_TEST_F(MediaCanPlayTypeTest, CodecSupportTest_Avc3Variants) {
EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3.64E0FF\"'"));
//
+ // High 10-bit Profile (110 == 0x6E).
+ // The first two digits after the dot must be 66. The third and fourth digits
+ // contain constraint_set_flags and must be valid hex. The last two digits
+ // should be any valid H.264 level. If the level value is invalid the result
+ // will be kMaybe.
+ //
+ EXPECT_EQ(kHI10PProbably, CanPlay("'video/mp4; codecs=\"avc3.6E001E\"'"));
+ EXPECT_EQ(kHI10PProbably, CanPlay("'video/mp4; codecs=\"avc3.6E400A\"'"));
+ EXPECT_EQ(kHI10PProbably, CanPlay("'video/mp4; codecs=\"avc3.6E800A\"'"));
+ EXPECT_EQ(kHI10PProbably, CanPlay("'video/mp4; codecs=\"avc3.6EE00A\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"avc3.6EG01E\"'"));
+ EXPECT_EQ(kNot, CanPlay("'video/mp4; codecs=\"avc3.6E000G\"'"));
+ EXPECT_EQ(kPropMaybe, CanPlay("'video/mp4; codecs=\"avc3.6EE0FF\"'"));
+
+ //
// Other profiles are not known to be supported.
//

Powered by Google App Engine
This is Rietveld 408576698