~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.0.1/pjsip-apps/src/pjsystest/systest.h

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (1.1.11)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: package-import@ubuntu.com-20140128182336-3xenud1kbnwmf3mz
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: systest.h 3553 2011-05-05 06:14:19Z nanang $ */
2
 
/*
3
 
 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
4
 
 *
5
 
 * This program is free software; you can redistribute it and/or modify
6
 
 * it under the terms of the GNU General Public License as published by
7
 
 * the Free Software Foundation; either version 2 of the License, or
8
 
 * (at your option) any later version.
9
 
 *
10
 
 * This program is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 * GNU General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU General Public License
16
 
 * along with this program; if not, write to the Free Software
17
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 
 */
19
 
#ifndef __SYSTEST_H__
20
 
#define __SYSTEST_H__
21
 
 
22
 
#include <pjlib.h>
23
 
 
24
 
/*
25
 
 * Overrideable parameters
26
 
 */
27
 
#define REC_DEV_ID                      systest_cap_dev_id
28
 
#define PLAY_DEV_ID                     systest_play_dev_id
29
 
//#define REC_DEV_ID                    5
30
 
//#define PLAY_DEV_ID                   5
31
 
#define OVERRIDE_AUDDEV_REC_LAT         0
32
 
#define OVERRIDE_AUDDEV_PLAY_LAT        0
33
 
#define OVERRIDE_AUD_FRAME_PTIME        0
34
 
 
35
 
/* Don't change this */
36
 
#define CHANNEL_COUNT                   1
37
 
 
38
 
/* If you change CLOCK_RATE then the input WAV files need to be
39
 
 * changed, so normally don't need to change this.
40
 
 */
41
 
#define TEST_CLOCK_RATE                 8000
42
 
 
43
 
/* You may change sound device's clock rate as long as resampling
44
 
 * is enabled.
45
 
 */
46
 
#define DEV_CLOCK_RATE                  8000
47
 
 
48
 
 
49
 
#if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE
50
 
    #define LOG_OUT_PATH                "\\PJSYSTEST.TXT"
51
 
    #define RESULT_OUT_PATH             "\\PJSYSTEST_RESULT.TXT"
52
 
    #define WAV_PLAYBACK_PATH           "\\Program Files\\pjsystest\\input.8.wav"
53
 
    #define WAV_REC_OUT_PATH            "\\PJSYSTEST_TESTREC.WAV"
54
 
    #define WAV_TOCK8_PATH              "\\Program Files\\pjsystest\\tock8.WAV"
55
 
    #define WAV_LATENCY_OUT_PATH        "\\PJSYSTEST_LATREC.WAV"
56
 
    #define ALT_PATH1                   ""
57
 
    #define AEC_REC_PATH                "\\PJSYSTEST_AECREC.WAV"
58
 
#else
59
 
    #define LOG_OUT_PATH                "PJSYSTEST.TXT"
60
 
    #define RESULT_OUT_PATH             "PJSYSTEST_RESULT.TXT"
61
 
    #define WAV_PLAYBACK_PATH           "input.8.wav"
62
 
    #define WAV_REC_OUT_PATH            "PJSYSTEST_TESTREC.WAV"
63
 
    #define WAV_TOCK8_PATH              "tock8.wav"
64
 
    #define WAV_LATENCY_OUT_PATH        "PJSYSTEST_LATREC.WAV"
65
 
    #define ALT_PATH1                   "../../tests/pjsua/wavs/"
66
 
    #define AEC_REC_PATH                "PJSYSTEST_AECREC.WAV"
67
 
#endif
68
 
 
69
 
#ifdef __cplusplus
70
 
extern "C" {
71
 
#endif
72
 
 
73
 
/* API, to be called by main() */
74
 
int         systest_init(void);
75
 
int         systest_set_dev(int cap_dev, int play_dev);
76
 
int         systest_run(void);
77
 
void        systest_save_result(const char *filename);
78
 
void        systest_deinit(void);
79
 
 
80
 
/* Device ID to test */
81
 
extern int systest_cap_dev_id;
82
 
extern int systest_play_dev_id;
83
 
 
84
 
/* Test item is used to record the test result */
85
 
typedef struct test_item_t
86
 
{
87
 
    char        title[80];
88
 
    pj_bool_t   skipped;
89
 
    pj_bool_t   success;
90
 
    char        reason[1024];
91
 
} test_item_t;
92
 
 
93
 
#define SYSTEST_MAX_TEST    32
94
 
extern unsigned     test_item_count;
95
 
extern test_item_t  test_items[SYSTEST_MAX_TEST];
96
 
#define PATH_LENGTH         PJ_MAXPATH
97
 
extern char         doc_path[PATH_LENGTH];
98
 
extern char         res_path[PATH_LENGTH];
99
 
 
100
 
test_item_t *systest_alloc_test_item(const char *title);
101
 
 
102
 
#ifdef __cplusplus
103
 
}
104
 
#endif
105
 
 
106
 
#endif  /* __SYSTEST_H__ */