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

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: Created 4 years, 2 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 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 1568
1569 Play(); 1569 Play();
1570 EXPECT_TRUE(WaitUntilOnEnded()); 1570 EXPECT_TRUE(WaitUntilOnEnded());
1571 1571
1572 EXPECT_EQ(592, source.last_timestamp_offset().InMilliseconds()); 1572 EXPECT_EQ(592, source.last_timestamp_offset().InMilliseconds());
1573 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); 1573 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
1574 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); 1574 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
1575 EXPECT_EQ(592, pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); 1575 EXPECT_EQ(592, pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
1576 1576
1577 // Verify preroll is stripped. 1577 // Verify preroll is stripped.
1578 EXPECT_HASH_EQ("-0.06,0.97,-0.90,-0.70,-0.53,-0.34,", GetAudioHash()); 1578 EXPECT_HASH_EQ("-0.25,0.67,0.04,0.14,-0.49,-0.41,", GetAudioHash());
wolenetz 2016/10/21 22:30:58 Why did this change? Is this related to Opus at al
1579 } 1579 }
1580 1580
1581 TEST_F(PipelineIntegrationTest, BasicPlaybackHashed_MP3) { 1581 TEST_F(PipelineIntegrationTest, BasicPlaybackHashed_MP3) {
1582 ASSERT_EQ(PIPELINE_OK, Start("sfx.mp3", kHashed)); 1582 ASSERT_EQ(PIPELINE_OK, Start("sfx.mp3", kHashed));
1583 1583
1584 Play(); 1584 Play();
1585 1585
1586 ASSERT_TRUE(WaitUntilOnEnded()); 1586 ASSERT_TRUE(WaitUntilOnEnded());
1587 1587
1588 // Verify codec delay and preroll are stripped. 1588 // Verify codec delay and preroll are stripped.
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
2478 2478
2479 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { 2479 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) {
2480 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); 2480 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm"));
2481 Play(); 2481 Play();
2482 ASSERT_TRUE(WaitUntilOnEnded()); 2482 ASSERT_TRUE(WaitUntilOnEnded());
2483 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), 2483 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000),
2484 demuxer_->GetStartTime()); 2484 demuxer_->GetStartTime());
2485 } 2485 }
2486 2486
2487 } // namespace media 2487 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698