Ignore:
Timestamp:
Jun 25, 2008 9:16:46 PM (16 years ago)
Author:
bennylp
Message:

Optimize the number of characters written to SDP by ICE

File:
1 edited

Legend:

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

    r2043 r2054  
    4646}; 
    4747 
    48 /* Candidate preference default values */ 
    49 #define SRFLX_PREF  65535 
    50 #define HOST_PREF   65530 
    51 #define RELAY_PREF  65525 
     48/* Candidate's local preference values. This is mostly used to 
     49 * specify preference among candidates with the same type. Since 
     50 * we don't have the facility to specify that, we'll just set it 
     51 * all to zero. 
     52 */ 
     53#define SRFLX_PREF  0 
     54#define HOST_PREF   0 
     55#define RELAY_PREF  0 
     56 
     57/* The candidate type preference when STUN candidate is used */ 
     58static pj_uint8_t srflx_pref_table[4] =  
     59{ 
     60    /* Keep it to 2 bits */ 
     61    1,  /**< PJ_ICE_HOST_PREF       */ 
     62    2,  /**< PJ_ICE_SRFLX_PREF      */ 
     63    3,  /**< PJ_ICE_PRFLX_PREF      */ 
     64    0   /**< PJ_ICE_RELAYED_PREF    */ 
     65}; 
    5266 
    5367 
     
    640654    ice_st->ice->user_data = (void*)ice_st; 
    641655 
    642 #if 0 
    643656    /* If default candidate for components are SRFLX one, upload a custom 
    644657     * type priority to ICE session so that SRFLX candidates will get 
     
    649662            == PJ_ICE_CAND_TYPE_SRFLX) 
    650663    { 
    651         pj_ice_sess_set_prefs(ice_st->ice, srflx_prio); 
    652     } 
    653 #endif 
     664        pj_ice_sess_set_prefs(ice_st->ice, srflx_pref_table); 
     665    } 
    654666 
    655667    /* Add components/candidates */ 
Note: See TracChangeset for help on using the changeset viewer.