Ignore:
Timestamp:
Jul 31, 2006 3:19:36 PM (18 years ago)
Author:
bennylp
Message:
  • Added iLBC codec (experimental) with the following features:
    • configurable default decoder mode (20 or 30),
    • encoder mode follows the mode specified in SDP fmtp from the remote's SDP,
    • silence detector uses pjmedia's,
    • PLC uses iLBC's PLC,
    • perceptual enhancement (penh) is configurable via codec param, as usual.
  • iLBC mode is configurable in pjsua with --ilbc-mode option.
  • Added packet lost simulation in pjmedia's UDP transport and in pjsua (with --rx-drop-pct and --tx-drop-pct options).
  • Increase default buffer count in DirectSound? to 32 frames to make it more resilient to CPU disruption.
  • Specify and parse fmtp mode in SDP for codecs that need it.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c

    r632 r637  
    124124    puts  ("  --auto-loop         Automatically loop incoming RTP to outgoing RTP"); 
    125125    puts  ("  --rtp-port=N        Base port to try for RTP (default=4000)"); 
    126     puts  ("  --quality=N         Specify media quality (0-10, default=10)"); 
     126    puts  ("  --quality=N         Specify media quality (0-10, default=6)"); 
    127127    puts  ("  --ptime=MSEC        Override codec ptime to MSEC (default=specific)"); 
    128128    puts  ("  --no-vad            Disable VAD/silence detector (default=vad enabled)"); 
     129    puts  ("  --ilbc-mode=MODE    Set iLBC codec mode (20 or 30, default is 20)"); 
     130    puts  ("  --rx-drop-pct=PCT   Drop PCT percent of RX RTP (for pkt lost sim, default: 0)"); 
     131    puts  ("  --tx-drop-pct=PCT   Drop PCT percent of TX RTP (for pkt lost sim, default: 0)"); 
     132 
    129133 
    130134    puts  (""); 
     
    256260           OPT_AUTO_ANSWER, OPT_AUTO_HANGUP, OPT_AUTO_PLAY, OPT_AUTO_LOOP, 
    257261           OPT_AUTO_CONF, OPT_CLOCK_RATE, 
    258            OPT_PLAY_FILE, OPT_RTP_PORT, OPT_ADD_CODEC, 
     262           OPT_PLAY_FILE, OPT_RTP_PORT, OPT_ADD_CODEC, OPT_ILBC_MODE, 
    259263           OPT_COMPLEXITY, OPT_QUALITY, OPT_PTIME, OPT_NO_VAD, 
     264           OPT_RX_DROP_PCT, OPT_TX_DROP_PCT, 
    260265           OPT_NEXT_ACCOUNT, OPT_NEXT_CRED, OPT_MAX_CALLS,  
    261266           OPT_DURATION, OPT_NO_TCP, OPT_NO_UDP, 
     
    299304        { "ptime",      1, 0, OPT_PTIME}, 
    300305        { "no-vad",     0, 0, OPT_NO_VAD}, 
     306        { "ilbc-mode",  1, 0, OPT_ILBC_MODE}, 
     307        { "rx-drop-pct",1, 0, OPT_RX_DROP_PCT}, 
     308        { "tx-drop-pct",1, 0, OPT_TX_DROP_PCT}, 
    301309        { "next-account",0,0, OPT_NEXT_ACCOUNT}, 
    302310        { "next-cred",  0, 0, OPT_NEXT_CRED}, 
     
    621629                PJ_LOG(1,(THIS_FILE, 
    622630                          "Error: invalid --quality (expecting 0-10")); 
     631                return -1; 
     632            } 
     633            break; 
     634 
     635        case OPT_ILBC_MODE: 
     636            cfg->media_cfg.ilbc_mode = my_atoi(pj_optarg); 
     637            if (cfg->media_cfg.ilbc_mode!=20 && cfg->media_cfg.ilbc_mode!=30) { 
     638                PJ_LOG(1,(THIS_FILE, 
     639                          "Error: invalid --ilbc-mode (expecting 20 or 30")); 
     640                return -1; 
     641            } 
     642            break; 
     643 
     644        case OPT_RX_DROP_PCT: 
     645            cfg->media_cfg.rx_drop_pct = my_atoi(pj_optarg); 
     646            if (cfg->media_cfg.rx_drop_pct > 100) { 
     647                PJ_LOG(1,(THIS_FILE, 
     648                          "Error: invalid --rx-drop-pct (expecting <= 100")); 
     649                return -1; 
     650            } 
     651            break; 
     652             
     653        case OPT_TX_DROP_PCT: 
     654            cfg->media_cfg.tx_drop_pct = my_atoi(pj_optarg); 
     655            if (cfg->media_cfg.tx_drop_pct > 100) { 
     656                PJ_LOG(1,(THIS_FILE, 
     657                          "Error: invalid --tx-drop-pct (expecting <= 100")); 
    623658                return -1; 
    624659            } 
Note: See TracChangeset for help on using the changeset viewer.