~ubuntu-branches/ubuntu/saucy/sflphone/saucy-proposed

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.0.1/pjmedia/include/pjmedia-codec/config.h

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2013-06-30 11:40:56 UTC
  • mfrom: (20.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20130630114056-i0rz9ibang07g7qr
Tags: 1.2.3-2
* changeset_r92d62cfc54732bbbcfff2b1d36c096b120b981a5.diff 
  - fixes automatic endian detection 
* Update Vcs: fixes vcs-field-not-canonical

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: config.h 4070 2012-04-23 13:48:10Z bennylp $ */
 
2
/*
 
3
 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
 
4
 * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation; either version 2 of the License, or
 
9
 * (at your option) any later version.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the Free Software
 
18
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
19
 */
 
20
#ifndef __PJMEDIA_CODEC_CONFIG_H__
 
21
#define __PJMEDIA_CODEC_CONFIG_H__
 
22
 
 
23
/**
 
24
 * @file config.h
 
25
 * @brief PJMEDIA-CODEC compile time settings
 
26
 */
 
27
 
 
28
/**
 
29
 * @defgroup pjmedia_codec_config PJMEDIA-CODEC Compile Time Settings
 
30
 * @ingroup PJMEDIA_CODEC
 
31
 * @brief Various compile time settings such as to enable/disable codecs
 
32
 * @{
 
33
 */
 
34
 
 
35
#include <pjmedia/types.h>
 
36
 
 
37
/*
 
38
 * Include config_auto.h if autoconf is used (PJ_AUTOCONF is set)
 
39
 */
 
40
#if defined(PJ_AUTOCONF)
 
41
#   include <pjmedia-codec/config_auto.h>
 
42
#endif
 
43
 
 
44
 
 
45
/**
 
46
 * Unless specified otherwise, L16 codec is included by default.
 
47
 */
 
48
#ifndef PJMEDIA_HAS_L16_CODEC
 
49
#   define PJMEDIA_HAS_L16_CODEC    1
 
50
#endif
 
51
 
 
52
 
 
53
/**
 
54
 * Unless specified otherwise, GSM codec is included by default.
 
55
 */
 
56
#ifndef PJMEDIA_HAS_GSM_CODEC
 
57
#   define PJMEDIA_HAS_GSM_CODEC    1
 
58
#endif
 
59
 
 
60
 
 
61
/**
 
62
 * Unless specified otherwise, Speex codec is included by default.
 
63
 */
 
64
#ifndef PJMEDIA_HAS_SPEEX_CODEC
 
65
#   define PJMEDIA_HAS_SPEEX_CODEC    1
 
66
#endif
 
67
 
 
68
/**
 
69
 * Speex codec default complexity setting.
 
70
 */
 
71
#ifndef PJMEDIA_CODEC_SPEEX_DEFAULT_COMPLEXITY
 
72
#   define PJMEDIA_CODEC_SPEEX_DEFAULT_COMPLEXITY   2
 
73
#endif
 
74
 
 
75
/**
 
76
 * Speex codec default quality setting. Please note that pjsua-lib may override
 
77
 * this setting via its codec quality setting (i.e PJSUA_DEFAULT_CODEC_QUALITY).
 
78
 */
 
79
#ifndef PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY
 
80
#   define PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY      8
 
81
#endif
 
82
 
 
83
 
 
84
/**
 
85
 * Unless specified otherwise, iLBC codec is included by default.
 
86
 */
 
87
#ifndef PJMEDIA_HAS_ILBC_CODEC
 
88
#   define PJMEDIA_HAS_ILBC_CODEC    1
 
89
#endif
 
90
 
 
91
 
 
92
/**
 
93
 * Unless specified otherwise, G.722 codec is included by default.
 
94
 */
 
95
#ifndef PJMEDIA_HAS_G722_CODEC
 
96
#   define PJMEDIA_HAS_G722_CODEC    1
 
97
#endif
 
98
 
 
99
 
 
100
/**
 
101
 * Default G.722 codec encoder and decoder level adjustment. The G.722
 
102
 * specifies that it uses 14 bit PCM for input and output, while PJMEDIA
 
103
 * normally uses 16 bit PCM, so the conversion is done by applying
 
104
 * level adjustment. If the value is non-zero, then PCM input samples to
 
105
 * the encoder will be shifted right by this value, and similarly PCM
 
106
 * output samples from the decoder will be shifted left by this value.
 
107
 *
 
108
 * This can be changed at run-time after initialization by calling
 
109
 * #pjmedia_codec_g722_set_pcm_shift().
 
110
 *
 
111
 * Default: 2.
 
112
 */
 
113
#ifndef PJMEDIA_G722_DEFAULT_PCM_SHIFT
 
114
#   define PJMEDIA_G722_DEFAULT_PCM_SHIFT           2
 
115
#endif
 
116
 
 
117
 
 
118
/**
 
119
 * Specifies whether G.722 PCM shifting should be stopped when clipping
 
120
 * detected in the decoder. Enabling this feature can be useful when
 
121
 * talking to G.722 implementation that uses 16 bit PCM for G.722 input/
 
122
 * output (for any reason it seems to work) and the PCM shifting causes
 
123
 * audio clipping.
 
124
 *
 
125
 * See also #PJMEDIA_G722_DEFAULT_PCM_SHIFT.
 
126
 *
 
127
 * Default: enabled.
 
128
 */
 
129
#ifndef PJMEDIA_G722_STOP_PCM_SHIFT_ON_CLIPPING
 
130
#   define PJMEDIA_G722_STOP_PCM_SHIFT_ON_CLIPPING  1
 
131
#endif
 
132
 
 
133
 
 
134
/**
 
135
 * Enable the features provided by Intel IPP libraries, for example
 
136
 * codecs such as G.729, G.723.1, G.726, G.728, G.722.1, and AMR.
 
137
 *
 
138
 * By default this is disabled. Please follow the instructions in
 
139
 * http://trac.pjsip.org/repos/wiki/Intel_IPP_Codecs on how to setup
 
140
 * Intel IPP with PJMEDIA.
 
141
 */
 
142
#ifndef PJMEDIA_HAS_INTEL_IPP
 
143
#   define PJMEDIA_HAS_INTEL_IPP                0
 
144
#endif
 
145
 
 
146
 
 
147
/**
 
148
 * Visual Studio only: when this option is set, the Intel IPP libraries
 
149
 * will be automatically linked to application using pragma(comment)
 
150
 * constructs. This is convenient, however it will only link with
 
151
 * the stub libraries and the Intel IPP DLL's will be required when
 
152
 * distributing the application.
 
153
 *
 
154
 * If application wants to link with the different types of the Intel IPP
 
155
 * libraries (for example, the static libraries), it must set this option
 
156
 * to zero and specify the Intel IPP libraries in the application's input
 
157
 * library specification manually.
 
158
 *
 
159
 * Default 1.
 
160
 */
 
161
#ifndef PJMEDIA_AUTO_LINK_IPP_LIBS
 
162
#   define PJMEDIA_AUTO_LINK_IPP_LIBS           1
 
163
#endif
 
164
 
 
165
 
 
166
/**
 
167
 * Enable Intel IPP AMR codec. This also needs to be enabled when AMR WB
 
168
 * codec is enabled. This option is only used when PJMEDIA_HAS_INTEL_IPP
 
169
 * is enabled.
 
170
 *
 
171
 * Default: 1
 
172
 */
 
173
#ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_AMR
 
174
#   define PJMEDIA_HAS_INTEL_IPP_CODEC_AMR      1
 
175
#endif
 
176
 
 
177
 
 
178
/**
 
179
 * Enable Intel IPP AMR wideband codec. The PJMEDIA_HAS_INTEL_IPP_CODEC_AMR
 
180
 * option must also be enabled to use this codec. This option is only used
 
181
 * when PJMEDIA_HAS_INTEL_IPP is enabled.
 
182
 *
 
183
 * Default: 1
 
184
 */
 
185
#ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_AMRWB
 
186
#   define PJMEDIA_HAS_INTEL_IPP_CODEC_AMRWB    1
 
187
#endif
 
188
 
 
189
 
 
190
/**
 
191
 * Enable Intel IPP G.729 codec. This option is only used when
 
192
 * PJMEDIA_HAS_INTEL_IPP is enabled.
 
193
 *
 
194
 * Default: 1
 
195
 */
 
196
#ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_G729
 
197
#   define PJMEDIA_HAS_INTEL_IPP_CODEC_G729     1
 
198
#endif
 
199
 
 
200
 
 
201
/**
 
202
 * Enable Intel IPP G.723.1 codec. This option is only used when
 
203
 * PJMEDIA_HAS_INTEL_IPP is enabled.
 
204
 *
 
205
 * Default: 1
 
206
 */
 
207
#ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_G723_1
 
208
#   define PJMEDIA_HAS_INTEL_IPP_CODEC_G723_1   1
 
209
#endif
 
210
 
 
211
 
 
212
/**
 
213
 * Enable Intel IPP G.726 codec. This option is only used when
 
214
 * PJMEDIA_HAS_INTEL_IPP is enabled.
 
215
 *
 
216
 * Default: 1
 
217
 */
 
218
#ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_G726
 
219
#   define PJMEDIA_HAS_INTEL_IPP_CODEC_G726     1
 
220
#endif
 
221
 
 
222
 
 
223
/**
 
224
 * Enable Intel IPP G.728 codec. This option is only used when
 
225
 * PJMEDIA_HAS_INTEL_IPP is enabled.
 
226
 *
 
227
 * Default: 1
 
228
 */
 
229
#ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_G728
 
230
#   define PJMEDIA_HAS_INTEL_IPP_CODEC_G728     1
 
231
#endif
 
232
 
 
233
 
 
234
/**
 
235
 * Enable Intel IPP G.722.1 codec. This option is only used when
 
236
 * PJMEDIA_HAS_INTEL_IPP is enabled.
 
237
 *
 
238
 * Default: 1
 
239
 */
 
240
#ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_G722_1
 
241
#   define PJMEDIA_HAS_INTEL_IPP_CODEC_G722_1   1
 
242
#endif
 
243
 
 
244
/**
 
245
 * Enable Passthrough codecs.
 
246
 *
 
247
 * Default: 0
 
248
 */
 
249
#ifndef PJMEDIA_HAS_PASSTHROUGH_CODECS
 
250
#   define PJMEDIA_HAS_PASSTHROUGH_CODECS       0
 
251
#endif
 
252
 
 
253
/**
 
254
 * Enable AMR passthrough codec.
 
255
 *
 
256
 * Default: 1
 
257
 */
 
258
#ifndef PJMEDIA_HAS_PASSTHROUGH_CODEC_AMR
 
259
#   define PJMEDIA_HAS_PASSTHROUGH_CODEC_AMR    1
 
260
#endif
 
261
 
 
262
/**
 
263
 * Enable G.729 passthrough codec.
 
264
 *
 
265
 * Default: 1
 
266
 */
 
267
#ifndef PJMEDIA_HAS_PASSTHROUGH_CODEC_G729
 
268
#   define PJMEDIA_HAS_PASSTHROUGH_CODEC_G729   1
 
269
#endif
 
270
 
 
271
/**
 
272
 * Enable iLBC passthrough codec.
 
273
 *
 
274
 * Default: 1
 
275
 */
 
276
#ifndef PJMEDIA_HAS_PASSTHROUGH_CODEC_ILBC
 
277
#   define PJMEDIA_HAS_PASSTHROUGH_CODEC_ILBC   1
 
278
#endif
 
279
 
 
280
/**
 
281
 * Enable PCMU passthrough codec.
 
282
 *
 
283
 * Default: 1
 
284
 */
 
285
#ifndef PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMU
 
286
#   define PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMU   1
 
287
#endif
 
288
 
 
289
/**
 
290
 * Enable PCMA passthrough codec.
 
291
 *
 
292
 * Default: 1
 
293
 */
 
294
#ifndef PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMA
 
295
#   define PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMA   1
 
296
#endif
 
297
 
 
298
/* If passthrough and PCMU/PCMA are enabled, disable the software
 
299
 * G.711 codec
 
300
 */
 
301
#if PJMEDIA_HAS_PASSTHROUGH_CODECS && \
 
302
    (PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMU || PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMA)
 
303
#   undef PJMEDIA_HAS_G711_CODEC
 
304
#   define PJMEDIA_HAS_G711_CODEC               0
 
305
#endif
 
306
 
 
307
 
 
308
/**
 
309
 * G.722.1 codec is disabled by default.
 
310
 */
 
311
#ifndef PJMEDIA_HAS_G7221_CODEC
 
312
#   define PJMEDIA_HAS_G7221_CODEC              0
 
313
#endif
 
314
 
 
315
/**
 
316
 * Enable OpenCORE AMR-NB codec.
 
317
 * See https://trac.pjsip.org/repos/ticket/1388 for some info.
 
318
 *
 
319
 * Default: 0
 
320
 */
 
321
#ifndef PJMEDIA_HAS_OPENCORE_AMRNB_CODEC
 
322
#   define PJMEDIA_HAS_OPENCORE_AMRNB_CODEC     0
 
323
#endif
 
324
 
 
325
/**
 
326
 * Link with libopencore-amrXX via pragma comment on Visual Studio.
 
327
 * This option only makes sense if PJMEDIA_HAS_OPENCORE_AMRNB_CODEC
 
328
 * is enabled.
 
329
 *
 
330
 * Default: 1
 
331
 */
 
332
#ifndef PJMEDIA_AUTO_LINK_OPENCORE_AMR_LIBS
 
333
#  define PJMEDIA_AUTO_LINK_OPENCORE_AMR_LIBS   1
 
334
#endif
 
335
 
 
336
/**
 
337
 * Link with libopencore-amrXX.a that has been produced with gcc.
 
338
 * This option only makes sense if PJMEDIA_HAS_OPENCORE_AMRNB_CODEC
 
339
 * and PJMEDIA_AUTO_LINK_OPENCORE_AMR_LIBS are enabled.
 
340
 *
 
341
 * Default: 1
 
342
 */
 
343
#ifndef PJMEDIA_OPENCORE_AMR_BUILT_WITH_GCC
 
344
#   define PJMEDIA_OPENCORE_AMR_BUILT_WITH_GCC  1
 
345
#endif
 
346
 
 
347
 
 
348
/**
 
349
 * Default G.722.1 codec encoder and decoder level adjustment.
 
350
 * If the value is non-zero, then PCM input samples to the encoder will
 
351
 * be shifted right by this value, and similarly PCM output samples from
 
352
 * the decoder will be shifted left by this value.
 
353
 *
 
354
 * This can be changed at run-time after initialization by calling
 
355
 * #pjmedia_codec_g7221_set_pcm_shift().
 
356
 */
 
357
#ifndef PJMEDIA_G7221_DEFAULT_PCM_SHIFT
 
358
#   define PJMEDIA_G7221_DEFAULT_PCM_SHIFT      1
 
359
#endif
 
360
 
 
361
 
 
362
/**
 
363
 * Enabling both G.722.1 codec implementations, internal PJMEDIA and IPP,
 
364
 * may cause problem in SDP, i.e: payload types duplications. So, let's
 
365
 * just trap such case here at compile time.
 
366
 *
 
367
 * Application can control which implementation to be used by manipulating
 
368
 * PJMEDIA_HAS_G7221_CODEC and PJMEDIA_HAS_INTEL_IPP_CODEC_G722_1 in
 
369
 * config_site.h.
 
370
 */
 
371
#if (PJMEDIA_HAS_G7221_CODEC != 0) && (PJMEDIA_HAS_INTEL_IPP != 0) && \
 
372
    (PJMEDIA_HAS_INTEL_IPP_CODEC_G722_1 != 0)
 
373
#   error Only one G.722.1 implementation can be enabled at the same time. \
 
374
          Please use PJMEDIA_HAS_G7221_CODEC and \
 
375
          PJMEDIA_HAS_INTEL_IPP_CODEC_G722_1 in your config_site.h \
 
376
          to control which implementation to be used.
 
377
#endif
 
378
 
 
379
 
 
380
/**
 
381
 * Specify if FFMPEG codecs are available.
 
382
 *
 
383
 * Default: PJMEDIA_HAS_LIBAVCODEC
 
384
 */
 
385
#ifndef PJMEDIA_HAS_FFMPEG_CODEC
 
386
#   define PJMEDIA_HAS_FFMPEG_CODEC             PJMEDIA_HAS_LIBAVCODEC
 
387
#endif
 
388
 
 
389
 
 
390
/**
 
391
 * Specify if FFMPEG video codecs are available.
 
392
 *
 
393
 * Default: PJMEDIA_HAS_FFMPEG_CODEC
 
394
 */
 
395
#ifndef PJMEDIA_HAS_FFMPEG_VID_CODEC
 
396
#   define PJMEDIA_HAS_FFMPEG_VID_CODEC         PJMEDIA_HAS_FFMPEG_CODEC
 
397
#endif
 
398
 
 
399
/**
 
400
 * Enable FFMPEG H263+/H263-1998 codec.
 
401
 *
 
402
 * Default: 1
 
403
 */
 
404
#ifndef PJMEDIA_HAS_FFMPEG_CODEC_H263P
 
405
#   define PJMEDIA_HAS_FFMPEG_CODEC_H263P       PJMEDIA_HAS_FFMPEG_VID_CODEC
 
406
#endif
 
407
 
 
408
/**
 
409
 * Enable FFMPEG H264 codec (requires libx264).
 
410
 *
 
411
 * Default: 0
 
412
 */
 
413
#ifndef PJMEDIA_HAS_FFMPEG_CODEC_H264
 
414
#   define PJMEDIA_HAS_FFMPEG_CODEC_H264        PJMEDIA_HAS_FFMPEG_VID_CODEC
 
415
#endif
 
416
 
 
417
/**
 
418
 * @}
 
419
 */
 
420
 
 
421
 
 
422
 
 
423
#endif  /* __PJMEDIA_CODEC_CONFIG_H__ */