housekeeping.. *tap* *tap* housekeeping...
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7386 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
aab6766ece
commit
a6fbb7f9bc
|
@ -26,7 +26,7 @@
|
|||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* mod_g711codec.c -- G711 Ulaw/Alaw Codec Module
|
||||
* mod_g711.c -- G711 Ulaw/Alaw Codec Module
|
||||
*
|
||||
*/
|
||||
#include <switch.h>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* The g723.1 codec itself is not distributed with this module.
|
||||
*
|
||||
* mod_g723.c -- G723.1 Codec Module
|
||||
* mod_g723_1.c -- G723.1 Codec Module
|
||||
*
|
||||
*/
|
||||
#include "switch.h"
|
||||
|
@ -97,7 +97,6 @@ static switch_status_t switch_g723_init(switch_codec_t *codec, switch_codec_flag
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
static switch_status_t switch_g723_destroy(switch_codec_t *codec)
|
||||
{
|
||||
#ifndef G723_PASSTHROUGH
|
||||
|
|
|
@ -39,7 +39,6 @@ SWITCH_MODULE_DEFINITION(mod_g726, mod_g726_load, NULL, NULL);
|
|||
typedef int (*encoder_t) (int, int, g726_state *);
|
||||
typedef int (*decoder_t) (int, int, g726_state *);
|
||||
|
||||
|
||||
typedef struct {
|
||||
g726_state context;
|
||||
switch_byte_t bits_per_frame;
|
||||
|
@ -101,15 +100,12 @@ static switch_status_t switch_g726_init(switch_codec_t *codec, switch_codec_flag
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static switch_status_t switch_g726_destroy(switch_codec_t *codec)
|
||||
{
|
||||
codec->private_info = NULL;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static switch_status_t switch_g726_encode(switch_codec_t *codec,
|
||||
switch_codec_t *other_codec,
|
||||
void *decoded_data,
|
||||
|
@ -117,11 +113,9 @@ static switch_status_t switch_g726_encode(switch_codec_t *codec,
|
|||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
|
||||
g726_handle_t *handle = codec->private_info;
|
||||
g726_state *context = &handle->context;
|
||||
uint32_t len = codec->implementation->bytes_per_frame;
|
||||
//uint32_t elen = codec->implementation->encoded_bytes_per_frame;
|
||||
|
||||
if (!context) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error!\n");
|
||||
|
@ -155,8 +149,6 @@ static switch_status_t switch_g726_encode(switch_codec_t *codec,
|
|||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static switch_status_t switch_g726_decode(switch_codec_t *codec,
|
||||
switch_codec_t *other_codec,
|
||||
void *encoded_data,
|
||||
|
@ -164,7 +156,6 @@ static switch_status_t switch_g726_decode(switch_codec_t *codec,
|
|||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
|
||||
unsigned int *flag)
|
||||
{
|
||||
|
||||
g726_handle_t *handle = codec->private_info;
|
||||
g726_state *context = &handle->context;
|
||||
int16_t *ddp = decoded_data;
|
||||
|
@ -195,13 +186,9 @@ static switch_status_t switch_g726_decode(switch_codec_t *codec,
|
|||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Registration */
|
||||
|
||||
static switch_codec_implementation_t g726_16k_implementation = {
|
||||
|
@ -225,7 +212,6 @@ static switch_codec_implementation_t g726_16k_implementation = {
|
|||
/*.destroy */ switch_g726_destroy,
|
||||
};
|
||||
|
||||
|
||||
static switch_codec_implementation_t g726_24k_implementation = {
|
||||
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
|
||||
/*.ianacode */ 126,
|
||||
|
@ -289,8 +275,6 @@ static switch_codec_implementation_t g726_40k_implementation = {
|
|||
/*.destroy */ switch_g726_destroy,
|
||||
};
|
||||
|
||||
|
||||
|
||||
static switch_codec_implementation_t aal2_g726_16k_implementation = {
|
||||
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
|
||||
/*.ianacode */ 124,
|
||||
|
@ -312,7 +296,6 @@ static switch_codec_implementation_t aal2_g726_16k_implementation = {
|
|||
/*.destroy */ switch_g726_destroy,
|
||||
};
|
||||
|
||||
|
||||
static switch_codec_implementation_t aal2_g726_24k_implementation = {
|
||||
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
|
||||
/*.ianacode */ 123,
|
||||
|
|
|
@ -78,7 +78,6 @@ static switch_status_t switch_g729_init(switch_codec_t *codec, switch_codec_flag
|
|||
codec->private_info = context;
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -151,7 +150,6 @@ static switch_status_t switch_g729_decode(switch_codec_t *codec,
|
|||
|
||||
if (!context) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
|
||||
}
|
||||
|
||||
if (encoded_data_len % 2 == 0) {
|
||||
|
@ -192,11 +190,8 @@ static switch_status_t switch_g729_decode(switch_codec_t *codec,
|
|||
}
|
||||
|
||||
if (new_len <= *decoded_data_len) {
|
||||
|
||||
*decoded_data_len = new_len;
|
||||
|
||||
} else {
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "buffer overflow!!!\n");
|
||||
return SWITCH_STATUS_FALSE;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Michael Jerris <mike@jerris.com>
|
||||
*
|
||||
* mod_codec_gsm.c -- gsm Codec Module
|
||||
* mod_gsm.c -- gsm Codec Module
|
||||
*
|
||||
*/
|
||||
#include "switch.h"
|
||||
|
|
|
@ -71,7 +71,6 @@ static switch_status_t switch_h26x_decode(switch_codec_t *codec,
|
|||
|
||||
static switch_status_t switch_h26x_destroy(switch_codec_t *codec)
|
||||
{
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@ static switch_status_t switch_ilbc_init(switch_codec_t *codec, switch_codec_flag
|
|||
int encoding, decoding;
|
||||
uint8_t ms = (uint8_t) (codec->implementation->microseconds_per_frame / 1000);
|
||||
|
||||
|
||||
if (ms != 20 && ms != 30) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invalid speed! (I should never happen)\n");
|
||||
return SWITCH_STATUS_FALSE;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* mod_rawaudio.c -- Raw Signed Linear Codec
|
||||
* mod_l16.c -- Raw Signed Linear Codec
|
||||
*
|
||||
*/
|
||||
#include <switch.h>
|
||||
|
|
Loading…
Reference in New Issue