Changeset 1990 for pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
- Timestamp:
- Jun 6, 2008 2:51:48 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r1976 r1990 171 171 puts (""); 172 172 puts ("Media Options:"); 173 puts (" --use-ice Enable ICE (default:no)");174 173 puts (" --add-codec=name Manually add codec (default is to enable all)"); 175 174 puts (" --dis-codec=name Disable codec (can be specified multiple times)"); … … 189 188 puts (" --rec-file=file Open file recorder (extension can be .wav or .mp3"); 190 189 puts (" --auto-rec Automatically record conversation"); 191 puts (" --rtp-port=N Base port to try for RTP (default=4000)");192 190 puts (" --quality=N Specify media quality (0-10, default=6)"); 193 191 puts (" --ptime=MSEC Override codec ptime to MSEC (default=specific)"); … … 195 193 puts (" --ec-tail=MSEC Set echo canceller tail length (default=256)"); 196 194 puts (" --ilbc-mode=MODE Set iLBC codec mode (20 or 30, default is 20)"); 195 puts (" --capture-dev=id Audio capture device ID (default=-1)"); 196 puts (" --playback-dev=id Audio playback device ID (default=-1)"); 197 198 puts (""); 199 puts ("Media Transport Options:"); 200 puts (" --use-ice Enable ICE (default:no)"); 201 puts (" --ice-no-host Disable ICE host candidates"); 202 puts (" --rtp-port=N Base port to try for RTP (default=4000)"); 197 203 puts (" --rx-drop-pct=PCT Drop PCT percent of RX RTP (for pkt lost sim, default: 0)"); 198 204 puts (" --tx-drop-pct=PCT Drop PCT percent of TX RTP (for pkt lost sim, default: 0)"); 199 puts (" --capture-dev=id Audio capture device ID (default=-1)"); 200 puts (" --playback-dev=id Audio playback device ID (default=-1)"); 201 205 puts (" --use-turn Enable TURN relay with ICE (default:no)"); 206 puts (" --turn-srv Domain or host name of TURN server (\"NAME:PORT\" format)"); 207 puts (" --turn-tcp Use TCP connection to TURN server (default no)"); 208 puts (" --turn-user TURN username"); 209 puts (" --turn-passwd TURN password"); 202 210 203 211 puts (""); … … 393 401 OPT_AUTO_CONF, OPT_CLOCK_RATE, OPT_SND_CLOCK_RATE, OPT_STEREO, 394 402 OPT_USE_ICE, OPT_USE_SRTP, OPT_SRTP_SECURE, 403 OPT_USE_TURN,OPT_ICE_NO_HOST, OPT_TURN_SRV, OPT_TURN_TCP, 404 OPT_TURN_USER, OPT_TURN_PASSWD, 395 405 OPT_PLAY_FILE, OPT_PLAY_TONE, OPT_RTP_PORT, OPT_ADD_CODEC, 396 406 OPT_ILBC_MODE, OPT_REC_FILE, OPT_AUTO_REC, … … 452 462 { "rec-file", 1, 0, OPT_REC_FILE}, 453 463 { "rtp-port", 1, 0, OPT_RTP_PORT}, 464 454 465 { "use-ice", 0, 0, OPT_USE_ICE}, 466 { "use-turn", 0, 0, OPT_USE_TURN}, 467 { "ice-no-host",0, 0, OPT_ICE_NO_HOST}, 468 { "turn-srv", 1, 0, OPT_TURN_SRV}, 469 { "turn-tcp", 0, 0, OPT_TURN_TCP}, 470 { "turn-user", 1, 0, OPT_TURN_USER}, 471 { "turn-passwd",1, 0, OPT_TURN_PASSWD}, 472 455 473 #if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 456 474 { "use-srtp", 1, 0, OPT_USE_SRTP}, … … 826 844 break; 827 845 846 case OPT_USE_TURN: 847 cfg->media_cfg.enable_turn = PJ_TRUE; 848 break; 849 850 case OPT_ICE_NO_HOST: 851 cfg->media_cfg.ice_no_host_cands = PJ_TRUE; 852 break; 853 854 case OPT_TURN_SRV: 855 cfg->media_cfg.turn_server = pj_str(pj_optarg); 856 break; 857 858 case OPT_TURN_TCP: 859 cfg->media_cfg.turn_conn_type = PJ_TURN_TP_TCP; 860 break; 861 862 case OPT_TURN_USER: 863 cfg->media_cfg.turn_auth_cred.type = PJ_STUN_AUTH_CRED_STATIC; 864 cfg->media_cfg.turn_auth_cred.data.static_cred.realm = pj_str("*"); 865 cfg->media_cfg.turn_auth_cred.data.static_cred.username = pj_str(pj_optarg); 866 break; 867 868 case OPT_TURN_PASSWD: 869 cfg->media_cfg.turn_auth_cred.data.static_cred.data_type = PJ_STUN_PASSWD_PLAIN; 870 cfg->media_cfg.turn_auth_cred.data.static_cred.data = pj_str(pj_optarg); 871 break; 872 828 873 #if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 829 874 case OPT_USE_SRTP: … … 1360 1405 #endif 1361 1406 1362 /* Media */1407 /* Media Transport*/ 1363 1408 if (config->media_cfg.enable_ice) 1364 1409 pj_strcat2(&cfg, "--use-ice\n"); 1410 1411 if (config->media_cfg.enable_turn) 1412 pj_strcat2(&cfg, "--use-turn\n"); 1413 1414 if (config->media_cfg.ice_no_host_cands) 1415 pj_strcat2(&cfg, "--ice-no-host\n"); 1416 1417 if (config->media_cfg.turn_server.slen) { 1418 pj_ansi_sprintf(line, "--turn-srv %.*s\n", 1419 (int)config->media_cfg.turn_server.slen, 1420 config->media_cfg.turn_server.ptr); 1421 pj_strcat2(&cfg, line); 1422 } 1423 1424 if (config->media_cfg.turn_conn_type == PJ_TURN_TP_TCP) 1425 pj_strcat2(&cfg, "--turn-tcp\n"); 1426 1427 if (config->media_cfg.turn_auth_cred.data.static_cred.username.slen) { 1428 pj_ansi_sprintf(line, "--turn-user %.*s\n", 1429 (int)config->media_cfg.turn_auth_cred.data.static_cred.username.slen, 1430 config->media_cfg.turn_auth_cred.data.static_cred.username.ptr); 1431 pj_strcat2(&cfg, line); 1432 } 1433 1434 if (config->media_cfg.turn_auth_cred.data.static_cred.data.slen) { 1435 pj_ansi_sprintf(line, "--turn-passwd %.*s\n", 1436 (int)config->media_cfg.turn_auth_cred.data.static_cred.data.slen, 1437 config->media_cfg.turn_auth_cred.data.static_cred.data.ptr); 1438 pj_strcat2(&cfg, line); 1439 } 1440 1441 /* Media */ 1365 1442 if (config->null_audio) 1366 1443 pj_strcat2(&cfg, "--null-audio\n");
Note: See TracChangeset
for help on using the changeset viewer.