]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
make all buffers the same size
authorAnthony Minessale <anthony.minessale@gmail.com>
Sat, 14 Jan 2006 16:44:52 +0000 (16:44 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sat, 14 Jan 2006 16:44:52 +0000 (16:44 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@384 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_types.h
src/mod/endpoints/mod_exosip/mod_exosip.c
src/mod/endpoints/mod_iax/mod_iax.c
src/mod/endpoints/mod_opal/mod_opal.c
src/mod/endpoints/mod_portaudio/mod_portaudio.c
src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
src/mod/endpoints/mod_woomera/mod_woomera.c
src/switch_core.c

index 383a0417db2762d611b450bb49a0c94bdcc848e4..3494ab245f8786956b61c9bc16e489760d4a18a7 100644 (file)
@@ -41,7 +41,7 @@ extern "C" {
 #include <switch.h>
 #include <switch_platform.h>
 
-#define SWITCH_GLOBAL_VERSION "1"
+#define SWITCH_RECCOMMENDED_BUFFER_SIZE 131072
 #define SWITCH_MAX_CODECS 30
 
 
index 82ad91696d65a4d69d7ac9a6043ae2d298821959..aef165afc0674e4be48027448b4fafeeb3711a70 100644 (file)
@@ -92,7 +92,7 @@ struct private_object {
        switch_frame read_frame;
        switch_codec read_codec;
        switch_codec write_codec;
-       unsigned char read_buf[1024];
+       unsigned char read_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
        switch_caller_profile *caller_profile;
        int cid;
        int did;
index 4f1bd7cac98409df5cac3fe6325799439e952d44..612a8cf6e213731a1dfd17dbe0d79f80cce5b1a2 100644 (file)
@@ -80,7 +80,7 @@ struct private_object {
        switch_codec read_codec;
        switch_codec write_codec;
        struct switch_frame read_frame;
-       unsigned char databuf[1024];
+       unsigned char databuf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
        switch_core_session *session;
        struct iax_session *iax_session;
        switch_caller_profile *caller_profile;  
index 8b251fa2e7a417a72dc6f96b914c62e59fa143ee..8159f23f34262ed8ee11f1fb14966b40bcca03c5 100644 (file)
@@ -52,7 +52,7 @@ static struct {
 struct private_object {
        unsigned int flags;
        struct switch_frame frame;
-       unsigned char databuf[1024];
+       unsigned char databuf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
        switch_core_session *session;
        switch_caller_profile *caller_profile;  
 };
index dc831ff985d0f570e7e2dfa4e4d1865611fd3052..787ce0d83cb3f1b3050097dd06ea8f701eba496a 100644 (file)
@@ -83,7 +83,7 @@ struct private_object {
        switch_codec read_codec;
     switch_codec write_codec;
        struct switch_frame read_frame;
-       unsigned char databuf[1024];
+       unsigned char databuf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
        switch_core_session *session;
        switch_caller_profile *caller_profile;  
        char call_id[50];
index c624475f477dc0325092a735d6feba56ad9127e2..a15784c4078f744164b4e077933e372903cd5da0 100644 (file)
@@ -88,7 +88,7 @@ static struct {
 struct private_object {
        unsigned int flags;                                                     /* FLAGS */
        struct switch_frame frame;                                              /* Frame for Writing */
-       unsigned char databuf[1024];
+       unsigned char databuf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
        struct sangoma_pri *spri;
        pri_event ring_event;
        pri_event hangup_event;
index c3403b29d12d70f76dda6f06cd354f86075e62a4..0f6ce7de66031e3e3945d86ff1eb307182af3685 100644 (file)
@@ -138,7 +138,7 @@ struct private_object {
        switch_pollfd_t read_poll;
        switch_pollfd_t write_poll;
        switch_pollfd_t command_poll;
-       unsigned char databuf[2048];
+       unsigned char databuf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
        switch_mutex_t *iolock;
        switch_sockaddr_t *udpread;
        switch_sockaddr_t *udpwrite;
index 751fb6193c02eaf63856ebd9f8066a85c52d53ae..dbb55986d54cae26ec6e31a20886e32d9019cd95 100644 (file)
@@ -58,18 +58,18 @@ struct switch_core_session {
        struct switch_io_event_hooks event_hooks;
        switch_codec *read_codec;
        switch_codec *write_codec;
-       // TBD Make these 128k buffers size themselves dynamicly
+
        switch_buffer *raw_write_buffer;
        switch_frame raw_write_frame;
        switch_frame enc_write_frame;
-       unsigned char *raw_write_buf[131072];
-       unsigned char *enc_write_buf[131072];
+       unsigned char *raw_write_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
+       unsigned char *enc_write_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
 
        switch_buffer *raw_read_buffer;
        switch_frame raw_read_frame;
        switch_frame enc_read_frame;
-       unsigned char *raw_read_buf[131072];
-       unsigned char *enc_read_buf[131072];
+       unsigned char *raw_read_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
+       unsigned char *enc_read_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
 
 
        switch_audio_resampler *read_resampler;