Changeset 3175 for pjproject/trunk/pjsip-apps/src/pjsystest/systest.c
- Timestamp:
- May 17, 2010 1:07:39 PM (14 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk
- Property svn:mergeinfo changed
/pjproject/branches/projects/iphone merged: 3129-3130,3137,3166,3168-3171
- Property svn:mergeinfo changed
-
pjproject/trunk/pjsip-apps/src/pjsystest/systest.c
r3164 r3175 24 24 unsigned test_item_count; 25 25 test_item_t test_items[SYSTEST_MAX_TEST]; 26 char doc_path[PATH_LENGTH] = {0}; 27 char res_path[PATH_LENGTH] = {0}; 28 char fpath[PATH_LENGTH]; 26 29 27 30 #define USER_ERROR "User used said not okay" … … 83 86 /*****************************************************************/ 84 87 88 PJ_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 85 95 static void exit_app(void) 86 96 { 87 systest_save_result( RESULT_OUT_PATH);97 systest_save_result(add_path(doc_path, RESULT_OUT_PATH)); 88 98 gui_destroy(); 89 99 } … … 334 344 static void systest_play_wav1(void) 335 345 { 336 const char *paths[] = { WAV_PLAYBACK_PATH,346 const char *paths[] = { add_path(res_path, WAV_PLAYBACK_PATH), 337 347 ALT_PATH1 WAV_PLAYBACK_PATH }; 338 348 systest_play_wav(PJ_ARRAY_SIZE(paths), paths); … … 341 351 static void systest_play_wav2(void) 342 352 { 343 const char *paths[] = { WAV_TOCK8_PATH,353 const char *paths[] = { add_path(res_path, WAV_TOCK8_PATH), 344 354 ALT_PATH1 WAV_TOCK8_PATH}; 345 355 systest_play_wav(PJ_ARRAY_SIZE(paths), paths); … … 352 362 static void systest_rec_audio(void) 353 363 { 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)); 355 365 pj_pool_t *pool = NULL; 356 366 enum gui_key key; … … 737 747 static void systest_latency_test(void) 738 748 { 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; 741 751 pjsua_player_id play_id = PJSUA_INVALID_ID; 742 752 pjsua_conf_port_id play_slot = PJSUA_INVALID_ID; … … 786 796 play_slot = pjsua_player_get_conf_port(play_id); 787 797 798 rec_wav_file = pj_str(add_path(doc_path, WAV_LATENCY_OUT_PATH)); 788 799 status = pjsua_recorder_create(&rec_wav_file, 0, NULL, -1, 0, &rec_id); 789 800 if (status != PJ_SUCCESS) … … 1062 1073 1063 1074 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)); 1065 1076 1066 1077 pjsua_config_default(&systest.ua_cfg);
Note: See TracChangeset
for help on using the changeset viewer.