Chromium Code Reviews| 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 <deque> | 5 #include <deque> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "media/base/decoder_buffer.h" | 10 #include "media/base/decoder_buffer.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 139 Initialize(); | 139 Initialize(); |
| 140 | 140 |
| 141 // Vorbis requires N+1 packets to produce audio data for N packets. | 141 // Vorbis requires N+1 packets to produce audio data for N packets. |
| 142 // | 142 // |
| 143 // This will should result in the demuxer receiving three reads for two | 143 // This will should result in the demuxer receiving three reads for two |
| 144 // requests to produce audio samples. | 144 // requests to produce audio samples. |
| 145 EXPECT_CALL(*demuxer_, Read(_)) | 145 EXPECT_CALL(*demuxer_, Read(_)) |
| 146 .Times(5) | 146 .Times(5) |
| 147 .WillRepeatedly(InvokeReadPacket(this)); | 147 .WillRepeatedly(InvokeReadPacket(this)); |
| 148 EXPECT_CALL(statistics_cb_, OnStatistics(_)) | 148 EXPECT_CALL(statistics_cb_, OnStatistics(_)) |
| 149 .Times(5); | 149 .Times(4); |
|
DaleCurtis
2012/08/28 20:19:17
Patch removes the statistics callback for end of s
| |
| 150 | 150 |
| 151 Read(); | 151 Read(); |
| 152 Read(); | 152 Read(); |
| 153 Read(); | 153 Read(); |
| 154 | 154 |
| 155 ASSERT_EQ(3u, decoded_audio_.size()); | 155 ASSERT_EQ(3u, decoded_audio_.size()); |
| 156 ExpectDecodedAudio(0, 0, 2902); | 156 ExpectDecodedAudio(0, 0, 2902); |
| 157 ExpectDecodedAudio(1, 2902, 13061); | 157 ExpectDecodedAudio(1, 2902, 13061); |
| 158 ExpectDecodedAudio(2, 15963, 23220); | 158 ExpectDecodedAudio(2, 15963, 23220); |
| 159 | 159 |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 171 | 171 |
| 172 EXPECT_CALL(*demuxer_, Read(_)) | 172 EXPECT_CALL(*demuxer_, Read(_)) |
| 173 .WillOnce(InvokeReadPacket(this)); | 173 .WillOnce(InvokeReadPacket(this)); |
| 174 Read(); | 174 Read(); |
| 175 | 175 |
| 176 EXPECT_EQ(decoded_audio_.size(), 1u); | 176 EXPECT_EQ(decoded_audio_.size(), 1u); |
| 177 EXPECT_TRUE(decoded_audio_[0].get() == NULL); | 177 EXPECT_TRUE(decoded_audio_[0].get() == NULL); |
| 178 } | 178 } |
| 179 | 179 |
| 180 } // namespace media | 180 } // namespace media |
| OLD | NEW |