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

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

Issue 2710133003: Replace FFmpegDemuxer thread per element with base::TaskScheduler. (Closed)
Patch Set: Comments. Fix flaky test. 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 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1724 // but the numerator will be truncated in the TOC as 250, losing precision. 1724 // but the numerator will be truncated in the TOC as 250, losing precision.
1725 base::TimeDelta seek_time(0.98 * pipeline_->GetMediaDuration()); 1725 base::TimeDelta seek_time(0.98 * pipeline_->GetMediaDuration());
1726 1726
1727 ASSERT_TRUE(Seek(seek_time)); 1727 ASSERT_TRUE(Seek(seek_time));
1728 Play(); 1728 Play();
1729 ASSERT_TRUE(WaitUntilOnEnded()); 1729 ASSERT_TRUE(WaitUntilOnEnded());
1730 1730
1731 EXPECT_HASH_EQ(config.hash, GetAudioHash()); 1731 EXPECT_HASH_EQ(config.hash, GetAudioHash());
1732 } 1732 }
1733 1733
1734 // TODO(CHCUNNINGHAM): Re-enable for OSX once 1% flakiness is root caused.
1735 // See http://crbug.com/571898
1736 #if !defined(OS_MACOSX)
1737 // CBR seeks should always be fast and accurate. 1734 // CBR seeks should always be fast and accurate.
1738 INSTANTIATE_TEST_CASE_P( 1735 INSTANTIATE_TEST_CASE_P(
1739 CBRSeek_HasTOC, 1736 CBRSeek_HasTOC,
1740 Mp3FastSeekIntegrationTest, 1737 Mp3FastSeekIntegrationTest,
1741 ::testing::Values(Mp3FastSeekParams("bear-audio-10s-CBR-has-TOC.mp3", 1738 ::testing::Values(Mp3FastSeekParams("bear-audio-10s-CBR-has-TOC.mp3",
1742 "-0.71,0.36,2.96,2.68,2.10,-1.08,"))); 1739 "-0.71,0.36,2.96,2.68,2.11,-1.08,")));
1743 #endif
1744 1740
1745 INSTANTIATE_TEST_CASE_P( 1741 INSTANTIATE_TEST_CASE_P(
1746 CBRSeeks_NoTOC, 1742 CBRSeeks_NoTOC,
1747 Mp3FastSeekIntegrationTest, 1743 Mp3FastSeekIntegrationTest,
1748 ::testing::Values(Mp3FastSeekParams("bear-audio-10s-CBR-no-TOC.mp3", 1744 ::testing::Values(Mp3FastSeekParams("bear-audio-10s-CBR-no-TOC.mp3",
1749 "0.95,0.56,1.34,0.47,1.77,0.84,"))); 1745 "0.95,0.56,1.34,0.47,1.77,0.84,")));
1750 1746
1751 // VBR seeks can be fast *OR* accurate, but not both. We chose fast. 1747 // VBR seeks can be fast *OR* accurate, but not both. We chose fast.
1752 INSTANTIATE_TEST_CASE_P( 1748 INSTANTIATE_TEST_CASE_P(
1753 VBRSeeks_HasTOC, 1749 VBRSeeks_HasTOC,
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
2583 2579
2584 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { 2580 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) {
2585 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); 2581 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm"));
2586 Play(); 2582 Play();
2587 ASSERT_TRUE(WaitUntilOnEnded()); 2583 ASSERT_TRUE(WaitUntilOnEnded());
2588 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), 2584 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000),
2589 demuxer_->GetStartTime()); 2585 demuxer_->GetStartTime());
2590 } 2586 }
2591 2587
2592 } // namespace media 2588 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698