Reland r8248 "Introduce ACMGenericCodecWrapper"

This effectively reverts r8249.

This new class inherits from ACMGenericCodec. The purpose is to wrap
AudioEncoder objects into an ACMGenericCodec interface. This is a
temporary construction that will be used during the ACM redesign work.

BUG=4228
COAUTHOR=kwiberg@webrtc.org
TBR=tina.legrand@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/38919004

Cr-Commit-Position: refs/heads/master@{#8255}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8255 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org
2015-02-05 18:29:39 +00:00
parent ec4521cdb4
commit f45c8ca88b
10 changed files with 941 additions and 39 deletions

View File

@ -14,7 +14,6 @@
#include <algorithm>
#include <vector>
#include "webrtc/base/checks.h"
#include "webrtc/typedefs.h"
namespace webrtc {
@ -63,14 +62,7 @@ class AudioEncoder {
size_t num_samples_per_channel,
size_t max_encoded_bytes,
uint8_t* encoded,
EncodedInfo* info) {
CHECK_EQ(num_samples_per_channel,
static_cast<size_t>(sample_rate_hz() / 100));
bool ret =
EncodeInternal(rtp_timestamp, audio, max_encoded_bytes, encoded, info);
CHECK_LE(info->encoded_bytes, max_encoded_bytes);
return ret;
}
EncodedInfo* info);
// Return the input sample rate in Hz and the number of input channels.
// These are constants set at instantiation time.