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.
5 #ifndef REMOTING_CODEC_AUDIO_ENCODER_SPEEX_H_
6 #define REMOTING_CODEC_AUDIO_ENCODER_SPEEX_H_
9 #include "base/basictypes.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "remoting/codec/audio_encoder.h"
19 class AudioEncoderSpeex
: public AudioEncoder
{
22 virtual ~AudioEncoderSpeex();
24 // AudioEncoder implementation.
25 virtual scoped_ptr
<AudioPacket
> Encode(
26 scoped_ptr
<AudioPacket
> packet
) OVERRIDE
;
29 scoped_ptr
<SpeexBits
> speex_bits_
;
31 int speex_frame_size_
;
33 scoped_ptr
<int16
[]> leftover_buffer_
;
34 // We may have some left-over unencoded frames from the previous AudioPacket.
37 DISALLOW_COPY_AND_ASSIGN(AudioEncoderSpeex
);
40 } // namespace remoting
42 #endif // REMOTING_CODEC_AUDIO_ENCODER_SPEEX_H_