Dear Kamailio'ns

I am working on Kamailio (V 4.0)+ Mediaproxy server (2.5.2) running on Ubuntu 12.04. I am experiencing Latency, jitter, pixel led, choppy video errors in my set-up. So i wanted increase buffer sizes in my kamailio server , Mediaproxy server and Ubuntu also. 
In that regards i have increased Shared memory value to 512 MB and Package memory value 16 MB.
BUFFER SIZE value to 8 MB in config.h file, But where can i change the value for 'MAX_RECV_BUFFER_SIZE' ?

And are there any settings to increase Buffer Size of Mediaproxy server ?

Is this changes will affect on my issues ?

PS: I even changed ubuntu settings also :
                net.core.rmem_max= 8388608
                net.core.wmem_max= 8388608
(but these values reset to default values again when i restarted system.)

Please help me in resolving this issues.

Any help will appreciate.

Regards,
Ravi