Changeset 782


Ignore:
Timestamp:
Oct 19, 2006 3:48:02 PM (18 years ago)
Author:
bennylp
Message:

Fixed miscellaneous warnings with gcc compilation

Location:
pjproject/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/sdp_neg.c

    r738 r782  
    537537                            or.clock_rate == ar.clock_rate && 
    538538                            (pj_stricmp(&or.param, &ar.param)==0 || 
    539                              ar.param.slen==1 && *ar.param.ptr=='1')) 
     539                             (ar.param.slen==1 && *ar.param.ptr=='1'))) 
    540540                        { 
    541541                            /* Match! */ 
     
    731731                            or.clock_rate == lr.clock_rate && 
    732732                            (pj_strcmp(&or.param, &lr.param)==0 || 
    733                              or.param.slen==1 && *or.param.ptr=='1'))  
     733                             (or.param.slen==1 && *or.param.ptr=='1')))  
    734734                        { 
    735735                            /* Match! */ 
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c

    r780 r782  
    6464    pj_bool_t               auto_loop; 
    6565    pj_bool_t               auto_conf; 
     66    pj_str_t                rec_file; 
     67    pj_bool_t               auto_rec; 
     68    pjsua_recorder_id       rec_id; 
     69    pjsua_conf_port_id      rec_port; 
    6670    unsigned                ptime; 
    6771    unsigned                auto_answer; 
     
    139143    puts  ("  --clock-rate=N      Override sound device clock rate"); 
    140144    puts  ("  --null-audio        Use NULL audio device"); 
    141     puts  ("  --play-file=file    Play WAV file in conference bridge"); 
     145    puts  ("  --play-file=file    Register WAV file in conference bridge"); 
    142146    puts  ("  --auto-play         Automatically play the file (to incoming calls only)"); 
    143147    puts  ("  --auto-loop         Automatically loop incoming RTP to outgoing RTP"); 
    144148    puts  ("  --auto-conf         Automatically put calls in conference with others"); 
     149    puts  ("  --rec-file=file     Open file recorder (extension can be .wav or .mp3"); 
     150    puts  ("  --auto-rec          Automatically record conversation"); 
    145151    puts  ("  --rtp-port=N        Base port to try for RTP (default=4000)"); 
    146152    puts  ("  --quality=N         Specify media quality (0-10, default=6)"); 
     
    189195    cfg->duration = NO_LIMIT; 
    190196    cfg->wav_id = PJSUA_INVALID_ID; 
     197    cfg->rec_id = PJSUA_INVALID_ID; 
    191198    cfg->wav_port = PJSUA_INVALID_ID; 
     199    cfg->rec_port = PJSUA_INVALID_ID; 
    192200} 
    193201 
     
    286294           OPT_AUTO_CONF, OPT_CLOCK_RATE, 
    287295           OPT_PLAY_FILE, OPT_RTP_PORT, OPT_ADD_CODEC, OPT_ILBC_MODE, 
     296           OPT_REC_FILE, OPT_AUTO_REC, 
    288297           OPT_COMPLEXITY, OPT_QUALITY, OPT_PTIME, OPT_NO_VAD, 
    289298           OPT_RX_DROP_PCT, OPT_TX_DROP_PCT, OPT_EC_TAIL, 
     
    325334        { "auto-hangup",1, 0, OPT_AUTO_HANGUP}, 
    326335        { "auto-play",  0, 0, OPT_AUTO_PLAY}, 
     336        { "auto-rec",   0, 0, OPT_AUTO_REC}, 
    327337        { "auto-loop",  0, 0, OPT_AUTO_LOOP}, 
    328338        { "auto-conf",  0, 0, OPT_AUTO_CONF}, 
    329339        { "play-file",  1, 0, OPT_PLAY_FILE}, 
     340        { "rec-file",   1, 0, OPT_REC_FILE}, 
    330341        { "rtp-port",   1, 0, OPT_RTP_PORT}, 
    331342        { "add-codec",  1, 0, OPT_ADD_CODEC}, 
     
    626637            break; 
    627638 
     639        case OPT_AUTO_REC: 
     640            cfg->auto_rec = 1; 
     641            break; 
     642 
    628643        case OPT_AUTO_LOOP: 
    629644            cfg->auto_loop = 1; 
     
    636651        case OPT_PLAY_FILE: 
    637652            cfg->wav_file = pj_str(pj_optarg); 
     653            break; 
     654 
     655        case OPT_REC_FILE: 
     656            cfg->rec_file = pj_str(pj_optarg); 
    638657            break; 
    639658 
     
    10011020        pj_strcat2(&cfg, line); 
    10021021    } 
     1022    if (config->rec_file.slen) { 
     1023        pj_ansi_sprintf(line, "--rec-file %s\n", 
     1024                        config->rec_file.ptr); 
     1025        pj_strcat2(&cfg, line); 
     1026    } 
     1027    if (config->auto_rec) 
     1028        pj_strcat2(&cfg, "--auto-rec\n"); 
     1029 
     1030 
    10031031    /* Media clock rate. */ 
    10041032    if (config->media_cfg.clock_rate != PJSUA_DEFAULT_CLOCK_RATE) { 
     
    13751403            pjsua_conf_connect(call_info.conf_slot, call_info.conf_slot); 
    13761404            connect_sound = PJ_FALSE; 
     1405 
     1406            /* Automatically record conversation, if desired */ 
     1407            if (app_config.auto_rec && app_config.rec_port != PJSUA_INVALID_ID) { 
     1408                pjsua_conf_connect(call_info.conf_slot, app_config.rec_port); 
     1409            } 
    13771410        } 
    13781411 
     
    14051438                pjsua_conf_connect(pjsua_call_get_conf_port(call_ids[i]), 
    14061439                                   call_info.conf_slot); 
     1440 
     1441                /* Automatically record conversation, if desired */ 
     1442                if (app_config.auto_rec && app_config.rec_port != PJSUA_INVALID_ID) { 
     1443                    pjsua_conf_connect(pjsua_call_get_conf_port(call_ids[i]),  
     1444                                       app_config.rec_port); 
     1445                } 
     1446 
    14071447            } 
    14081448 
     
    14151455            pjsua_conf_connect(call_info.conf_slot, 0); 
    14161456            pjsua_conf_connect(0, call_info.conf_slot); 
     1457 
     1458            /* Automatically record conversation, if desired */ 
     1459            if (app_config.auto_rec && app_config.rec_port != PJSUA_INVALID_ID) { 
     1460                pjsua_conf_connect(call_info.conf_slot, app_config.rec_port); 
     1461                pjsua_conf_connect(0, app_config.rec_port); 
     1462            } 
    14171463        } 
    14181464 
     
    25352581    } 
    25362582 
     2583    /* Optionally create recorder file, if any. */ 
     2584    if (app_config.rec_file.slen) { 
     2585        status = pjsua_recorder_create(&app_config.rec_file, 0, NULL, 0, 0, 
     2586                                       &app_config.rec_id); 
     2587        if (status != PJ_SUCCESS) 
     2588            goto on_error; 
     2589 
     2590        app_config.rec_port = pjsua_recorder_get_conf_port(app_config.rec_id); 
     2591    } 
    25372592 
    25382593    /* Add TCP transport unless it's disabled */ 
  • pjproject/trunk/pjsip/src/pjsip/sip_resolve.c

    r753 r782  
    125125    pj_assert(!"Resolver is disabled (PJSIP_HAS_RESOLVER==0)"); 
    126126    return PJ_EINVALIDOP; 
    127 #endif; 
     127#endif 
    128128} 
    129129 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r780 r782  
    7474static void xfer_client_on_evsub_state( pjsip_evsub *sub, pjsip_event *event); 
    7575static void xfer_server_on_evsub_state( pjsip_evsub *sub, pjsip_event *event); 
    76  
    77 /* 
    78  * Callback called by event framework when NOTIFY is received for outgoing 
    79  * REFER subscription. 
    80  */ 
    81 static void xfer_on_rx_notify(pjsip_evsub *sub,  
    82                               pjsip_rx_data *rdata, 
    83                               int *p_st_code, 
    84                               pj_str_t **p_st_text, 
    85                               pjsip_hdr *res_hdr, 
    86                               pjsip_msg_body **p_body); 
    8776 
    8877/* 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c

    r753 r782  
    12281228        case PJSIP_TRANSPORT_TCP: 
    12291229            break; 
     1230        default: 
     1231            break; 
    12301232        } 
    12311233         
     
    12371239            return (*pjsua_var.tpdata[id].data.factory->destroy) 
    12381240                        (pjsua_var.tpdata[id].data.factory); 
     1241        default: 
     1242            break; 
    12391243        } 
    12401244    } 
Note: See TracChangeset for help on using the changeset viewer.