Change WebRtc_Word8 to char
Review URL: https://webrtc-codereview.appspot.com/407003 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1787 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
50219cd393
commit
91b359ea9b
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -51,7 +51,7 @@ typedef struct WebRtcCngDecInst CNG_dec_inst;
|
||||
* -1 - Error
|
||||
*/
|
||||
|
||||
WebRtc_Word16 WebRtcCng_Version(WebRtc_Word8 *version);
|
||||
WebRtc_Word16 WebRtcCng_Version(char *version);
|
||||
|
||||
/****************************************************************************
|
||||
* WebRtcCng_AssignSizeEnc/Dec(...)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
|
||||
typedef struct WebRtcCngDecInst_t_ {
|
||||
|
||||
|
||||
WebRtc_UWord32 dec_seed;
|
||||
WebRtc_Word32 dec_target_energy;
|
||||
WebRtc_Word32 dec_used_energy;
|
||||
@ -90,9 +90,9 @@ const WebRtc_Word16 WebRtcCng_kCorrWindow[WEBRTC_CNG_MAX_LPC_ORDER] = {
|
||||
*
|
||||
* Return value : 0 - Ok
|
||||
* -1 - Error
|
||||
*/
|
||||
*/
|
||||
|
||||
WebRtc_Word16 WebRtcCng_Version(WebRtc_Word8 *version)
|
||||
WebRtc_Word16 WebRtcCng_Version(char *version)
|
||||
{
|
||||
strcpy((char*)version,(const char*)"1.2.0\n");
|
||||
return(0);
|
||||
@ -201,7 +201,7 @@ WebRtc_Word16 WebRtcCng_CreateDec(CNG_dec_inst **cng_inst)
|
||||
}
|
||||
else {
|
||||
/* The memory could not be allocated */
|
||||
return(-1);
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -234,7 +234,7 @@ WebRtc_Word16 WebRtcCng_InitEnc(CNG_enc_inst *cng_inst,
|
||||
int i;
|
||||
|
||||
WebRtcCngEncInst_t* inst=(WebRtcCngEncInst_t*)cng_inst;
|
||||
|
||||
|
||||
memset(inst, 0, sizeof(WebRtcCngEncInst_t));
|
||||
|
||||
/* Check LPC order */
|
||||
@ -248,7 +248,7 @@ WebRtc_Word16 WebRtcCng_InitEnc(CNG_enc_inst *cng_inst,
|
||||
inst->errorcode = CNG_DISALLOWED_SAMPLING_FREQUENCY;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
|
||||
inst->enc_sampfreq=fs;
|
||||
inst->enc_interval=interval;
|
||||
inst->enc_nrOfCoefs=quality;
|
||||
@ -287,7 +287,7 @@ WebRtc_Word16 WebRtcCng_InitDec(CNG_dec_inst *cng_inst)
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* WebRtcCng_FreeEnc/Dec(...)
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -249,7 +249,7 @@ WebRtc_Word16 WebRtcIlbcfix_NetEqPlc(iLBC_decinst_t *iLBCdec_inst, WebRtc_Word16
|
||||
return (0);
|
||||
}
|
||||
|
||||
void WebRtcIlbcfix_version(WebRtc_Word8 *version)
|
||||
void WebRtcIlbcfix_version(char *version)
|
||||
{
|
||||
strcpy((char*)version, "1.1.1");
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -250,11 +250,10 @@ extern "C" {
|
||||
* - version : Version number of iLBC (maximum 20 char)
|
||||
*/
|
||||
|
||||
void WebRtcIlbcfix_version(WebRtc_Word8 *version);
|
||||
void WebRtcIlbcfix_version(char *version);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -124,7 +124,7 @@ class AudioCodingModule: public Module {
|
||||
// -1 if the list number (listId) is invalid.
|
||||
// 0 if succeeded.
|
||||
//
|
||||
static WebRtc_Word32 Codec(const WebRtc_Word8* payloadName, CodecInst& codec,
|
||||
static WebRtc_Word32 Codec(const char* payloadName, CodecInst& codec,
|
||||
const WebRtc_Word32 samplingFreqHz = -1);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -142,7 +142,7 @@ class AudioCodingModule: public Module {
|
||||
// if the codec is found, the index of the codec in the list,
|
||||
// -1 if the codec is not found.
|
||||
//
|
||||
static WebRtc_Word32 Codec(const WebRtc_Word8* payloadName,
|
||||
static WebRtc_Word32 Codec(const char* payloadName,
|
||||
const WebRtc_Word32 samplingFreqHz = -1);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
@ -49,7 +49,7 @@ int16_t ACMCELT::DecodeSafe(uint8_t* /* bitStream */,
|
||||
int16_t /* bitStreamLenByte */,
|
||||
int16_t* /* audio */,
|
||||
int16_t* /* audioSamples */,
|
||||
char* /* speechType */) {
|
||||
int8_t* /* speechType */) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -157,7 +157,7 @@ int16_t ACMCELT::DecodeSafe(uint8_t* /* bitStream */,
|
||||
int16_t /* bitStreamLenByte */,
|
||||
int16_t* /* audio */,
|
||||
int16_t* /* audioSamples */,
|
||||
char* /* speechType */) {
|
||||
int8_t* /* speechType */) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -35,11 +35,11 @@ class ACMCELT : public ACMGenericCodec {
|
||||
protected:
|
||||
|
||||
WebRtc_Word16 DecodeSafe(
|
||||
WebRtc_UWord8* bitStream,
|
||||
WebRtc_Word16 bitStreamLenByte,
|
||||
WebRtc_Word16* audio,
|
||||
WebRtc_Word16* audioSamples,
|
||||
WebRtc_Word8* speechType);
|
||||
uint8_t* /* bitStream */,
|
||||
int16_t /* bitStreamLenByte */,
|
||||
int16_t* /* audio */,
|
||||
int16_t* /* audioSamples */,
|
||||
int8_t* /* speechType */);
|
||||
|
||||
int32_t CodecDef(WebRtcNetEQ_CodecDef& codecDef, const CodecInst& codecInst);
|
||||
|
||||
|
@ -986,7 +986,7 @@ ACMNetEQ::FlushBuffers()
|
||||
|
||||
WebRtc_Word32
|
||||
ACMNetEQ::GetVersion(
|
||||
WebRtc_Word8* version,
|
||||
char* version,
|
||||
WebRtc_UWord32& remainingBufferInBytes,
|
||||
WebRtc_UWord32& position)
|
||||
{
|
||||
@ -996,7 +996,7 @@ ACMNetEQ::GetVersion(
|
||||
remainingBufferInBytes -= (position - len);
|
||||
len = position;
|
||||
|
||||
WebRtc_Word8 myVersion[100];
|
||||
char myVersion[100];
|
||||
if(WebRtcNetEQ_GetVersion(myVersion) < 0)
|
||||
{
|
||||
return -1;
|
||||
@ -1111,11 +1111,11 @@ ACMNetEQ::SetUniqueId(
|
||||
|
||||
void
|
||||
ACMNetEQ::LogError(
|
||||
const WebRtc_Word8* neteqFuncName,
|
||||
const char* neteqFuncName,
|
||||
const WebRtc_Word16 idx) const
|
||||
{
|
||||
WebRtc_Word8 errorName[NETEQ_ERR_MSG_LEN_BYTE];
|
||||
WebRtc_Word8 myFuncName[50];
|
||||
char errorName[NETEQ_ERR_MSG_LEN_BYTE];
|
||||
char myFuncName[50];
|
||||
int neteqErrorCode = WebRtcNetEQ_GetErrorCode(_inst[idx]);
|
||||
WebRtcNetEQ_GetErrorName(neteqErrorCode, errorName, NETEQ_ERR_MSG_LEN_BYTE - 1);
|
||||
strncpy(myFuncName, neteqFuncName, 49);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -56,7 +56,7 @@ public:
|
||||
// -1 if NetEQ returned an error.
|
||||
//
|
||||
static WebRtc_Word32 GetVersion(
|
||||
WebRtc_Word8* version,
|
||||
char* version,
|
||||
WebRtc_UWord32& remainingBuffInBytes,
|
||||
WebRtc_UWord32& position);
|
||||
|
||||
@ -330,7 +330,7 @@ private:
|
||||
const WebRtcRTPHeader& rtpInfo);
|
||||
|
||||
void LogError(
|
||||
const WebRtc_Word8* neteqFuncName,
|
||||
const char* neteqFuncName,
|
||||
const WebRtc_Word16 idx) const;
|
||||
|
||||
WebRtc_Word16 InitByIdxSafe(
|
||||
|
@ -52,7 +52,7 @@ AudioCodingModule::Codec(
|
||||
// Get supported codec Param with name
|
||||
WebRtc_Word32
|
||||
AudioCodingModule::Codec(
|
||||
const WebRtc_Word8* payloadName,
|
||||
const char* payloadName,
|
||||
CodecInst& codec,
|
||||
const WebRtc_Word32 samplingFreqHz)
|
||||
{
|
||||
@ -86,7 +86,7 @@ AudioCodingModule::Codec(
|
||||
// Get supported codec Index with name, and frequency if needed
|
||||
WebRtc_Word32
|
||||
AudioCodingModule::Codec(
|
||||
const WebRtc_Word8* payloadName,
|
||||
const char* payloadName,
|
||||
const WebRtc_Word32 samplingFreqHz)
|
||||
{
|
||||
CodecInst codec;
|
||||
|
@ -2314,7 +2314,7 @@ AudioCodingModuleImpl::DecoderParamByPlType(
|
||||
|
||||
WebRtc_Word16
|
||||
AudioCodingModuleImpl::DecoderListIDByPlName(
|
||||
const WebRtc_Word8* payloadName,
|
||||
const char* payloadName,
|
||||
const WebRtc_UWord16 sampFreqHz) const
|
||||
{
|
||||
WebRtcACMCodecParams codecParams;
|
||||
@ -2485,7 +2485,7 @@ AudioCodingModuleImpl::PlayoutTimestamp(
|
||||
|
||||
bool
|
||||
AudioCodingModuleImpl::HaveValidEncoder(
|
||||
const WebRtc_Word8* callerName) const
|
||||
const char* callerName) const
|
||||
{
|
||||
if((!_sendCodecRegistered) ||
|
||||
(_currentSendCodecIdx < 0) ||
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
|
||||
// get version information for ACM and all components
|
||||
WebRtc_Word32 Version(
|
||||
WebRtc_Word8* version,
|
||||
char* version,
|
||||
WebRtc_UWord32& remainingBufferInBytes,
|
||||
WebRtc_UWord32& position) const;
|
||||
|
||||
@ -292,12 +292,12 @@ protected:
|
||||
WebRtcACMCodecParams& codecParams) const;
|
||||
|
||||
WebRtc_Word16 DecoderListIDByPlName(
|
||||
const WebRtc_Word8* payloadName,
|
||||
const char* payloadName,
|
||||
const WebRtc_UWord16 sampFreqHz = 0) const;
|
||||
|
||||
WebRtc_Word32 InitializeReceiverSafe();
|
||||
|
||||
bool HaveValidEncoder(const WebRtc_Word8* callerName) const;
|
||||
bool HaveValidEncoder(const char* callerName) const;
|
||||
|
||||
WebRtc_Word32 RegisterRecCodecMSSafe(
|
||||
const CodecInst& receiveCodec,
|
||||
|
@ -1,6 +1,5 @@
|
||||
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -53,7 +52,7 @@ PCMFile::ChooseFile(
|
||||
char* fileName,
|
||||
WebRtc_Word16 maxLen)
|
||||
{
|
||||
WebRtc_Word8 tmpName[MAX_FILE_NAME_LENGTH_BYTE];
|
||||
char tmpName[MAX_FILE_NAME_LENGTH_BYTE];
|
||||
//strcpy(_fileName, "in.pcm");
|
||||
//printf("\n\nPlease enter the input file: ");
|
||||
EXPECT_TRUE(fgets(tmpName, MAX_FILE_NAME_LENGTH_BYTE, stdin) != NULL);
|
||||
@ -105,7 +104,7 @@ PCMFile::ChooseFile(
|
||||
WebRtc_Word16 maxLen,
|
||||
WebRtc_UWord16* frequencyHz)
|
||||
{
|
||||
WebRtc_Word8 tmpName[MAX_FILE_NAME_LENGTH_BYTE];
|
||||
char tmpName[MAX_FILE_NAME_LENGTH_BYTE];
|
||||
//strcpy(_fileName, "in.pcm");
|
||||
//printf("\n\nPlease enter the input file: ");
|
||||
EXPECT_TRUE(fgets(tmpName, MAX_FILE_NAME_LENGTH_BYTE, stdin) != NULL);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -53,7 +53,7 @@ SpatialAudio::Setup()
|
||||
// Register the receiver ACM in channel
|
||||
_channel->RegisterReceiverACM(_acmReceiver);
|
||||
|
||||
WebRtc_Word8 audioFileName[MAX_FILE_NAME_LENGTH_BYTE];
|
||||
char audioFileName[MAX_FILE_NAME_LENGTH_BYTE];
|
||||
WebRtc_UWord16 sampFreqHz = 32000;
|
||||
|
||||
strncpy(audioFileName, "./test/data/audio_coding/testfile32kHz.pcm",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -99,7 +99,7 @@ WebRtc_Word16
|
||||
TwoWayCommunication::ChooseFile(char* fileName, WebRtc_Word16 maxLen,
|
||||
WebRtc_UWord16* frequencyHz)
|
||||
{
|
||||
WebRtc_Word8 tmpName[MAX_FILE_NAME_LENGTH_BYTE];
|
||||
char tmpName[MAX_FILE_NAME_LENGTH_BYTE];
|
||||
//strcpy(_fileName, "in.pcm");
|
||||
//printf("\n\nPlease enter the input file: ");
|
||||
EXPECT_TRUE(fgets(tmpName, MAX_FILE_NAME_LENGTH_BYTE, stdin) != NULL);
|
||||
|
@ -156,9 +156,9 @@ typedef struct
|
||||
/* Info functions */
|
||||
|
||||
#define WEBRTC_NETEQ_MAX_ERROR_NAME 40
|
||||
int WebRtcNetEQ_GetVersion(WebRtc_Word8 *version);
|
||||
int WebRtcNetEQ_GetVersion(char *version);
|
||||
int WebRtcNetEQ_GetErrorCode(void *inst);
|
||||
int WebRtcNetEQ_GetErrorName(int errorCode, WebRtc_Word8 *errorName, int maxStrLen);
|
||||
int WebRtcNetEQ_GetErrorName(int errorCode, char *errorName, int maxStrLen);
|
||||
|
||||
/* Instance memory assign functions */
|
||||
|
||||
@ -213,4 +213,3 @@ int WebRtcNetEQ_VQmonGetRxStatistics(void *inst, WebRtc_UWord16 *avgDelayMs,
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -35,8 +35,8 @@
|
||||
return(-1); \
|
||||
} }
|
||||
|
||||
int WebRtcNetEQ_strncpy(WebRtc_Word8 *strDest, int numberOfElements,
|
||||
const WebRtc_Word8 *strSource, int count)
|
||||
int WebRtcNetEQ_strncpy(char *strDest, int numberOfElements,
|
||||
const char *strSource, int count)
|
||||
{
|
||||
/* check vector lengths */
|
||||
if (count > numberOfElements)
|
||||
@ -59,7 +59,7 @@ int WebRtcNetEQ_strncpy(WebRtc_Word8 *strDest, int numberOfElements,
|
||||
* Info functions
|
||||
*/
|
||||
|
||||
int WebRtcNetEQ_GetVersion(WebRtc_Word8 *version)
|
||||
int WebRtcNetEQ_GetVersion(char *version)
|
||||
{
|
||||
char versionString[] = "3.3.0\0 ";
|
||||
char endChar[] = " ";
|
||||
@ -79,7 +79,7 @@ int WebRtcNetEQ_GetErrorCode(void *inst)
|
||||
return (NetEqMainInst->ErrorCode);
|
||||
}
|
||||
|
||||
int WebRtcNetEQ_GetErrorName(int errorCode, WebRtc_Word8 *errorName, int maxStrLen)
|
||||
int WebRtcNetEQ_GetErrorName(int errorCode, char *errorName, int maxStrLen)
|
||||
{
|
||||
if ((errorName == NULL) || (maxStrLen <= 0))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user