- Timestamp:
- Mar 30, 2010 11:42:51 AM (15 years ago)
- Location:
- pjproject/branches/projects/iphone/pjsip-apps/src
- Files:
-
- 16 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/iphone/pjsip-apps/src/pjsystest/systest.c
r2991 r3129 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 } … … 330 340 static void systest_play_wav1(void) 331 341 { 332 const char *paths[] = { WAV_PLAYBACK_PATH,342 const char *paths[] = { add_path(res_path, WAV_PLAYBACK_PATH), 333 343 ALT_PATH1 WAV_PLAYBACK_PATH }; 334 344 systest_play_wav(PJ_ARRAY_SIZE(paths), paths); … … 337 347 static void systest_play_wav2(void) 338 348 { 339 const char *paths[] = { WAV_TOCK8_PATH,349 const char *paths[] = { add_path(res_path, WAV_TOCK8_PATH), 340 350 ALT_PATH1 WAV_TOCK8_PATH}; 341 351 systest_play_wav(PJ_ARRAY_SIZE(paths), paths); … … 348 358 static void systest_rec_audio(void) 349 359 { 350 const pj_str_t filename = pj_str( WAV_REC_OUT_PATH);360 const pj_str_t filename = pj_str(add_path(doc_path, WAV_REC_OUT_PATH)); 351 361 pj_pool_t *pool = NULL; 352 362 enum gui_key key; … … 733 743 static void systest_latency_test(void) 734 744 { 735 const char *ref_wav_paths[] = { WAV_TOCK8_PATH, ALT_PATH1 WAV_TOCK8_PATH };736 const pj_str_t rec_wav_file = pj_str(WAV_LATENCY_OUT_PATH);745 const char *ref_wav_paths[] = { add_path(res_path, WAV_TOCK8_PATH), ALT_PATH1 WAV_TOCK8_PATH }; 746 pj_str_t rec_wav_file; 737 747 pjsua_player_id play_id = PJSUA_INVALID_ID; 738 748 pjsua_conf_port_id play_slot = PJSUA_INVALID_ID; … … 782 792 play_slot = pjsua_player_get_conf_port(play_id); 783 793 794 rec_wav_file = pj_str(add_path(doc_path, WAV_LATENCY_OUT_PATH)); 784 795 status = pjsua_recorder_create(&rec_wav_file, 0, NULL, -1, 0, &rec_id); 785 796 if (status != PJ_SUCCESS) … … 1058 1069 1059 1070 pjsua_logging_config_default(&log_cfg); 1060 log_cfg.log_filename = pj_str( LOG_OUT_PATH);1071 log_cfg.log_filename = pj_str(add_path(doc_path, LOG_OUT_PATH)); 1061 1072 1062 1073 pjsua_config_default(&systest.ua_cfg); -
pjproject/branches/projects/iphone/pjsip-apps/src/pjsystest/systest.h
r2991 r3129 87 87 extern unsigned test_item_count; 88 88 extern test_item_t test_items[SYSTEST_MAX_TEST]; 89 #define PATH_LENGTH 128 90 extern char doc_path[PATH_LENGTH]; 91 extern char res_path[PATH_LENGTH]; 89 92 90 93 test_item_t *systest_alloc_test_item(const char *title);
Note: See TracChangeset
for help on using the changeset viewer.