Ignore:
Timestamp:
May 18, 2009 5:49:37 AM (15 years ago)
Author:
bennylp
Message:

More ticket #851: propagated ICE regular nomination option up to pjsua

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/sipit24/pjsip-apps/src/pjsua/pjsua_app.c

    r2706 r2707  
    265265    puts  ("Media Transport Options:"); 
    266266    puts  ("  --use-ice           Enable ICE (default:no)"); 
    267     puts  ("  --ice-no-host       Disable ICE host candidates (default: no)"); 
     267    puts  ("  --ice-regular       Use ICE regular nomination (default: aggressive)"); 
     268    puts  ("  --ice-max-hosts=N   Set maximum number of ICE host candidates"); 
    268269    puts  ("  --ice-no-rtcp       Disable RTCP component in ICE (default: no)"); 
    269270    puts  ("  --rtp-port=N        Base port to try for RTP (default=4000)"); 
     
    477478           OPT_AUTO_ANSWER, OPT_AUTO_PLAY, OPT_AUTO_PLAY_HANGUP, OPT_AUTO_LOOP, 
    478479           OPT_AUTO_CONF, OPT_CLOCK_RATE, OPT_SND_CLOCK_RATE, OPT_STEREO, 
    479            OPT_USE_ICE, OPT_USE_SRTP, OPT_SRTP_SECURE, 
    480            OPT_USE_TURN, OPT_ICE_NO_HOST, OPT_ICE_NO_RTCP, OPT_TURN_SRV,  
     480           OPT_USE_ICE, OPT_ICE_REGULAR, OPT_USE_SRTP, OPT_SRTP_SECURE, 
     481           OPT_USE_TURN, OPT_ICE_MAX_HOSTS, OPT_ICE_NO_RTCP, OPT_TURN_SRV,  
    481482           OPT_TURN_TCP, OPT_TURN_USER, OPT_TURN_PASSWD, 
    482483           OPT_PLAY_FILE, OPT_PLAY_TONE, OPT_RTP_PORT, OPT_ADD_CODEC,  
     
    554555 
    555556        { "use-ice",    0, 0, OPT_USE_ICE}, 
     557        { "ice-regular",0, 0, OPT_ICE_REGULAR}, 
    556558        { "use-turn",   0, 0, OPT_USE_TURN}, 
    557         { "ice-no-host",0, 0, OPT_ICE_NO_HOST}, 
     559        { "ice-max-hosts",1, 0, OPT_ICE_MAX_HOSTS}, 
    558560        { "ice-no-rtcp",0, 0, OPT_ICE_NO_RTCP}, 
    559561        { "turn-srv",   1, 0, OPT_TURN_SRV}, 
     
    993995            break; 
    994996 
     997        case OPT_ICE_REGULAR: 
     998            cfg->media_cfg.ice_opt.aggressive = PJ_FALSE; 
     999            break; 
     1000 
    9951001        case OPT_USE_TURN: 
    9961002            cfg->media_cfg.enable_turn = PJ_TRUE; 
    9971003            break; 
    9981004 
    999         case OPT_ICE_NO_HOST: 
    1000             cfg->media_cfg.ice_no_host_cands = PJ_TRUE; 
     1005        case OPT_ICE_MAX_HOSTS: 
     1006            cfg->media_cfg.ice_max_host_cands = my_atoi(pj_optarg); 
    10011007            break; 
    10021008 
     
    16451651        pj_strcat2(&cfg, "--use-ice\n"); 
    16461652 
     1653    if (config->media_cfg.ice_opt.aggressive == PJ_FALSE) 
     1654        pj_strcat2(&cfg, "--ice-regular\n"); 
     1655 
    16471656    if (config->media_cfg.enable_turn) 
    16481657        pj_strcat2(&cfg, "--use-turn\n"); 
    16491658 
    1650     if (config->media_cfg.ice_no_host_cands) 
    1651         pj_strcat2(&cfg, "--ice-no-host\n"); 
     1659    if (config->media_cfg.ice_max_host_cands >= 0) { 
     1660        pj_ansi_sprintf(line, "--ice_max_host_cands %d\n", 
     1661                        config->media_cfg.ice_max_host_cands); 
     1662        pj_strcat2(&cfg, line); 
     1663    } 
    16521664 
    16531665    if (config->media_cfg.ice_no_rtcp) 
     
    18861898    } 
    18871899 
    1888     if (config->cfg.force_lr) { 
     1900    if (!config->cfg.force_lr) { 
    18891901        pj_strcat2(&cfg, "--no-force-lr\n"); 
    18901902    } 
Note: See TracChangeset for help on using the changeset viewer.