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

Side by Side Diff: content/browser/speech/audio_encoder.cc

Issue 9861019: Speech refactoring: Turned AudioChunk into a refcounted class (CL1.4) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed according to Hans review. Created 8 years, 8 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 "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
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
OLDNEW
« no previous file with comments | « content/browser/speech/audio_encoder.h ('k') | content/browser/speech/endpointer/endpointer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698