| 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 "content/browser/speech/audio_encoder.h" | 5 #include "content/browser/speech/audio_encoder.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 184 |
| 185 AudioEncoder::AudioEncoder(const std::string& mime_type, int bits_per_sample) | 185 AudioEncoder::AudioEncoder(const std::string& mime_type, int bits_per_sample) |
| 186 : encoded_audio_buffer_(1), /* Byte granularity of encoded samples. */ | 186 : encoded_audio_buffer_(1), /* Byte granularity of encoded samples. */ |
| 187 mime_type_(mime_type), | 187 mime_type_(mime_type), |
| 188 bits_per_sample_(bits_per_sample) { | 188 bits_per_sample_(bits_per_sample) { |
| 189 } | 189 } |
| 190 | 190 |
| 191 AudioEncoder::~AudioEncoder() { | 191 AudioEncoder::~AudioEncoder() { |
| 192 } | 192 } |
| 193 | 193 |
| 194 scoped_ptr<AudioChunk> AudioEncoder::GetEncodedDataAndClear() { | 194 scoped_refptr<AudioChunk> AudioEncoder::GetEncodedDataAndClear() { |
| 195 return encoded_audio_buffer_.DequeueAll(); | 195 return encoded_audio_buffer_.DequeueAll(); |
| 196 } | 196 } |
| 197 | 197 |
| 198 } // namespace speech | 198 } // namespace speech |
| OLD | NEW |