diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2013-06-19 09:06:55 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2013-06-19 09:06:55 +0000 |
commit | 1229122bc17bb86b6a10e043aa3505715b797347 (patch) | |
tree | ae8a72fe1f020f77c31514b05fbd98af2fdcd434 /pjmedia/include | |
parent | d7aa4332dae06ae890053dd13239ddabee46b86c (diff) |
Close #1681:
- Added compile-time settings PJMEDIA_TRANSPORT_SO_RCVBUF_SIZE and PJMEDIA_TRANSPORT_SO_SNDBUF_SIZE. The default values are both 64 KB when PJMEDIA_HAS_VIDEO is set, otherwise just zero (socket buffer size uses OS default). The settings will be applied to media transport UDP and ICE.
- Also added run-time settings so_sndbuf_size and so_rcvbuf_size into ICE stream transport, STUN socket, and TURN socket. Default values are all zero.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4538 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r-- | pjmedia/include/pjmedia/config.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/pjmedia/include/pjmedia/config.h b/pjmedia/include/pjmedia/config.h index b3becbc7..d718b659 100644 --- a/pjmedia/include/pjmedia/config.h +++ b/pjmedia/include/pjmedia/config.h @@ -1217,6 +1217,46 @@ /** + * Specify target value for socket receive buffer size. It will be + * applied to RTP socket of media transport using setsockopt(). When + * transport failed to set the specified size, it will try with lower + * value until the highest possible is successfully set. + * + * Setting this to zero will leave the socket receive buffer size to + * OS default (e.g: usually 8 KB on desktop platforms). + * + * Default: 64 KB when video is enabled, otherwise zero (OS default) + */ +#ifndef PJMEDIA_TRANSPORT_SO_RCVBUF_SIZE +# if PJMEDIA_HAS_VIDEO +# define PJMEDIA_TRANSPORT_SO_RCVBUF_SIZE (64*1024) +# else +# define PJMEDIA_TRANSPORT_SO_RCVBUF_SIZE 0 +# endif +#endif + + +/** + * Specify target value for socket send buffer size. It will be + * applied to RTP socket of media transport using setsockopt(). When + * transport failed to set the specified size, it will try with lower + * value until the highest possible is successfully set. + * + * Setting this to zero will leave the socket send buffer size to + * OS default (e.g: usually 8 KB on desktop platforms). + * + * Default: 64 KB when video is enabled, otherwise zero (OS default) + */ +#ifndef PJMEDIA_TRANSPORT_SO_SNDBUF_SIZE +# if PJMEDIA_HAS_VIDEO +# define PJMEDIA_TRANSPORT_SO_SNDBUF_SIZE (64*1024) +# else +# define PJMEDIA_TRANSPORT_SO_SNDBUF_SIZE 0 +# endif +#endif + + +/** * @} */ |