| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#ifndef __SYSTEST_H__ |
| 19 |
#define __SYSTEST_H__ |
| 20 |
|
| 21 |
#include <pjlib.h> |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
#define REC_DEV_ID systest_cap_dev_id |
| 27 |
#define PLAY_DEV_ID systest_play_dev_id |
| 28 |
|
| 29 |
|
| 30 |
#define OVERRIDE_AUDDEV_REC_LAT 0 |
| 31 |
#define OVERRIDE_AUDDEV_PLAY_LAT 0 |
| 32 |
#define OVERRIDE_AUD_FRAME_PTIME 0 |
| 33 |
|
| 34 |
|
| 35 |
#define CHANNEL_COUNT 1 |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
#define TEST_CLOCK_RATE 8000 |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
#define DEV_CLOCK_RATE 8000 |
| 46 |
|
| 47 |
|
| 48 |
#if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE |
| 49 |
#define LOG_OUT_PATH "\\PJSYSTEST.TXT" |
| 50 |
#define RESULT_OUT_PATH "\\PJSYSTEST_RESULT.TXT" |
| 51 |
#define WAV_PLAYBACK_PATH "\\Program Files\\pjsystest\\input.8.wav" |
| 52 |
#define WAV_REC_OUT_PATH "\\PJSYSTEST_TESTREC.WAV" |
| 53 |
#define WAV_TOCK8_PATH "\\Program Files\\pjsystest\\tock8.WAV" |
| 54 |
#define WAV_LATENCY_OUT_PATH "\\PJSYSTEST_LATREC.WAV" |
| 55 |
#define ALT_PATH1 "" |
| 56 |
#define AEC_REC_PATH "\\PJSYSTEST_AECREC.WAV" |
| 57 |
#else |
| 58 |
#define LOG_OUT_PATH "PJSYSTEST.TXT" |
| 59 |
#define RESULT_OUT_PATH "PJSYSTEST_RESULT.TXT" |
| 60 |
#define WAV_PLAYBACK_PATH "input.8.wav" |
| 61 |
#define WAV_REC_OUT_PATH "PJSYSTEST_TESTREC.WAV" |
| 62 |
#define WAV_TOCK8_PATH "tock8.wav" |
| 63 |
#define WAV_LATENCY_OUT_PATH "PJSYSTEST_LATREC.WAV" |
| 64 |
#define ALT_PATH1 "../../tests/pjsua/wavs/" |
| 65 |
#define AEC_REC_PATH "PJSYSTEST_AECREC.WAV" |
| 66 |
#endif |
| 67 |
|
| 68 |
#ifdef __cplusplus |
| 69 |
extern "C" { |
| 70 |
#endif |
| 71 |
|
| 72 |
|
| 73 |
int systest_init(void); |
| 74 |
int systest_set_dev(int cap_dev, int play_dev); |
| 75 |
int systest_run(void); |
| 76 |
void systest_save_result(const char *filename); |
| 77 |
void systest_deinit(void); |
| 78 |
|
| 79 |
|
| 80 |
extern int systest_cap_dev_id; |
| 81 |
extern int systest_play_dev_id; |
| 82 |
|
| 83 |
|
| 84 |
typedef struct test_item_t |
| 85 |
{ |
| 86 |
char title[80]; |
| 87 |
pj_bool_t skipped; |
| 88 |
pj_bool_t success; |
| 89 |
char reason[1024]; |
| 90 |
} test_item_t; |
| 91 |
|
| 92 |
#define SYSTEST_MAX_TEST 32 |
| 93 |
extern unsigned test_item_count; |
| 94 |
extern test_item_t test_items[SYSTEST_MAX_TEST]; |
| 95 |
#define PATH_LENGTH PJ_MAXPATH |
| 96 |
extern char doc_path[PATH_LENGTH]; |
| 97 |
extern char res_path[PATH_LENGTH]; |
| 98 |
|
| 99 |
test_item_t *systest_alloc_test_item(const char *title); |
| 100 |
|
| 101 |
#ifdef __cplusplus |
| 102 |
} |
| 103 |
#endif |
| 104 |
|
| 105 |
#endif |