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

Unified Diff: content/browser/speech/audio_encoder.cc

Issue 11347004: content/browser: Move speech code into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/speech/audio_encoder.cc
diff --git a/content/browser/speech/audio_encoder.cc b/content/browser/speech/audio_encoder.cc
index b98b94ffe1d427bb4405ea4087457c91174b1e71..8eade5ad247f68df1e78172086a434336e477486 100644
--- a/content/browser/speech/audio_encoder.cc
+++ b/content/browser/speech/audio_encoder.cc
@@ -13,9 +13,7 @@
#include "third_party/flac/flac.h"
#include "third_party/speex/speex.h"
-using std::string;
-using speech::AudioChunk;
-
+namespace content {
namespace {
//-------------------------------- FLACEncoder ---------------------------------
@@ -23,7 +21,7 @@ namespace {
const char* const kContentTypeFLAC = "audio/x-flac; rate=";
const int kFLACCompressionLevel = 0; // 0 for speed
-class FLACEncoder : public speech::AudioEncoder {
+class FLACEncoder : public AudioEncoder {
public:
FLACEncoder(int sampling_rate, int bits_per_sample);
virtual ~FLACEncoder();
@@ -112,7 +110,7 @@ const int kMaxSpeexFrameLength = 110; // (44kbps rate sampled at 32kHz).
// make sure it is within the byte range.
COMPILE_ASSERT(kMaxSpeexFrameLength <= 0xFF, invalidLength);
-class SpeexEncoder : public speech::AudioEncoder {
+class SpeexEncoder : public AudioEncoder {
public:
explicit SpeexEncoder(int sampling_rate, int bits_per_sample);
virtual ~SpeexEncoder();
@@ -172,8 +170,6 @@ void SpeexEncoder::Encode(const AudioChunk& raw_audio) {
} // namespace
-namespace speech {
-
AudioEncoder* AudioEncoder::Create(Codec codec,
int sampling_rate,
int bits_per_sample) {
@@ -195,4 +191,4 @@ scoped_refptr<AudioChunk> AudioEncoder::GetEncodedDataAndClear() {
return encoded_audio_buffer_.DequeueAll();
}
-} // namespace speech
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698