Chromium Code Reviews| Index: remoting/codec/audio_encoder_speex.h |
| diff --git a/remoting/codec/audio_encoder_speex.h b/remoting/codec/audio_encoder_speex.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7b40e1b34983d5e1115e610b3aa85c71122efc57 |
| --- /dev/null |
| +++ b/remoting/codec/audio_encoder_speex.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef REMOTING_CODEC_AUDIO_ENCODER_SPEEX_H_ |
| +#define REMOTING_CODEC_AUDIO_ENCODER_SPEEX_H_ |
| + |
| +#include <list> |
| +#include "base/basictypes.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "remoting/codec/audio_encoder.h" |
| + |
| +struct SpeexBits; |
| + |
| +namespace remoting { |
| + |
| +class AudioPacket; |
| + |
| +class AudioEncoderSpeex : public AudioEncoder { |
| + public: |
| + AudioEncoderSpeex(); |
| + virtual ~AudioEncoderSpeex(); |
| + |
| + // AudioEncoder implementation. |
| + virtual scoped_ptr<AudioPacket> Encode( |
| + scoped_ptr<AudioPacket> packet) OVERRIDE; |
| + |
| + private: |
| + scoped_ptr<SpeexBits> speex_bits_; |
| + void* speex_state_; |
| + int speex_frame_size_; |
| + |
| + scoped_array<int16> raw_data_buffer_; |
|
Wez
2012/08/21 01:14:13
This buffer is just used to store "left-over" samp
kxing
2012/08/21 16:56:11
Done.
|
| + // We may have some left-over samples from the previous AudioPacket. |
| + int leftover_samples_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AudioEncoderSpeex); |
| +}; |
| + |
| +} // namespace remoting |
| + |
| +#endif // REMOTING_CODEC_AUDIO_ENCODER_SPEEX_H_ |