Changed webrtc::ACMCodecDB::neteq_decoders_ to a const array.

BUG=
TEST=

Review URL: http://webrtc-codereview.appspot.com/304003

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1092 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
perkj@webrtc.org 2011-12-02 12:48:19 +00:00
parent db221d2b81
commit 6b1bfd6c5e
7 changed files with 13 additions and 13 deletions

View File

@ -249,7 +249,7 @@ const ACMCodecDB::CodecSettings ACMCodecDB::codec_settings_[] = {
};
// Create a database of all NetEQ decoders at compile time.
WebRtcNetEQDecoder ACMCodecDB::neteq_decoders_[] = {
const WebRtcNetEQDecoder ACMCodecDB::neteq_decoders_[] = {
#if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX))
kDecoderISAC,
# if (defined(WEBRTC_CODEC_ISAC))
@ -538,7 +538,7 @@ int ACMCodecDB::BasicCodingBlock(int codec_id) {
}
// Returns the NetEQ decoder database.
WebRtcNetEQDecoder* ACMCodecDB::NetEQDecoders() {
const WebRtcNetEQDecoder* ACMCodecDB::NetEQDecoders() {
return neteq_decoders_;
}

View File

@ -230,7 +230,7 @@ class ACMCodecDB {
static int BasicCodingBlock(int codec_id);
// Returns the NetEQ decoder database.
static WebRtcNetEQDecoder* NetEQDecoders();
static const WebRtcNetEQDecoder* NetEQDecoders();
// All version numbers for the codecs in the database are listed in text.
// Input/Output:
@ -293,7 +293,7 @@ class ACMCodecDB {
// neteq_decoders_ - list of supported decoders in NetEQ.
static const CodecInst database_[kMaxNumCodecs];
static const CodecSettings codec_settings_[kMaxNumCodecs];
static WebRtcNetEQDecoder neteq_decoders_[kMaxNumCodecs];
static const WebRtcNetEQDecoder neteq_decoders_[kMaxNumCodecs];
};
} // namespace webrtc

View File

@ -243,7 +243,7 @@ ACMNetEQ::EnableVADByIdxSafe(
WebRtc_Word32
ACMNetEQ::AllocatePacketBuffer(
WebRtcNetEQDecoder* usedCodecs,
const WebRtcNetEQDecoder* usedCodecs,
WebRtc_Word16 noOfCodecs)
{
// Due to WebRtcNetEQ_GetRecommendedBufferSize
@ -263,7 +263,7 @@ ACMNetEQ::AllocatePacketBuffer(
WebRtc_Word16
ACMNetEQ::AllocatePacketBufferByIdxSafe(
WebRtcNetEQDecoder* usedCodecs,
const WebRtcNetEQDecoder* usedCodecs,
WebRtc_Word16 noOfCodecs,
const WebRtc_Word16 idx)
{
@ -1107,7 +1107,7 @@ ACMNetEQ::PlayoutTimestamp(
WebRtc_Word16
ACMNetEQ::AddSlave(
WebRtcNetEQDecoder* usedCodecs,
const WebRtcNetEQDecoder* usedCodecs,
WebRtc_Word16 noOfCodecs)
{
CriticalSectionScoped lock(*_netEqCritSect);

View File

@ -132,7 +132,7 @@ public:
// <0 if NetEQ returned an error.
//
WebRtc_Word32 AllocatePacketBuffer(
WebRtcNetEQDecoder* usedCodecs,
const WebRtcNetEQDecoder* usedCodecs,
WebRtc_Word16 noOfCodecs);
//
@ -306,7 +306,7 @@ public:
enum JB {masterJB = 0, slaveJB = 1};
WebRtc_Word16 AddSlave(
WebRtcNetEQDecoder* usedCodecs,
const WebRtcNetEQDecoder* usedCodecs,
WebRtc_Word16 noOfCodecs);
private:
@ -348,7 +348,7 @@ private:
const WebRtc_Word16 idx);
WebRtc_Word16 AllocatePacketBufferByIdxSafe(
WebRtcNetEQDecoder* usedCodecs,
const WebRtcNetEQDecoder* usedCodecs,
WebRtc_Word16 noOfCodecs,
const WebRtc_Word16 idx);

View File

@ -2561,7 +2561,7 @@ WebRtc_Word32
AudioCodingModuleImpl::UnregisterReceiveCodecSafe(
const WebRtc_Word16 codecID)
{
WebRtcNetEQDecoder *neteqDecoder = ACMCodecDB::NetEQDecoders();
const WebRtcNetEQDecoder *neteqDecoder = ACMCodecDB::NetEQDecoders();
WebRtc_Word16 mirrorID = ACMCodecDB::MirrorID(codecID);
if(_codecs[codecID] != NULL)
{

View File

@ -163,7 +163,7 @@ int WebRtcNetEQ_GetErrorName(int errorCode, WebRtc_Word8 *errorName, int maxStrL
int WebRtcNetEQ_AssignSize(int *sizeinbytes);
int WebRtcNetEQ_Assign(void **inst, void *NETEQ_inst_Addr);
int WebRtcNetEQ_GetRecommendedBufferSize(void *inst, enum WebRtcNetEQDecoder *codec,
int WebRtcNetEQ_GetRecommendedBufferSize(void *inst, const enum WebRtcNetEQDecoder *codec,
int noOfCodecs, enum WebRtcNetEQNetworkType nwType,
int *MaxNoOfPackets, int *sizeinbytes);
int WebRtcNetEQ_AssignBuffer(void *inst, int MaxNoOfPackets, void *NETEQ_Buffer_Addr,

View File

@ -314,7 +314,7 @@ int WebRtcNetEQ_Assign(void **inst, void *NETEQ_inst_Addr)
return (0);
}
int WebRtcNetEQ_GetRecommendedBufferSize(void *inst, enum WebRtcNetEQDecoder *codec,
int WebRtcNetEQ_GetRecommendedBufferSize(void *inst, const enum WebRtcNetEQDecoder *codec,
int noOfCodecs, enum WebRtcNetEQNetworkType nwType,
int *MaxNoOfPackets, int *sizeinbytes)
{