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 "media/filters/audio_file_reader.h" | 5 #include "media/filters/audio_file_reader.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/time.h" | 8 #include "base/time/time.h" |
9 #include "media/base/audio_bus.h" | 9 #include "media/base/audio_bus.h" |
10 #include "media/ffmpeg/ffmpeg_common.h" | 10 #include "media/ffmpeg/ffmpeg_common.h" |
11 #include "media/filters/ffmpeg_glue.h" | 11 #include "media/filters/ffmpeg_glue.h" |
12 | 12 |
13 namespace media { | 13 namespace media { |
14 | 14 |
15 AudioFileReader::AudioFileReader(FFmpegURLProtocol* protocol) | 15 AudioFileReader::AudioFileReader(FFmpegURLProtocol* protocol) |
16 : codec_context_(NULL), | 16 : codec_context_(NULL), |
17 stream_index_(0), | 17 stream_index_(0), |
18 protocol_(protocol), | 18 protocol_(protocol), |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 // Zero any remaining frames. | 236 // Zero any remaining frames. |
237 audio_bus->ZeroFramesPartial( | 237 audio_bus->ZeroFramesPartial( |
238 current_frame, audio_bus->frames() - current_frame); | 238 current_frame, audio_bus->frames() - current_frame); |
239 | 239 |
240 // Returns the actual number of sample-frames decoded. | 240 // Returns the actual number of sample-frames decoded. |
241 // Ideally this represents the "true" exact length of the file. | 241 // Ideally this represents the "true" exact length of the file. |
242 return current_frame; | 242 return current_frame; |
243 } | 243 } |
244 | 244 |
245 } // namespace media | 245 } // namespace media |
OLD | NEW |