Ignore:
Timestamp:
Jun 19, 2013 9:06:55 AM (7 years ago)
Author:
nanang
Message:

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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/transport_ice.c

    r4350 r4538  
    226226    pj_pool_t *pool; 
    227227    pj_ice_strans_cb ice_st_cb; 
     228    pj_ice_strans_cfg ice_st_cfg; 
    228229    struct transport_ice *tp_ice; 
    229230    pj_status_t status; 
     
    246247    tp_ice->use_ice = PJ_FALSE; 
    247248 
     249    pj_memcpy(&ice_st_cfg, cfg, sizeof(pj_ice_strans_cfg)); 
    248250    if (cb) 
    249251        pj_memcpy(&tp_ice->cb, cb, sizeof(pjmedia_ice_cb)); 
     
    259261    ice_st_cb.on_rx_data = &ice_on_rx_data; 
    260262 
     263    /* Configure RTP socket buffer settings, if not set */ 
     264    if (ice_st_cfg.comp[COMP_RTP-1].so_rcvbuf_size == 0) { 
     265        ice_st_cfg.comp[COMP_RTP-1].so_rcvbuf_size =  
     266                            PJMEDIA_TRANSPORT_SO_RCVBUF_SIZE; 
     267    } 
     268    if (ice_st_cfg.comp[COMP_RTP-1].so_sndbuf_size == 0) { 
     269        ice_st_cfg.comp[COMP_RTP-1].so_sndbuf_size =  
     270                            PJMEDIA_TRANSPORT_SO_SNDBUF_SIZE; 
     271    } 
     272 
    261273    /* Create ICE */ 
    262     status = pj_ice_strans_create(name, cfg, comp_cnt, tp_ice,  
     274    status = pj_ice_strans_create(name, &ice_st_cfg, comp_cnt, tp_ice,  
    263275                                  &ice_st_cb, &tp_ice->ice_st); 
    264276    if (status != PJ_SUCCESS) { 
Note: See TracChangeset for help on using the changeset viewer.