mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
standardize to some more specific int types for frame size and rate variables.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1095 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -55,14 +55,14 @@ static switch_status switch_g711u_init(switch_codec *codec, switch_codec_flag fl
|
||||
static switch_status switch_g711u_encode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *decoded_data,
|
||||
size_t decoded_data_len,
|
||||
int decoded_rate,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate,
|
||||
void *encoded_data,
|
||||
size_t *encoded_data_len, int *encoded_rate, unsigned int *flag)
|
||||
uint32_t *encoded_data_len, uint32_t *encoded_rate, unsigned int *flag)
|
||||
{
|
||||
short *dbuf;
|
||||
unsigned char *ebuf;
|
||||
size_t i;
|
||||
uint32_t i;
|
||||
|
||||
dbuf = decoded_data;
|
||||
ebuf = encoded_data;
|
||||
@@ -79,14 +79,14 @@ static switch_status switch_g711u_encode(switch_codec *codec,
|
||||
static switch_status switch_g711u_decode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *encoded_data,
|
||||
size_t encoded_data_len,
|
||||
int encoded_rate,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate,
|
||||
void *decoded_data,
|
||||
size_t *decoded_data_len, int *decoded_rate, unsigned int *flag)
|
||||
uint32_t *decoded_data_len, uint32_t *decoded_rate, unsigned int *flag)
|
||||
{
|
||||
short *dbuf;
|
||||
unsigned char *ebuf;
|
||||
size_t i;
|
||||
uint32_t i;
|
||||
|
||||
dbuf = decoded_data;
|
||||
ebuf = encoded_data;
|
||||
@@ -130,14 +130,14 @@ static switch_status switch_g711a_init(switch_codec *codec, switch_codec_flag fl
|
||||
static switch_status switch_g711a_encode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *decoded_data,
|
||||
size_t decoded_data_len,
|
||||
int decoded_rate,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate,
|
||||
void *encoded_data,
|
||||
size_t *encoded_data_len, int *encoded_rate, unsigned int *flag)
|
||||
uint32_t *encoded_data_len, uint32_t *encoded_rate, unsigned int *flag)
|
||||
{
|
||||
short *dbuf;
|
||||
unsigned char *ebuf;
|
||||
size_t i;
|
||||
uint32_t i;
|
||||
|
||||
dbuf = decoded_data;
|
||||
ebuf = encoded_data;
|
||||
@@ -154,14 +154,14 @@ static switch_status switch_g711a_encode(switch_codec *codec,
|
||||
static switch_status switch_g711a_decode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *encoded_data,
|
||||
size_t encoded_data_len,
|
||||
int encoded_rate,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate,
|
||||
void *decoded_data,
|
||||
size_t *decoded_data_len, int *decoded_rate, unsigned int *flag)
|
||||
uint32_t *decoded_data_len, uint32_t *decoded_rate, unsigned int *flag)
|
||||
{
|
||||
short *dbuf;
|
||||
unsigned char *ebuf;
|
||||
size_t i;
|
||||
uint32_t i;
|
||||
|
||||
dbuf = decoded_data;
|
||||
ebuf = encoded_data;
|
||||
|
@@ -84,12 +84,12 @@ static switch_status switch_g729_encode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *decoded_data,
|
||||
|
||||
size_t decoded_data_len,
|
||||
int decoded_rate,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate,
|
||||
void *encoded_data,
|
||||
|
||||
size_t *encoded_data_len,
|
||||
int *encoded_rate,
|
||||
uint32_t *encoded_data_len,
|
||||
uint32_t *encoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
|
||||
@@ -101,7 +101,7 @@ static switch_status switch_g729_encode(switch_codec *codec,
|
||||
}
|
||||
|
||||
if (decoded_data_len % 160 == 0) {
|
||||
unsigned int new_len = 0;
|
||||
uint32_t new_len = 0;
|
||||
INT16 * ddp = decoded_data;
|
||||
char *edp = encoded_data;
|
||||
int x;
|
||||
@@ -131,12 +131,12 @@ static switch_status switch_g729_decode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *encoded_data,
|
||||
|
||||
size_t encoded_data_len,
|
||||
int encoded_rate,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate,
|
||||
void *decoded_data,
|
||||
|
||||
size_t *decoded_data_len,
|
||||
int *decoded_rate,
|
||||
uint32_t *decoded_data_len,
|
||||
uint32_t *decoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
|
||||
@@ -175,7 +175,7 @@ static switch_status switch_g729_decode(switch_codec *codec,
|
||||
|
||||
int x;
|
||||
|
||||
unsigned int new_len = 0;
|
||||
uint32_t new_len = 0;
|
||||
|
||||
test = (uint8_t *) encoded_data;
|
||||
if (*test == 0 && *(test+1) == 0) {
|
||||
|
@@ -68,15 +68,15 @@ static switch_status switch_gsm_destroy(switch_codec *codec)
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
static switch_status switch_gsm_encode(switch_codec *codec, switch_codec *other_codec, void *decoded_data,
|
||||
size_t decoded_data_len, int decoded_rate, void *encoded_data,
|
||||
size_t *encoded_data_len, int *encoded_rate, unsigned int *flag)
|
||||
uint32_t decoded_data_len, uint32_t decoded_rate, void *encoded_data,
|
||||
uint32_t *encoded_data_len, uint32_t *encoded_rate, unsigned int *flag)
|
||||
{
|
||||
struct gsm_context *context = codec->private_info;
|
||||
if (!context) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
if (decoded_data_len % 320 == 0) {
|
||||
unsigned int new_len = 0;
|
||||
uint32_t new_len = 0;
|
||||
gsm_signal * ddp = decoded_data;
|
||||
gsm_byte * edp = encoded_data;
|
||||
int x;
|
||||
@@ -97,8 +97,8 @@ static switch_status switch_gsm_encode(switch_codec *codec, switch_codec *other_
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
static switch_status switch_gsm_decode(switch_codec *codec, switch_codec *other_codec, void *encoded_data,
|
||||
size_t encoded_data_len, int encoded_rate, void *decoded_data,
|
||||
size_t *decoded_data_len, int *decoded_rate, unsigned int *flag)
|
||||
uint32_t encoded_data_len, uint32_t encoded_rate, void *decoded_data,
|
||||
uint32_t *decoded_data_len, uint32_t *decoded_rate, unsigned int *flag)
|
||||
{
|
||||
struct gsm_context *context = codec->private_info;
|
||||
if (!context) {
|
||||
@@ -110,7 +110,7 @@ static switch_status switch_gsm_decode(switch_codec *codec, switch_codec *other_
|
||||
gsm_byte * edp = encoded_data;
|
||||
gsm_signal * ddp = decoded_data;
|
||||
int x;
|
||||
unsigned int new_len = 0;
|
||||
uint32_t new_len = 0;
|
||||
|
||||
for (x = 0; x < loops && new_len < *decoded_data_len; x++) {
|
||||
gsm_decode(context->decoder, edp, ddp);
|
||||
|
@@ -52,10 +52,10 @@ static switch_status switch_raw_init(switch_codec *codec, switch_codec_flag flag
|
||||
static switch_status switch_raw_encode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *decoded_data,
|
||||
size_t decoded_data_len,
|
||||
int decoded_rate,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate,
|
||||
void *encoded_data,
|
||||
size_t *encoded_data_len, int *encoded_rate, unsigned int *flag)
|
||||
uint32_t *encoded_data_len, uint32_t *encoded_rate, unsigned int *flag)
|
||||
{
|
||||
|
||||
/* NOOP indicates that the audio in is already the same as the audio out, so no conversion was necessary. */
|
||||
@@ -70,10 +70,10 @@ static switch_status switch_raw_encode(switch_codec *codec,
|
||||
static switch_status switch_raw_decode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *encoded_data,
|
||||
size_t encoded_data_len,
|
||||
int encoded_rate,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate,
|
||||
void *decoded_data,
|
||||
size_t *decoded_data_len, int *decoded_rate, unsigned int *flag)
|
||||
uint32_t *decoded_data_len, uint32_t *decoded_rate, unsigned int *flag)
|
||||
{
|
||||
if (codec && other_codec && codec->implementation->samples_per_second != other_codec->implementation->samples_per_second) {
|
||||
memcpy(decoded_data, encoded_data, encoded_data_len);
|
||||
|
@@ -160,10 +160,10 @@ static switch_status switch_speex_init(switch_codec *codec, switch_codec_flag fl
|
||||
static switch_status switch_speex_encode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *decoded_data,
|
||||
size_t decoded_data_len,
|
||||
int decoded_rate,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate,
|
||||
void *encoded_data,
|
||||
size_t *encoded_data_len, int *encoded_rate, unsigned int *flag)
|
||||
uint32_t *encoded_data_len, uint32_t *encoded_rate, unsigned int *flag)
|
||||
{
|
||||
struct speex_context *context = codec->private_info;
|
||||
short *buf;
|
||||
@@ -215,10 +215,10 @@ static switch_status switch_speex_encode(switch_codec *codec,
|
||||
static switch_status switch_speex_decode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *encoded_data,
|
||||
size_t encoded_data_len,
|
||||
int encoded_rate,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate,
|
||||
void *decoded_data,
|
||||
size_t *decoded_data_len, int *decoded_rate, unsigned int *flag)
|
||||
uint32_t *decoded_data_len, uint32_t *decoded_rate, unsigned int *flag)
|
||||
{
|
||||
struct speex_context *context = codec->private_info;
|
||||
short *buf;
|
||||
|
Reference in New Issue
Block a user