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

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

Issue 2435603009: Use ffmpeg for opus decoding, no need to maintain our decoder. (Closed)
Patch Set: Rebase. Created 4 years, 1 month 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 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 1594
1595 Play(); 1595 Play();
1596 EXPECT_TRUE(WaitUntilOnEnded()); 1596 EXPECT_TRUE(WaitUntilOnEnded());
1597 1597
1598 EXPECT_EQ(592, source.last_timestamp_offset().InMilliseconds()); 1598 EXPECT_EQ(592, source.last_timestamp_offset().InMilliseconds());
1599 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); 1599 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
1600 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); 1600 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
1601 EXPECT_EQ(592, pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); 1601 EXPECT_EQ(592, pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
1602 1602
1603 // Verify preroll is stripped. 1603 // Verify preroll is stripped.
1604 EXPECT_HASH_EQ("-0.06,0.97,-0.90,-0.70,-0.53,-0.34,", GetAudioHash()); 1604 EXPECT_HASH_EQ("-0.25,0.67,0.04,0.14,-0.49,-0.41,", GetAudioHash());
1605 } 1605 }
1606 1606
1607 TEST_F(PipelineIntegrationTest, BasicPlaybackHashed_MP3) { 1607 TEST_F(PipelineIntegrationTest, BasicPlaybackHashed_MP3) {
1608 ASSERT_EQ(PIPELINE_OK, Start("sfx.mp3", kHashed)); 1608 ASSERT_EQ(PIPELINE_OK, Start("sfx.mp3", kHashed));
1609 1609
1610 Play(); 1610 Play();
1611 1611
1612 ASSERT_TRUE(WaitUntilOnEnded()); 1612 ASSERT_TRUE(WaitUntilOnEnded());
1613 1613
1614 // Verify codec delay and preroll are stripped. 1614 // Verify codec delay and preroll are stripped.
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
2508 2508
2509 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { 2509 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) {
2510 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); 2510 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm"));
2511 Play(); 2511 Play();
2512 ASSERT_TRUE(WaitUntilOnEnded()); 2512 ASSERT_TRUE(WaitUntilOnEnded());
2513 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), 2513 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000),
2514 demuxer_->GetStartTime()); 2514 demuxer_->GetStartTime());
2515 } 2515 }
2516 2516
2517 } // namespace media 2517 } // namespace media
OLDNEW
« no previous file with comments | « media/renderers/default_renderer_factory.cc ('k') | media/test/pipeline_integration_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698