Ignore:
Timestamp:
May 17, 2010 1:07:39 PM (14 years ago)
Author:
ming
Message:

Merge #1050, #1052, #1053, #1054 into the main trunk.

Location:
pjproject/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk

  • pjproject/trunk/pjsip-apps/src/pjsystest/systest.c

    r3164 r3175  
    2424unsigned    test_item_count; 
    2525test_item_t test_items[SYSTEST_MAX_TEST]; 
     26char        doc_path[PATH_LENGTH] = {0}; 
     27char        res_path[PATH_LENGTH] = {0}; 
     28char        fpath[PATH_LENGTH]; 
    2629 
    2730#define USER_ERROR  "User used said not okay" 
     
    8386/*****************************************************************/ 
    8487 
     88PJ_INLINE(char *) add_path(const char *path, const char *fname) 
     89{ 
     90    strncpy(fpath, path, PATH_LENGTH); 
     91    strncat(fpath, fname, PATH_LENGTH); 
     92    return fpath; 
     93} 
     94 
    8595static void exit_app(void) 
    8696{ 
    87     systest_save_result(RESULT_OUT_PATH); 
     97    systest_save_result(add_path(doc_path, RESULT_OUT_PATH)); 
    8898    gui_destroy(); 
    8999} 
     
    334344static void systest_play_wav1(void) 
    335345{ 
    336     const char *paths[] = { WAV_PLAYBACK_PATH,  
     346    const char *paths[] = { add_path(res_path, WAV_PLAYBACK_PATH), 
    337347                            ALT_PATH1 WAV_PLAYBACK_PATH }; 
    338348    systest_play_wav(PJ_ARRAY_SIZE(paths), paths); 
     
    341351static void systest_play_wav2(void) 
    342352{ 
    343     const char *paths[] = { WAV_TOCK8_PATH,  
     353    const char *paths[] = { add_path(res_path, WAV_TOCK8_PATH), 
    344354                            ALT_PATH1 WAV_TOCK8_PATH}; 
    345355    systest_play_wav(PJ_ARRAY_SIZE(paths), paths); 
     
    352362static void systest_rec_audio(void) 
    353363{ 
    354     const pj_str_t filename = pj_str(WAV_REC_OUT_PATH); 
     364    const pj_str_t filename = pj_str(add_path(doc_path, WAV_REC_OUT_PATH)); 
    355365    pj_pool_t *pool = NULL; 
    356366    enum gui_key key; 
     
    737747static void systest_latency_test(void) 
    738748{ 
    739     const char *ref_wav_paths[] = { WAV_TOCK8_PATH, ALT_PATH1 WAV_TOCK8_PATH }; 
    740     const pj_str_t rec_wav_file = pj_str(WAV_LATENCY_OUT_PATH); 
     749    const char *ref_wav_paths[] = { add_path(res_path, WAV_TOCK8_PATH), ALT_PATH1 WAV_TOCK8_PATH }; 
     750    pj_str_t rec_wav_file; 
    741751    pjsua_player_id play_id = PJSUA_INVALID_ID; 
    742752    pjsua_conf_port_id play_slot = PJSUA_INVALID_ID; 
     
    786796    play_slot = pjsua_player_get_conf_port(play_id); 
    787797 
     798    rec_wav_file = pj_str(add_path(doc_path, WAV_LATENCY_OUT_PATH)); 
    788799    status = pjsua_recorder_create(&rec_wav_file, 0, NULL, -1, 0, &rec_id); 
    789800    if (status != PJ_SUCCESS) 
     
    10621073 
    10631074    pjsua_logging_config_default(&log_cfg); 
    1064     log_cfg.log_filename = pj_str(LOG_OUT_PATH); 
     1075    log_cfg.log_filename = pj_str(add_path(doc_path, LOG_OUT_PATH)); 
    10651076 
    10661077    pjsua_config_default(&systest.ua_cfg); 
Note: See TracChangeset for help on using the changeset viewer.