Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef REMOTING_CODEC_AUDIO_ENCODER_SPEEX_H_ | |
| 6 #define REMOTING_CODEC_AUDIO_ENCODER_SPEEX_H_ | |
| 7 | |
| 8 #include <list> | |
| 9 #include "base/basictypes.h" | |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "remoting/codec/audio_encoder.h" | |
| 12 | |
| 13 struct SpeexBits; | |
| 14 | |
| 15 namespace remoting { | |
| 16 | |
| 17 class AudioPacket; | |
| 18 | |
| 19 class AudioEncoderSpeex : public AudioEncoder { | |
| 20 public: | |
| 21 AudioEncoderSpeex(); | |
| 22 virtual ~AudioEncoderSpeex(); | |
| 23 | |
| 24 // AudioEncoder implementation. | |
| 25 virtual scoped_ptr<AudioPacket> Encode( | |
| 26 scoped_ptr<AudioPacket> packet) OVERRIDE; | |
| 27 | |
| 28 private: | |
| 29 scoped_ptr<SpeexBits> speex_bits_; | |
| 30 void* speex_state_; | |
| 31 int speex_frame_size_; | |
| 32 | |
| 33 std::list<int16> queued_samples_; | |
|
Sergey Ulanov
2012/08/14 00:54:32
ouch. can we use std::vector here? Or better scope
kxing
2012/08/16 13:57:54
Done.
| |
| 34 | |
| 35 scoped_array<int16> raw_data_buffer_; | |
| 36 scoped_array<char> encoded_data_buffer_; | |
| 37 | |
| 38 DISALLOW_COPY_AND_ASSIGN(AudioEncoderSpeex); | |
| 39 }; | |
| 40 | |
| 41 } // namespace remoting | |
| 42 | |
| 43 #endif // REMOTING_CODEC_AUDIO_ENCODER_SPEEX_H_ | |
| OLD | NEW |