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

Unified Diff: media/test/pipeline_integration_test.cc

Issue 1909313002: Support HEVC through EME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
Index: media/test/pipeline_integration_test.cc
diff --git a/media/test/pipeline_integration_test.cc b/media/test/pipeline_integration_test.cc
index b90f87921324efeb0ca17e825a89b70f4fd20a26..97e99eb16b5b1e941303481b1264d1ab204503aa 100644
--- a/media/test/pipeline_integration_test.cc
+++ b/media/test/pipeline_integration_test.cc
@@ -106,6 +106,10 @@ const char kMP4VideoAVC3[] = "video/mp4; codecs=\"avc3.64001f\"";
#if BUILDFLAG(ENABLE_MP4_VP9_DEMUXING)
const char kMP4VideoVP9[] = "video/mp4; codecs=\"vp09.00.00.08.01.01.00.00\"";
#endif
+#if BUILDFLAG(ENABLE_HEVC_DEMUXING)
+const char kMP4VideoHEVC1[] = "video/mp4; codecs=\"hvc1.1.6.L93.B0\"";
+const char kMP4VideoHEVC2[] = "video/mp4; codecs=\"hev1.1.6.L93.B0\"";
+#endif
const char kMP4Video[] = "video/mp4; codecs=\"avc1.4D4041\"";
const char kMP4Audio[] = "audio/mp4; codecs=\"mp4a.40.2\"";
const char kMP3[] = "audio/mpeg";
@@ -725,7 +729,7 @@ class PipelineIntegrationTest : public PipelineIntegrationTestHost {
base::Bind(&PipelineIntegrationTest::OnStatusCallback,
base::Unretained(this)));
message_loop_.Run();
- EXPECT_EQ(PIPELINE_OK, pipeline_status_);
+ EXPECT_EQ(pipeline_status_, expected_pipeline_status_);
ddorwin 2016/05/18 19:51:13 Expected comes first in GTest.
servolk 2016/05/19 00:43:43 Done.
return pipeline_status_;
}
@@ -760,7 +764,7 @@ class PipelineIntegrationTest : public PipelineIntegrationTestHost {
base::Unretained(encrypted_media)));
message_loop_.Run();
- EXPECT_EQ(PIPELINE_OK, pipeline_status_);
+ EXPECT_EQ(pipeline_status_, expected_pipeline_status_);
ddorwin 2016/05/18 19:51:14 ditto
servolk 2016/05/19 00:43:43 Done.
}
// Verifies that seeking works properly for ChunkDemuxer when the
@@ -1909,6 +1913,28 @@ TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource_VideoOnly_MP4_VP9) {
}
#endif // #if BUILDFLAG(ENABLE_MP4_VP9_DEMUXING)
+#if BUILDFLAG(ENABLE_HEVC_DEMUXING)
+TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource_VideoOnly_MP4_HEVC1) {
+ // Chromium supports HEVC demuxing, but not decoding, so we expect the decoder
+ // error to be reported here. It indicates that we did pass media mime type
+ // checks and attempted to actually demux and decode the stream.
+ expected_pipeline_status_ = DECODER_ERROR_NOT_SUPPORTED;
ddorwin 2016/05/18 19:51:14 Adding a member variable to the base class is over
servolk 2016/05/19 00:43:43 I've decided to go a little further and introduce
+ MockMediaSource source("bear-320x240-v_frag-hevc.mp4", kMP4VideoHEVC1,
+ kAppendWholeFile);
+ StartPipelineWithMediaSource(&source);
+}
halliwell 2016/05/13 01:53:20 Where will these tests get run in practice? Is it
servolk 2016/05/13 18:33:02 Yes, these tests will run on cast_shell* trybots,
servolk 2016/05/13 18:42:51 Btw, note that these tests actually use a regular
+
+TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource_VideoOnly_MP4_HEVC2) {
+ // Chromium supports HEVC demuxing, but not decoding, so we expect the decoder
+ // error to be reported here. It indicates that we did pass media mime type
+ // checks and attempted to actually demux and decode the stream.
+ expected_pipeline_status_ = DECODER_ERROR_NOT_SUPPORTED;
+ MockMediaSource source("bear-320x240-v_frag-hevc.mp4", kMP4VideoHEVC2,
+ kAppendWholeFile);
+ StartPipelineWithMediaSource(&source);
+}
+#endif // #if BUILDFLAG(ENABLE_MP4_VP9_DEMUXING)
+
#endif // defined(USE_PROPRIETARY_CODECS)
TEST_F(PipelineIntegrationTest, SeekWhilePaused) {

Powered by Google App Engine
This is Rietveld 408576698