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

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

Issue 10869085: Update FFmpegAudioDecoder to support multi-frame packets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Fix WebAudio. Created 8 years, 3 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
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 <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
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
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
OLDNEW
« media/filters/audio_file_reader.cc ('K') | « media/filters/ffmpeg_audio_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698