diff options
author | Benny Prijono <bennylp@teluu.com> | 2009-07-16 10:36:48 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2009-07-16 10:36:48 +0000 |
commit | 5d0127a9b3b7159206918142986f67b9489b71ec (patch) | |
tree | 7b5dcbfd13162ac8d362c87f47f724ec25349cce /pjsip-apps/src/pjsystest/systest.h | |
parent | c7b0bd5a2320cc342474e5713adb00f92532aa23 (diff) |
Ticket #920: New pjsystest application for testing target system/device. Initial work on Win32 and WM
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2835 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps/src/pjsystest/systest.h')
-rw-r--r-- | pjsip-apps/src/pjsystest/systest.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/pjsip-apps/src/pjsystest/systest.h b/pjsip-apps/src/pjsystest/systest.h new file mode 100644 index 00000000..487944da --- /dev/null +++ b/pjsip-apps/src/pjsystest/systest.h @@ -0,0 +1,58 @@ +#ifndef __SYSTEST_H__ +#define __SYSTEST_H__ + +#include <pjlib.h> + +/* + * Overrideable parameters + */ +#define OVERRIDE_AUDDEV_REC_LAT 100 +#define OVERRIDE_AUDDEV_PLAY_LAT 200 +#define OVERRIDE_AUD_FRAME_PTIME 0 +#define CLOCK_RATE 8000 +#define CHANNEL_COUNT 1 + +#if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE + #define LOG_OUT_PATH "\\PJSYSTEST.LOG" + #define RESULT_OUT_PATH "\\PJSYSTEST_RESULT.TXT" + #define WAV_PLAYBACK_PATH "\\Program Files\\pjsystest\\input.8.wav" + #define WAV_REC_OUT_PATH "\\PJSYSTEST_TESTREC.WAV" + #define WAV_TOCK8_PATH "\\Program Files\\pjsystest\\tock8.WAV" + #define WAV_LATENCY_OUT_PATH "\\PJSYSTEST_LATREC.WAV" +#else + #define LOG_OUT_PATH "PJSYSTEST.LOG" + #define RESULT_OUT_PATH "PJSYSTEST.TXT" + #define WAV_PLAYBACK_PATH "pjsip8.wav" + #define WAV_REC_OUT_PATH "TESTREC.WAV" + #define WAV_TOCK8_PATH "TOCK8.WAV" + #define WAV_LATENCY_OUT_PATH "LATENCY.WAV" +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +int systest_init(void); +int systest_run(void); +void systest_save_result(const char *filename); +void systest_deinit(void); + +typedef struct test_item_t +{ + char title[80]; + pj_bool_t skipped; + pj_bool_t success; + char reason[1024]; +} test_item_t; + +#define SYSTEST_MAX_TEST 32 +extern unsigned test_item_count; +extern test_item_t test_items[SYSTEST_MAX_TEST]; + +test_item_t *systest_alloc_test_item(const char *title); + +#ifdef __cplusplus +} +#endif + +#endif /* __SYSTEST_H__ */ |