| OLD | NEW |
| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| (...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 902 | 902 |
| 903 EXPECT_HASH_EQ("f0be120a90a811506777c99a2cdf7cc1", GetVideoHash()); | 903 EXPECT_HASH_EQ("f0be120a90a811506777c99a2cdf7cc1", GetVideoHash()); |
| 904 EXPECT_HASH_EQ("-3.59,-2.06,-0.43,2.15,0.77,-0.95,", GetAudioHash()); | 904 EXPECT_HASH_EQ("-3.59,-2.06,-0.43,2.15,0.77,-0.95,", GetAudioHash()); |
| 905 | 905 |
| 906 // TODO: Fix FFmpeg code to return higher resolution time values so | 906 // TODO: Fix FFmpeg code to return higher resolution time values so |
| 907 // we don't have to truncate our expectations here. | 907 // we don't have to truncate our expectations here. |
| 908 EXPECT_EQ(TruncateToFFmpegTimeResolution(kLiveTimelineOffset()), | 908 EXPECT_EQ(TruncateToFFmpegTimeResolution(kLiveTimelineOffset()), |
| 909 demuxer_->GetTimelineOffset()); | 909 demuxer_->GetTimelineOffset()); |
| 910 } | 910 } |
| 911 | 911 |
| 912 TEST_F(PipelineIntegrationTest, S32PlaybackHashed) { |
| 913 ASSERT_EQ(PIPELINE_OK, Start("sfx_s32le.wav", kHashed)); |
| 914 Play(); |
| 915 ASSERT_TRUE(WaitUntilOnEnded()); |
| 916 EXPECT_HASH_EQ(std::string(kNullVideoHash), GetVideoHash()); |
| 917 EXPECT_HASH_EQ("3.03,2.86,2.99,3.31,3.57,4.06,", GetAudioHash()); |
| 918 } |
| 919 |
| 912 TEST_F(PipelineIntegrationTest, F32PlaybackHashed) { | 920 TEST_F(PipelineIntegrationTest, F32PlaybackHashed) { |
| 913 ASSERT_EQ(PIPELINE_OK, Start("sfx_f32le.wav", kHashed)); | 921 ASSERT_EQ(PIPELINE_OK, Start("sfx_f32le.wav", kHashed)); |
| 914 Play(); | 922 Play(); |
| 915 ASSERT_TRUE(WaitUntilOnEnded()); | 923 ASSERT_TRUE(WaitUntilOnEnded()); |
| 916 EXPECT_HASH_EQ(std::string(kNullVideoHash), GetVideoHash()); | 924 EXPECT_HASH_EQ(std::string(kNullVideoHash), GetVideoHash()); |
| 917 EXPECT_HASH_EQ("3.03,2.86,2.99,3.31,3.57,4.06,", GetAudioHash()); | 925 EXPECT_HASH_EQ("3.03,2.86,2.99,3.31,3.57,4.06,", GetAudioHash()); |
| 918 } | 926 } |
| 919 | 927 |
| 920 #if !defined(DISABLE_EME_TESTS) | 928 #if !defined(DISABLE_EME_TESTS) |
| 921 TEST_F(PipelineIntegrationTest, BasicPlaybackEncrypted) { | 929 TEST_F(PipelineIntegrationTest, BasicPlaybackEncrypted) { |
| (...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1834 | 1842 |
| 1835 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { | 1843 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { |
| 1836 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); | 1844 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); |
| 1837 Play(); | 1845 Play(); |
| 1838 ASSERT_TRUE(WaitUntilOnEnded()); | 1846 ASSERT_TRUE(WaitUntilOnEnded()); |
| 1839 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), | 1847 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), |
| 1840 demuxer_->GetStartTime()); | 1848 demuxer_->GetStartTime()); |
| 1841 } | 1849 } |
| 1842 | 1850 |
| 1843 } // namespace media | 1851 } // namespace media |
| OLD | NEW |