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

Side by Side Diff: media/test/pipeline_integration_test.cc

Issue 2928873002: Enable VP9 in MP4 by default (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « media/formats/mp4/box_definitions.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after
1963 1963
1964 ASSERT_TRUE(WaitUntilOnEnded()); 1964 ASSERT_TRUE(WaitUntilOnEnded());
1965 source.Shutdown(); 1965 source.Shutdown();
1966 Stop(); 1966 Stop();
1967 } 1967 }
1968 1968
1969 TEST_F(PipelineIntegrationTest, 1969 TEST_F(PipelineIntegrationTest,
1970 MAYBE_EME(EncryptedPlayback_MP4_VP9_CENC_VideoOnly)) { 1970 MAYBE_EME(EncryptedPlayback_MP4_VP9_CENC_VideoOnly)) {
1971 MockMediaSource source("bear-320x240-v_frag-vp9-cenc.mp4", kMP4VideoVP9, 1971 MockMediaSource source("bear-320x240-v_frag-vp9-cenc.mp4", kMP4VideoVP9,
1972 kAppendWholeFile); 1972 kAppendWholeFile);
1973 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
1974 switches::kEnableVp9InMp4)) {
1975 ASSERT_EQ(ChunkDemuxer::kNotSupported, source.AddId());
1976 return;
1977 }
1978
1979 FakeEncryptedMedia encrypted_media(new KeyProvidingApp()); 1973 FakeEncryptedMedia encrypted_media(new KeyProvidingApp());
1980 EXPECT_EQ(PIPELINE_OK, 1974 EXPECT_EQ(PIPELINE_OK,
1981 StartPipelineWithEncryptedMedia(&source, &encrypted_media)); 1975 StartPipelineWithEncryptedMedia(&source, &encrypted_media));
1982 1976
1983 source.EndOfStream(); 1977 source.EndOfStream();
1984 1978
1985 Play(); 1979 Play();
1986 1980
1987 ASSERT_TRUE(WaitUntilOnEnded()); 1981 ASSERT_TRUE(WaitUntilOnEnded());
1988 source.Shutdown(); 1982 source.Shutdown();
(...skipping 14 matching lines...) Expand all
2003 Play(); 1997 Play();
2004 1998
2005 ASSERT_TRUE(WaitUntilOnEnded()); 1999 ASSERT_TRUE(WaitUntilOnEnded());
2006 source.Shutdown(); 2000 source.Shutdown();
2007 Stop(); 2001 Stop();
2008 } 2002 }
2009 2003
2010 TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource_VideoOnly_MP4_VP9) { 2004 TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource_VideoOnly_MP4_VP9) {
2011 MockMediaSource source("bear-320x240-v_frag-vp9.mp4", kMP4VideoVP9, 2005 MockMediaSource source("bear-320x240-v_frag-vp9.mp4", kMP4VideoVP9,
2012 kAppendWholeFile); 2006 kAppendWholeFile);
2013 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
2014 switches::kEnableVp9InMp4)) {
2015 ASSERT_EQ(ChunkDemuxer::kNotSupported, source.AddId());
2016 return;
2017 }
2018
2019 EXPECT_EQ(PIPELINE_OK, StartPipelineWithMediaSource(&source)); 2007 EXPECT_EQ(PIPELINE_OK, StartPipelineWithMediaSource(&source));
2020 source.EndOfStream(); 2008 source.EndOfStream();
2021 ASSERT_EQ(PIPELINE_OK, pipeline_status_); 2009 ASSERT_EQ(PIPELINE_OK, pipeline_status_);
2022 2010
2023 Play(); 2011 Play();
2024 2012
2025 ASSERT_TRUE(WaitUntilOnEnded()); 2013 ASSERT_TRUE(WaitUntilOnEnded());
2026 source.Shutdown(); 2014 source.Shutdown();
2027 Stop(); 2015 Stop();
2028 } 2016 }
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
2358 2346
2359 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { 2347 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) {
2360 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); 2348 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm"));
2361 Play(); 2349 Play();
2362 ASSERT_TRUE(WaitUntilOnEnded()); 2350 ASSERT_TRUE(WaitUntilOnEnded());
2363 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), 2351 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000),
2364 demuxer_->GetStartTime()); 2352 demuxer_->GetStartTime());
2365 } 2353 }
2366 2354
2367 } // namespace media 2355 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/mp4/box_definitions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698