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

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

Issue 1257923002: content: Remove unused speex related code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rm more references Created 5 years, 4 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
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/speech/audio_encoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CONTENT_BROWSER_SPEECH_AUDIO_ENCODER_H_ 5 #ifndef CONTENT_BROWSER_SPEECH_AUDIO_ENCODER_H_
6 #define CONTENT_BROWSER_SPEECH_AUDIO_ENCODER_H_ 6 #define CONTENT_BROWSER_SPEECH_AUDIO_ENCODER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "content/browser/speech/audio_buffer.h" 13 #include "content/browser/speech/audio_buffer.h"
14 14
15 namespace content{ 15 namespace content{
16 class AudioChunk; 16 class AudioChunk;
17 17
18 // Provides a simple interface to encode raw audio using the various speech 18 // Provides a simple interface to encode raw audio using FLAC codec.
19 // codecs.
20 class AudioEncoder { 19 class AudioEncoder {
21 public: 20 public:
22 enum Codec { 21 static AudioEncoder* Create(int sampling_rate, int bits_per_sample);
23 CODEC_FLAC,
24 CODEC_SPEEX,
25 };
26
27 static AudioEncoder* Create(Codec codec,
28 int sampling_rate,
29 int bits_per_sample);
30 22
31 virtual ~AudioEncoder(); 23 virtual ~AudioEncoder();
32 24
33 // Encodes |raw audio| to the internal buffer. Use 25 // Encodes |raw audio| to the internal buffer. Use
34 // |GetEncodedDataAndClear| to read the result after this call or when 26 // |GetEncodedDataAndClear| to read the result after this call or when
35 // audio capture completes. 27 // audio capture completes.
36 virtual void Encode(const AudioChunk& raw_audio) = 0; 28 virtual void Encode(const AudioChunk& raw_audio) = 0;
37 29
38 // Finish encoding and flush any pending encoded bits out. 30 // Finish encoding and flush any pending encoded bits out.
39 virtual void Flush() = 0; 31 virtual void Flush() = 0;
(...skipping 11 matching lines...) Expand all
51 private: 43 private:
52 std::string mime_type_; 44 std::string mime_type_;
53 int bits_per_sample_; 45 int bits_per_sample_;
54 46
55 DISALLOW_COPY_AND_ASSIGN(AudioEncoder); 47 DISALLOW_COPY_AND_ASSIGN(AudioEncoder);
56 }; 48 };
57 49
58 } // namespace content 50 } // namespace content
59 51
60 #endif // CONTENT_BROWSER_SPEECH_AUDIO_ENCODER_H_ 52 #endif // CONTENT_BROWSER_SPEECH_AUDIO_ENCODER_H_
OLDNEW
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/speech/audio_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698