Simple cleanups of AudioDecoder and AudioEncoder classes

* Make sure they're all final and don't allow copying or assignment.

  * Get rid of the single-channel PCM decoder classes.

  * Move some includes from .h to .cc files where possible.

BUG=webrtc:4557

Review URL: https://codereview.webrtc.org/1353803002

Cr-Commit-Position: refs/heads/master@{#10021}
This commit is contained in:
kwiberg
2015-09-22 14:06:29 -07:00
committed by Commit bot
parent c1a1b353ec
commit 8967183bf7
21 changed files with 74 additions and 97 deletions

View File

@ -16,7 +16,7 @@
namespace webrtc {
class AudioDecoderOpus : public AudioDecoder {
class AudioDecoderOpus final : public AudioDecoder {
public:
explicit AudioDecoderOpus(size_t num_channels);
~AudioDecoderOpus() override;

View File

@ -13,8 +13,7 @@
#include <vector>
#include "webrtc/base/checks.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/constructormagic.h"
#include "webrtc/modules/audio_coding/codecs/opus/interface/opus_interface.h"
#include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
@ -95,7 +94,9 @@ class AudioEncoderOpus final : public AudioEncoder {
std::vector<int16_t> input_buffer_;
OpusEncInst* inst_;
uint32_t first_timestamp_in_buffer_;
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderOpus);
};
} // namespace webrtc
#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_INTERFACE_AUDIO_ENCODER_OPUS_H_