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" |
11 #include "base/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
12 #include "content/browser/speech/audio_buffer.h" | 12 #include "content/browser/speech/audio_buffer.h" |
13 #include "third_party/flac/include/FLAC/stream_encoder.h" | 13 #include "third_party/flac/include/FLAC/stream_encoder.h" |
14 #include "third_party/speex/include/speex/speex.h" | 14 #include "third_party/speex/include/speex/speex.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 namespace { | 17 namespace { |
18 | 18 |
19 //-------------------------------- FLACEncoder --------------------------------- | 19 //-------------------------------- FLACEncoder --------------------------------- |
20 | 20 |
21 const char* const kContentTypeFLAC = "audio/x-flac; rate="; | 21 const char* const kContentTypeFLAC = "audio/x-flac; rate="; |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 } | 185 } |
186 | 186 |
187 AudioEncoder::~AudioEncoder() { | 187 AudioEncoder::~AudioEncoder() { |
188 } | 188 } |
189 | 189 |
190 scoped_refptr<AudioChunk> AudioEncoder::GetEncodedDataAndClear() { | 190 scoped_refptr<AudioChunk> AudioEncoder::GetEncodedDataAndClear() { |
191 return encoded_audio_buffer_.DequeueAll(); | 191 return encoded_audio_buffer_.DequeueAll(); |
192 } | 192 } |
193 | 193 |
194 } // namespace content | 194 } // namespace content |
OLD | NEW |