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

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

Issue 315593004: Merge 274068 "Always use the source channel layout with AudioBuf..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1985/src/
Patch Set: Created 6 years, 6 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/filters/audio_renderer_impl.cc ('k') | no next file » | 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 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 source.EndOfStream(); 886 source.EndOfStream();
887 887
888 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size()); 888 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
889 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds()); 889 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
890 EXPECT_EQ(313, pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds()); 890 EXPECT_EQ(313, pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
891 891
892 Play(); 892 Play();
893 893
894 EXPECT_TRUE(WaitUntilOnEnded()); 894 EXPECT_TRUE(WaitUntilOnEnded());
895 895
896 // Verify that codec delay was stripped, if it wasn't the hash would be: 896 // Verify that codec delay was stripped.
897 // "5.16,1.25,7.78,4.29,8.98,2.76," 897 EXPECT_EQ("1.01,2.71,4.18,4.32,3.04,1.12,", GetAudioHash());
898 EXPECT_EQ("5.81,2.71,8.97,4.32,7.83,1.12,", GetAudioHash());
899 } 898 }
900 899
901 TEST_P(PipelineIntegrationTest, MediaSource_MP3_TimestampOffset) { 900 TEST_P(PipelineIntegrationTest, MediaSource_MP3_TimestampOffset) {
902 MockMediaSource source("sfx.mp3", kMP3, kAppendWholeFile, GetParam()); 901 MockMediaSource source("sfx.mp3", kMP3, kAppendWholeFile, GetParam());
903 StartPipelineWithMediaSource(&source); 902 StartPipelineWithMediaSource(&source);
904 EXPECT_EQ(313, source.last_timestamp_offset().InMilliseconds()); 903 EXPECT_EQ(313, source.last_timestamp_offset().InMilliseconds());
905 904
906 // There are 576 silent frames at the start of this mp3. The second append 905 // There are 576 silent frames at the start of this mp3. The second append
907 // should trim them off. 906 // should trim them off.
908 const base::TimeDelta mp3_preroll_duration = 907 const base::TimeDelta mp3_preroll_duration =
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 } 1316 }
1318 1317
1319 // For MediaSource tests, generate two sets of tests: one using FrameProcessor, 1318 // For MediaSource tests, generate two sets of tests: one using FrameProcessor,
1320 // and one using LegacyFrameProcessor. 1319 // and one using LegacyFrameProcessor.
1321 INSTANTIATE_TEST_CASE_P(NewFrameProcessor, PipelineIntegrationTest, 1320 INSTANTIATE_TEST_CASE_P(NewFrameProcessor, PipelineIntegrationTest,
1322 Values(false)); 1321 Values(false));
1323 INSTANTIATE_TEST_CASE_P(LegacyFrameProcessor, PipelineIntegrationTest, 1322 INSTANTIATE_TEST_CASE_P(LegacyFrameProcessor, PipelineIntegrationTest,
1324 Values(true)); 1323 Values(true));
1325 1324
1326 } // namespace media 1325 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/audio_renderer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698