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

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

Issue 2710133003: Replace FFmpegDemuxer thread per element with base::TaskScheduler. (Closed)
Patch Set: Give WeakPtr to URLProtocol. Created 3 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 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 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 // but the numerator will be truncated in the TOC as 250, losing precision. 1761 // but the numerator will be truncated in the TOC as 250, losing precision.
1762 base::TimeDelta seek_time(0.98 * pipeline_->GetMediaDuration()); 1762 base::TimeDelta seek_time(0.98 * pipeline_->GetMediaDuration());
1763 1763
1764 ASSERT_TRUE(Seek(seek_time)); 1764 ASSERT_TRUE(Seek(seek_time));
1765 Play(); 1765 Play();
1766 ASSERT_TRUE(WaitUntilOnEnded()); 1766 ASSERT_TRUE(WaitUntilOnEnded());
1767 1767
1768 EXPECT_HASH_EQ(config.hash, GetAudioHash()); 1768 EXPECT_HASH_EQ(config.hash, GetAudioHash());
1769 } 1769 }
1770 1770
1771 // TODO(CHCUNNINGHAM): Re-enable for OSX once 1% flakiness is root caused.
1772 // See http://crbug.com/571898
1773 #if !defined(OS_MACOSX)
1774 // CBR seeks should always be fast and accurate. 1771 // CBR seeks should always be fast and accurate.
1775 INSTANTIATE_TEST_CASE_P( 1772 INSTANTIATE_TEST_CASE_P(
1776 CBRSeek_HasTOC, 1773 CBRSeek_HasTOC,
1777 Mp3FastSeekIntegrationTest, 1774 Mp3FastSeekIntegrationTest,
1778 ::testing::Values(Mp3FastSeekParams("bear-audio-10s-CBR-has-TOC.mp3", 1775 ::testing::Values(Mp3FastSeekParams("bear-audio-10s-CBR-has-TOC.mp3",
1779 "-0.71,0.36,2.96,2.68,2.10,-1.08,"))); 1776 "-0.71,0.36,2.96,2.68,2.11,-1.08,")));
1780 #endif
1781 1777
1782 INSTANTIATE_TEST_CASE_P( 1778 INSTANTIATE_TEST_CASE_P(
1783 CBRSeeks_NoTOC, 1779 CBRSeeks_NoTOC,
1784 Mp3FastSeekIntegrationTest, 1780 Mp3FastSeekIntegrationTest,
1785 ::testing::Values(Mp3FastSeekParams("bear-audio-10s-CBR-no-TOC.mp3", 1781 ::testing::Values(Mp3FastSeekParams("bear-audio-10s-CBR-no-TOC.mp3",
1786 "0.95,0.56,1.34,0.47,1.77,0.84,"))); 1782 "0.95,0.56,1.34,0.47,1.77,0.84,")));
1787 1783
1788 // VBR seeks can be fast *OR* accurate, but not both. We chose fast. 1784 // VBR seeks can be fast *OR* accurate, but not both. We chose fast.
1789 INSTANTIATE_TEST_CASE_P( 1785 INSTANTIATE_TEST_CASE_P(
1790 VBRSeeks_HasTOC, 1786 VBRSeeks_HasTOC,
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
2620 2616
2621 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { 2617 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) {
2622 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); 2618 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm"));
2623 Play(); 2619 Play();
2624 ASSERT_TRUE(WaitUntilOnEnded()); 2620 ASSERT_TRUE(WaitUntilOnEnded());
2625 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), 2621 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000),
2626 demuxer_->GetStartTime()); 2622 demuxer_->GetStartTime());
2627 } 2623 }
2628 2624
2629 } // namespace media 2625 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698