mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
remove freeswitch's privates (couldn't resist)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@677 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -64,7 +64,7 @@ static switch_status switch_g729_init(switch_codec *codec, switch_codec_flag fla
|
||||
g729_init_decoder(&context->decoder_object);
|
||||
}
|
||||
|
||||
codec->private = context;
|
||||
codec->private_info = context;
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
||||
@@ -74,7 +74,7 @@ static switch_status switch_g729_init(switch_codec *codec, switch_codec_flag fla
|
||||
|
||||
static switch_status switch_g729_destroy(switch_codec *codec)
|
||||
{
|
||||
codec->private = NULL;
|
||||
codec->private_info = NULL;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ static switch_status switch_g729_encode(switch_codec *codec,
|
||||
unsigned int *flag)
|
||||
{
|
||||
|
||||
struct g729_context *context = codec->private;
|
||||
struct g729_context *context = codec->private_info;
|
||||
int cbret = 0;
|
||||
|
||||
if (!context) {
|
||||
@@ -139,7 +139,7 @@ static switch_status switch_g729_decode(switch_codec *codec,
|
||||
unsigned int *flag)
|
||||
{
|
||||
|
||||
struct g729_context *context = codec->private;
|
||||
struct g729_context *context = codec->private_info;
|
||||
|
||||
|
||||
if (!context) {
|
||||
@@ -250,4 +250,4 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -52,26 +52,26 @@ static switch_status switch_gsm_init(switch_codec *codec, switch_codec_flag flag
|
||||
if (decoding)
|
||||
context->decoder = gsm_create();
|
||||
}
|
||||
codec->private = context;
|
||||
codec->private_info = context;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
static switch_status switch_gsm_destroy(switch_codec *codec)
|
||||
{
|
||||
struct gsm_context *context = codec->private;
|
||||
struct gsm_context *context = codec->private_info;
|
||||
int encoding = (codec->flags & SWITCH_CODEC_FLAG_ENCODE);
|
||||
int decoding = (codec->flags & SWITCH_CODEC_FLAG_DECODE);
|
||||
if (encoding)
|
||||
gsm_destroy(context->encoder);
|
||||
if (decoding)
|
||||
gsm_destroy(context->decoder);
|
||||
codec->private = NULL;
|
||||
codec->private_info = NULL;
|
||||
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)
|
||||
{
|
||||
struct gsm_context *context = codec->private;
|
||||
struct gsm_context *context = codec->private_info;
|
||||
if (!context) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ static switch_status switch_gsm_decode(switch_codec *codec, switch_codec *other_
|
||||
size_t encoded_data_len, int encoded_rate, void *decoded_data,
|
||||
size_t *decoded_data_len, int *decoded_rate, unsigned int *flag)
|
||||
{
|
||||
struct gsm_context *context = codec->private;
|
||||
struct gsm_context *context = codec->private_info;
|
||||
if (!context) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
@@ -59,14 +59,14 @@ static switch_status switch_ilbc_init(switch_codec *codec, switch_codec_flag fla
|
||||
context->decoder = ilbc_create();
|
||||
}
|
||||
|
||||
codec->private = context;
|
||||
codec->private_info = context;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static switch_status switch_ilbc_destroy(switch_codec *codec)
|
||||
{
|
||||
struct ilbc_context *context = codec->private;
|
||||
struct ilbc_context *context = codec->private_info;
|
||||
|
||||
int encoding = (codec->flags & SWITCH_CODEC_FLAG_ENCODE);
|
||||
int decoding = (codec->flags & SWITCH_CODEC_FLAG_DECODE);
|
||||
@@ -76,7 +76,7 @@ static switch_status switch_ilbc_destroy(switch_codec *codec)
|
||||
if (decoding)
|
||||
ilbc_destroy(context->decoder);
|
||||
|
||||
codec->private = NULL;
|
||||
codec->private_info = NULL;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ static switch_status switch_ilbc_encode(switch_codec *codec,
|
||||
int *encoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
struct ilbc_context *context = codec->private;
|
||||
struct ilbc_context *context = codec->private_info;
|
||||
int cbret = 0;
|
||||
|
||||
if (!context) {
|
||||
@@ -132,7 +132,7 @@ static switch_status switch_ilbc_decode(switch_codec *codec,
|
||||
int *decoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
struct ilbc_context *context = codec->private;
|
||||
struct ilbc_context *context = codec->private_info;
|
||||
|
||||
if (!context) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
|
@@ -152,7 +152,7 @@ static switch_status switch_speex_init(switch_codec *codec, switch_codec_flag fl
|
||||
|
||||
|
||||
|
||||
codec->private = context;
|
||||
codec->private_info = context;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -165,7 +165,7 @@ static switch_status switch_speex_encode(switch_codec *codec,
|
||||
void *encoded_data,
|
||||
size_t *encoded_data_len, int *encoded_rate, unsigned int *flag)
|
||||
{
|
||||
struct speex_context *context = codec->private;
|
||||
struct speex_context *context = codec->private_info;
|
||||
short *buf;
|
||||
int is_speech = 1;
|
||||
|
||||
@@ -220,7 +220,7 @@ static switch_status switch_speex_decode(switch_codec *codec,
|
||||
void *decoded_data,
|
||||
size_t *decoded_data_len, int *decoded_rate, unsigned int *flag)
|
||||
{
|
||||
struct speex_context *context = codec->private;
|
||||
struct speex_context *context = codec->private_info;
|
||||
short *buf;
|
||||
|
||||
if (!context) {
|
||||
@@ -242,7 +242,7 @@ static switch_status switch_speex_decode(switch_codec *codec,
|
||||
static switch_status switch_speex_destroy(switch_codec *codec)
|
||||
{
|
||||
int encoding, decoding;
|
||||
struct speex_context *context = codec->private;
|
||||
struct speex_context *context = codec->private_info;
|
||||
|
||||
if (!context) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
@@ -261,7 +261,7 @@ static switch_status switch_speex_destroy(switch_codec *codec)
|
||||
speex_decoder_destroy(context->decoder_state);
|
||||
}
|
||||
|
||||
codec->private = NULL;
|
||||
codec->private_info = NULL;
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user