make all buffers the same size
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@384 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
b0db977fd4
commit
2a329aa5e7
|
@ -41,7 +41,7 @@ extern "C" {
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
#include <switch_platform.h>
|
#include <switch_platform.h>
|
||||||
|
|
||||||
#define SWITCH_GLOBAL_VERSION "1"
|
#define SWITCH_RECCOMMENDED_BUFFER_SIZE 131072
|
||||||
#define SWITCH_MAX_CODECS 30
|
#define SWITCH_MAX_CODECS 30
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ struct private_object {
|
||||||
switch_frame read_frame;
|
switch_frame read_frame;
|
||||||
switch_codec read_codec;
|
switch_codec read_codec;
|
||||||
switch_codec write_codec;
|
switch_codec write_codec;
|
||||||
unsigned char read_buf[1024];
|
unsigned char read_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
|
||||||
switch_caller_profile *caller_profile;
|
switch_caller_profile *caller_profile;
|
||||||
int cid;
|
int cid;
|
||||||
int did;
|
int did;
|
||||||
|
|
|
@ -80,7 +80,7 @@ struct private_object {
|
||||||
switch_codec read_codec;
|
switch_codec read_codec;
|
||||||
switch_codec write_codec;
|
switch_codec write_codec;
|
||||||
struct switch_frame read_frame;
|
struct switch_frame read_frame;
|
||||||
unsigned char databuf[1024];
|
unsigned char databuf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
|
||||||
switch_core_session *session;
|
switch_core_session *session;
|
||||||
struct iax_session *iax_session;
|
struct iax_session *iax_session;
|
||||||
switch_caller_profile *caller_profile;
|
switch_caller_profile *caller_profile;
|
||||||
|
|
|
@ -52,7 +52,7 @@ static struct {
|
||||||
struct private_object {
|
struct private_object {
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
struct switch_frame frame;
|
struct switch_frame frame;
|
||||||
unsigned char databuf[1024];
|
unsigned char databuf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
|
||||||
switch_core_session *session;
|
switch_core_session *session;
|
||||||
switch_caller_profile *caller_profile;
|
switch_caller_profile *caller_profile;
|
||||||
};
|
};
|
||||||
|
|
|
@ -83,7 +83,7 @@ struct private_object {
|
||||||
switch_codec read_codec;
|
switch_codec read_codec;
|
||||||
switch_codec write_codec;
|
switch_codec write_codec;
|
||||||
struct switch_frame read_frame;
|
struct switch_frame read_frame;
|
||||||
unsigned char databuf[1024];
|
unsigned char databuf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
|
||||||
switch_core_session *session;
|
switch_core_session *session;
|
||||||
switch_caller_profile *caller_profile;
|
switch_caller_profile *caller_profile;
|
||||||
char call_id[50];
|
char call_id[50];
|
||||||
|
|
|
@ -88,7 +88,7 @@ static struct {
|
||||||
struct private_object {
|
struct private_object {
|
||||||
unsigned int flags; /* FLAGS */
|
unsigned int flags; /* FLAGS */
|
||||||
struct switch_frame frame; /* Frame for Writing */
|
struct switch_frame frame; /* Frame for Writing */
|
||||||
unsigned char databuf[1024];
|
unsigned char databuf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
|
||||||
struct sangoma_pri *spri;
|
struct sangoma_pri *spri;
|
||||||
pri_event ring_event;
|
pri_event ring_event;
|
||||||
pri_event hangup_event;
|
pri_event hangup_event;
|
||||||
|
|
|
@ -138,7 +138,7 @@ struct private_object {
|
||||||
switch_pollfd_t read_poll;
|
switch_pollfd_t read_poll;
|
||||||
switch_pollfd_t write_poll;
|
switch_pollfd_t write_poll;
|
||||||
switch_pollfd_t command_poll;
|
switch_pollfd_t command_poll;
|
||||||
unsigned char databuf[2048];
|
unsigned char databuf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
|
||||||
switch_mutex_t *iolock;
|
switch_mutex_t *iolock;
|
||||||
switch_sockaddr_t *udpread;
|
switch_sockaddr_t *udpread;
|
||||||
switch_sockaddr_t *udpwrite;
|
switch_sockaddr_t *udpwrite;
|
||||||
|
|
|
@ -58,18 +58,18 @@ struct switch_core_session {
|
||||||
struct switch_io_event_hooks event_hooks;
|
struct switch_io_event_hooks event_hooks;
|
||||||
switch_codec *read_codec;
|
switch_codec *read_codec;
|
||||||
switch_codec *write_codec;
|
switch_codec *write_codec;
|
||||||
// TBD Make these 128k buffers size themselves dynamicly
|
|
||||||
switch_buffer *raw_write_buffer;
|
switch_buffer *raw_write_buffer;
|
||||||
switch_frame raw_write_frame;
|
switch_frame raw_write_frame;
|
||||||
switch_frame enc_write_frame;
|
switch_frame enc_write_frame;
|
||||||
unsigned char *raw_write_buf[131072];
|
unsigned char *raw_write_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
|
||||||
unsigned char *enc_write_buf[131072];
|
unsigned char *enc_write_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
|
||||||
|
|
||||||
switch_buffer *raw_read_buffer;
|
switch_buffer *raw_read_buffer;
|
||||||
switch_frame raw_read_frame;
|
switch_frame raw_read_frame;
|
||||||
switch_frame enc_read_frame;
|
switch_frame enc_read_frame;
|
||||||
unsigned char *raw_read_buf[131072];
|
unsigned char *raw_read_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
|
||||||
unsigned char *enc_read_buf[131072];
|
unsigned char *enc_read_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
|
||||||
|
|
||||||
|
|
||||||
switch_audio_resampler *read_resampler;
|
switch_audio_resampler *read_resampler;
|
||||||
|
|
Loading…
Reference in New Issue