Ignore:
Timestamp:
Oct 25, 2009 9:02:07 AM (15 years ago)
Author:
bennylp
Message:

Initial commit for ticket #950: QoS support:

  • implementation:
    • PJLIB (sock_qos*.*)
  • added QoS support in:
    • SIP UDP transport,
    • SIP TCP transport,
    • media UDP transport (done in pjsua-lib),
    • pjnath ICE stream transport,
    • pjnath STUN socket,
    • pjnath TURN client
  • added QoS options in pjsua-lib:
    • QoS fields in pjsua_transport_config
  • added "--set-qos" parameter in pjsua

Notes:

  • QoS in TLS transport is not yet implemented, waiting for #957
  • build ok on VS6, VS2005 (multiple targets), Carbide, and Mingw
  • no run-time testing yet
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjnath/ice_strans.c

    r2945 r2966  
    212212    pj_stun_sock_cfg_default(&cfg->stun.cfg); 
    213213    pj_turn_alloc_param_default(&cfg->turn.alloc_param); 
     214    pj_turn_sock_cfg_default(&cfg->turn.cfg); 
    214215 
    215216    pj_ice_sess_options_default(&cfg->opt); 
     
    274275        stun_sock_cb.on_data_sent = &stun_on_data_sent; 
    275276         
     277        /* Override component specific QoS settings, if any */ 
     278        if (ice_st->cfg.comp[comp_id-1].qos_type) { 
     279            ice_st->cfg.stun.cfg.qos_type =  
     280                ice_st->cfg.comp[comp_id-1].qos_type; 
     281        } 
     282        if (ice_st->cfg.comp[comp_id-1].qos_params.flags) { 
     283            pj_memcpy(&ice_st->cfg.stun.cfg.qos_params, 
     284                      &ice_st->cfg.comp[comp_id-1].qos_params, 
     285                      sizeof(ice_st->cfg.stun.cfg.qos_params)); 
     286        } 
     287 
    276288        /* Create the STUN transport */ 
    277289        status = pj_stun_sock_create(&ice_st->cfg.stun_cfg, NULL, 
     
    392404        turn_sock_cb.on_state = &turn_on_state; 
    393405 
     406        /* Override with component specific QoS settings, if any */ 
     407        if (ice_st->cfg.comp[comp_id-1].qos_type) { 
     408            ice_st->cfg.turn.cfg.qos_type =  
     409                ice_st->cfg.comp[comp_id-1].qos_type; 
     410        } 
     411        if (ice_st->cfg.comp[comp_id-1].qos_params.flags) { 
     412            pj_memcpy(&ice_st->cfg.turn.cfg.qos_params, 
     413                      &ice_st->cfg.comp[comp_id-1].qos_params, 
     414                      sizeof(ice_st->cfg.turn.cfg.qos_params)); 
     415        } 
     416 
     417        /* Create the TURN transport */ 
    394418        status = pj_turn_sock_create(&ice_st->cfg.stun_cfg, ice_st->cfg.af, 
    395419                                     ice_st->cfg.turn.conn_type, 
    396                                      &turn_sock_cb, 0, comp,  
    397                                      &comp->turn_sock); 
     420                                     &turn_sock_cb, &ice_st->cfg.turn.cfg,  
     421                                     comp, &comp->turn_sock); 
    398422        if (status != PJ_SUCCESS) { 
    399423            return status; 
     
    454478        return status; 
    455479 
    456     PJ_ASSERT_RETURN(comp_cnt && cb && p_ice_st, PJ_EINVAL); 
     480    PJ_ASSERT_RETURN(comp_cnt && cb && p_ice_st && 
     481                     comp_cnt <= PJ_ICE_MAX_COMP , PJ_EINVAL); 
    457482 
    458483    if (name == NULL) 
Note: See TracChangeset for help on using the changeset viewer.