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

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

Issue 2710133003: Replace FFmpegDemuxer thread per element with base::TaskScheduler. (Closed)
Patch Set: Fix chromecast build. Created 3 years, 10 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
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 1704 matching lines...) Expand 10 before | Expand all | Expand 10 after
1715 // but the numerator will be truncated in the TOC as 250, losing precision. 1715 // but the numerator will be truncated in the TOC as 250, losing precision.
1716 base::TimeDelta seek_time(0.98 * pipeline_->GetMediaDuration()); 1716 base::TimeDelta seek_time(0.98 * pipeline_->GetMediaDuration());
1717 1717
1718 ASSERT_TRUE(Seek(seek_time)); 1718 ASSERT_TRUE(Seek(seek_time));
1719 Play(); 1719 Play();
1720 ASSERT_TRUE(WaitUntilOnEnded()); 1720 ASSERT_TRUE(WaitUntilOnEnded());
1721 1721
1722 EXPECT_HASH_EQ(config.hash, GetAudioHash()); 1722 EXPECT_HASH_EQ(config.hash, GetAudioHash());
1723 } 1723 }
1724 1724
1725 // TODO(CHCUNNINGHAM): Re-enable for OSX once 1% flakiness is root caused.
1726 // See http://crbug.com/571898
1727 #if !defined(OS_MACOSX)
1728 // CBR seeks should always be fast and accurate. 1725 // CBR seeks should always be fast and accurate.
1729 INSTANTIATE_TEST_CASE_P( 1726 INSTANTIATE_TEST_CASE_P(
1730 CBRSeek_HasTOC, 1727 CBRSeek_HasTOC,
1731 Mp3FastSeekIntegrationTest, 1728 Mp3FastSeekIntegrationTest,
1732 ::testing::Values(Mp3FastSeekParams("bear-audio-10s-CBR-has-TOC.mp3", 1729 ::testing::Values(Mp3FastSeekParams("bear-audio-10s-CBR-has-TOC.mp3",
1733 "-0.71,0.36,2.96,2.68,2.10,-1.08,"))); 1730 "-0.71,0.36,2.96,2.68,2.11,-1.08,")));
1734 #endif
1735 1731
1736 INSTANTIATE_TEST_CASE_P( 1732 INSTANTIATE_TEST_CASE_P(
1737 CBRSeeks_NoTOC, 1733 CBRSeeks_NoTOC,
1738 Mp3FastSeekIntegrationTest, 1734 Mp3FastSeekIntegrationTest,
1739 ::testing::Values(Mp3FastSeekParams("bear-audio-10s-CBR-no-TOC.mp3", 1735 ::testing::Values(Mp3FastSeekParams("bear-audio-10s-CBR-no-TOC.mp3",
1740 "0.95,0.56,1.34,0.47,1.77,0.84,"))); 1736 "0.95,0.56,1.34,0.47,1.77,0.84,")));
1741 1737
1742 // VBR seeks can be fast *OR* accurate, but not both. We chose fast. 1738 // VBR seeks can be fast *OR* accurate, but not both. We chose fast.
1743 INSTANTIATE_TEST_CASE_P( 1739 INSTANTIATE_TEST_CASE_P(
1744 VBRSeeks_HasTOC, 1740 VBRSeeks_HasTOC,
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
2574 2570
2575 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { 2571 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) {
2576 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); 2572 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm"));
2577 Play(); 2573 Play();
2578 ASSERT_TRUE(WaitUntilOnEnded()); 2574 ASSERT_TRUE(WaitUntilOnEnded());
2579 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), 2575 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000),
2580 demuxer_->GetStartTime()); 2576 demuxer_->GetStartTime());
2581 } 2577 }
2582 2578
2583 } // namespace media 2579 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698