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

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

Issue 390543002: Always use 48kHz for OPUS decoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test all teh things. Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « media/ffmpeg/ffmpeg_common_unittest.cc ('k') | media/formats/webm/webm_audio_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "media/filters/pipeline_integration_test_base.h" 5 #include "media/filters/pipeline_integration_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after
1506 } 1506 }
1507 1507
1508 // Verify that videos with an odd frame size playback successfully. 1508 // Verify that videos with an odd frame size playback successfully.
1509 TEST_F(PipelineIntegrationTest, BasicPlayback_OddVideoSize) { 1509 TEST_F(PipelineIntegrationTest, BasicPlayback_OddVideoSize) {
1510 ASSERT_TRUE(Start(GetTestDataFilePath("butterfly-853x480.webm"), 1510 ASSERT_TRUE(Start(GetTestDataFilePath("butterfly-853x480.webm"),
1511 PIPELINE_OK)); 1511 PIPELINE_OK));
1512 Play(); 1512 Play();
1513 ASSERT_TRUE(WaitUntilOnEnded()); 1513 ASSERT_TRUE(WaitUntilOnEnded());
1514 } 1514 }
1515 1515
1516 // Verify that OPUS audio in a webm which reports a 44.1kHz sample rate plays
1517 // correctly at 48kHz
1518 TEST_F(PipelineIntegrationTest, BasicPlayback_Opus441kHz) {
1519 ASSERT_TRUE(Start(GetTestDataFilePath("sfx-opus-441.webm"), PIPELINE_OK));
1520 Play();
1521 ASSERT_TRUE(WaitUntilOnEnded());
1522 EXPECT_EQ(48000,
1523 demuxer_->GetStream(DemuxerStream::AUDIO)
1524 ->audio_decoder_config()
1525 .samples_per_second());
1526 }
1527
1528 // Same as above but using MediaSource.
1529 TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource_Opus441kHz) {
1530 MockMediaSource source(
1531 "sfx-opus-441.webm", kOpusAudioOnlyWebM, kAppendWholeFile);
1532 StartPipelineWithMediaSource(&source);
1533 source.EndOfStream();
1534 Play();
1535 ASSERT_TRUE(WaitUntilOnEnded());
1536 source.Abort();
1537 Stop();
1538 EXPECT_EQ(48000,
1539 demuxer_->GetStream(DemuxerStream::AUDIO)
1540 ->audio_decoder_config()
1541 .samples_per_second());
1542 }
1543
1516 } // namespace media 1544 } // namespace media
OLDNEW
« no previous file with comments | « media/ffmpeg/ffmpeg_common_unittest.cc ('k') | media/formats/webm/webm_audio_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698