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:
@@ -249,7 +249,7 @@ const ACMCodecDB::CodecSettings ACMCodecDB::codec_settings_[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Create a database of all NetEQ decoders at compile time.
|
// 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))
|
#if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX))
|
||||||
kDecoderISAC,
|
kDecoderISAC,
|
||||||
# if (defined(WEBRTC_CODEC_ISAC))
|
# if (defined(WEBRTC_CODEC_ISAC))
|
||||||
@@ -538,7 +538,7 @@ int ACMCodecDB::BasicCodingBlock(int codec_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Returns the NetEQ decoder database.
|
// Returns the NetEQ decoder database.
|
||||||
WebRtcNetEQDecoder* ACMCodecDB::NetEQDecoders() {
|
const WebRtcNetEQDecoder* ACMCodecDB::NetEQDecoders() {
|
||||||
return neteq_decoders_;
|
return neteq_decoders_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ class ACMCodecDB {
|
|||||||
static int BasicCodingBlock(int codec_id);
|
static int BasicCodingBlock(int codec_id);
|
||||||
|
|
||||||
// Returns the NetEQ decoder database.
|
// 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.
|
// All version numbers for the codecs in the database are listed in text.
|
||||||
// Input/Output:
|
// Input/Output:
|
||||||
@@ -293,7 +293,7 @@ class ACMCodecDB {
|
|||||||
// neteq_decoders_ - list of supported decoders in NetEQ.
|
// neteq_decoders_ - list of supported decoders in NetEQ.
|
||||||
static const CodecInst database_[kMaxNumCodecs];
|
static const CodecInst database_[kMaxNumCodecs];
|
||||||
static const CodecSettings codec_settings_[kMaxNumCodecs];
|
static const CodecSettings codec_settings_[kMaxNumCodecs];
|
||||||
static WebRtcNetEQDecoder neteq_decoders_[kMaxNumCodecs];
|
static const WebRtcNetEQDecoder neteq_decoders_[kMaxNumCodecs];
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ ACMNetEQ::EnableVADByIdxSafe(
|
|||||||
|
|
||||||
WebRtc_Word32
|
WebRtc_Word32
|
||||||
ACMNetEQ::AllocatePacketBuffer(
|
ACMNetEQ::AllocatePacketBuffer(
|
||||||
WebRtcNetEQDecoder* usedCodecs,
|
const WebRtcNetEQDecoder* usedCodecs,
|
||||||
WebRtc_Word16 noOfCodecs)
|
WebRtc_Word16 noOfCodecs)
|
||||||
{
|
{
|
||||||
// Due to WebRtcNetEQ_GetRecommendedBufferSize
|
// Due to WebRtcNetEQ_GetRecommendedBufferSize
|
||||||
@@ -263,7 +263,7 @@ ACMNetEQ::AllocatePacketBuffer(
|
|||||||
|
|
||||||
WebRtc_Word16
|
WebRtc_Word16
|
||||||
ACMNetEQ::AllocatePacketBufferByIdxSafe(
|
ACMNetEQ::AllocatePacketBufferByIdxSafe(
|
||||||
WebRtcNetEQDecoder* usedCodecs,
|
const WebRtcNetEQDecoder* usedCodecs,
|
||||||
WebRtc_Word16 noOfCodecs,
|
WebRtc_Word16 noOfCodecs,
|
||||||
const WebRtc_Word16 idx)
|
const WebRtc_Word16 idx)
|
||||||
{
|
{
|
||||||
@@ -1107,7 +1107,7 @@ ACMNetEQ::PlayoutTimestamp(
|
|||||||
|
|
||||||
WebRtc_Word16
|
WebRtc_Word16
|
||||||
ACMNetEQ::AddSlave(
|
ACMNetEQ::AddSlave(
|
||||||
WebRtcNetEQDecoder* usedCodecs,
|
const WebRtcNetEQDecoder* usedCodecs,
|
||||||
WebRtc_Word16 noOfCodecs)
|
WebRtc_Word16 noOfCodecs)
|
||||||
{
|
{
|
||||||
CriticalSectionScoped lock(*_netEqCritSect);
|
CriticalSectionScoped lock(*_netEqCritSect);
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ public:
|
|||||||
// <0 if NetEQ returned an error.
|
// <0 if NetEQ returned an error.
|
||||||
//
|
//
|
||||||
WebRtc_Word32 AllocatePacketBuffer(
|
WebRtc_Word32 AllocatePacketBuffer(
|
||||||
WebRtcNetEQDecoder* usedCodecs,
|
const WebRtcNetEQDecoder* usedCodecs,
|
||||||
WebRtc_Word16 noOfCodecs);
|
WebRtc_Word16 noOfCodecs);
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -306,7 +306,7 @@ public:
|
|||||||
enum JB {masterJB = 0, slaveJB = 1};
|
enum JB {masterJB = 0, slaveJB = 1};
|
||||||
|
|
||||||
WebRtc_Word16 AddSlave(
|
WebRtc_Word16 AddSlave(
|
||||||
WebRtcNetEQDecoder* usedCodecs,
|
const WebRtcNetEQDecoder* usedCodecs,
|
||||||
WebRtc_Word16 noOfCodecs);
|
WebRtc_Word16 noOfCodecs);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -348,7 +348,7 @@ private:
|
|||||||
const WebRtc_Word16 idx);
|
const WebRtc_Word16 idx);
|
||||||
|
|
||||||
WebRtc_Word16 AllocatePacketBufferByIdxSafe(
|
WebRtc_Word16 AllocatePacketBufferByIdxSafe(
|
||||||
WebRtcNetEQDecoder* usedCodecs,
|
const WebRtcNetEQDecoder* usedCodecs,
|
||||||
WebRtc_Word16 noOfCodecs,
|
WebRtc_Word16 noOfCodecs,
|
||||||
const WebRtc_Word16 idx);
|
const WebRtc_Word16 idx);
|
||||||
|
|
||||||
|
|||||||
@@ -2561,7 +2561,7 @@ WebRtc_Word32
|
|||||||
AudioCodingModuleImpl::UnregisterReceiveCodecSafe(
|
AudioCodingModuleImpl::UnregisterReceiveCodecSafe(
|
||||||
const WebRtc_Word16 codecID)
|
const WebRtc_Word16 codecID)
|
||||||
{
|
{
|
||||||
WebRtcNetEQDecoder *neteqDecoder = ACMCodecDB::NetEQDecoders();
|
const WebRtcNetEQDecoder *neteqDecoder = ACMCodecDB::NetEQDecoders();
|
||||||
WebRtc_Word16 mirrorID = ACMCodecDB::MirrorID(codecID);
|
WebRtc_Word16 mirrorID = ACMCodecDB::MirrorID(codecID);
|
||||||
if(_codecs[codecID] != NULL)
|
if(_codecs[codecID] != NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ int WebRtcNetEQ_GetErrorName(int errorCode, WebRtc_Word8 *errorName, int maxStrL
|
|||||||
|
|
||||||
int WebRtcNetEQ_AssignSize(int *sizeinbytes);
|
int WebRtcNetEQ_AssignSize(int *sizeinbytes);
|
||||||
int WebRtcNetEQ_Assign(void **inst, void *NETEQ_inst_Addr);
|
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 noOfCodecs, enum WebRtcNetEQNetworkType nwType,
|
||||||
int *MaxNoOfPackets, int *sizeinbytes);
|
int *MaxNoOfPackets, int *sizeinbytes);
|
||||||
int WebRtcNetEQ_AssignBuffer(void *inst, int MaxNoOfPackets, void *NETEQ_Buffer_Addr,
|
int WebRtcNetEQ_AssignBuffer(void *inst, int MaxNoOfPackets, void *NETEQ_Buffer_Addr,
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ int WebRtcNetEQ_Assign(void **inst, void *NETEQ_inst_Addr)
|
|||||||
return (0);
|
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 noOfCodecs, enum WebRtcNetEQNetworkType nwType,
|
||||||
int *MaxNoOfPackets, int *sizeinbytes)
|
int *MaxNoOfPackets, int *sizeinbytes)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user