1
/* $Id: config.h 4070 2012-04-23 13:48:10Z bennylp $ */
3
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
4
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
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.
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.
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
20
#ifndef __PJMEDIA_CODEC_CONFIG_H__
21
#define __PJMEDIA_CODEC_CONFIG_H__
25
* @brief PJMEDIA-CODEC compile time settings
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
35
#include <pjmedia/types.h>
38
* Include config_auto.h if autoconf is used (PJ_AUTOCONF is set)
40
#if defined(PJ_AUTOCONF)
41
# include <pjmedia-codec/config_auto.h>
46
* Unless specified otherwise, L16 codec is included by default.
48
#ifndef PJMEDIA_HAS_L16_CODEC
49
# define PJMEDIA_HAS_L16_CODEC 1
54
* Unless specified otherwise, GSM codec is included by default.
56
#ifndef PJMEDIA_HAS_GSM_CODEC
57
# define PJMEDIA_HAS_GSM_CODEC 1
62
* Unless specified otherwise, Speex codec is included by default.
64
#ifndef PJMEDIA_HAS_SPEEX_CODEC
65
# define PJMEDIA_HAS_SPEEX_CODEC 1
69
* Speex codec default complexity setting.
71
#ifndef PJMEDIA_CODEC_SPEEX_DEFAULT_COMPLEXITY
72
# define PJMEDIA_CODEC_SPEEX_DEFAULT_COMPLEXITY 2
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).
79
#ifndef PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY
80
# define PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY 8
85
* Unless specified otherwise, iLBC codec is included by default.
87
#ifndef PJMEDIA_HAS_ILBC_CODEC
88
# define PJMEDIA_HAS_ILBC_CODEC 1
93
* Unless specified otherwise, G.722 codec is included by default.
95
#ifndef PJMEDIA_HAS_G722_CODEC
96
# define PJMEDIA_HAS_G722_CODEC 1
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.
108
* This can be changed at run-time after initialization by calling
109
* #pjmedia_codec_g722_set_pcm_shift().
113
#ifndef PJMEDIA_G722_DEFAULT_PCM_SHIFT
114
# define PJMEDIA_G722_DEFAULT_PCM_SHIFT 2
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
125
* See also #PJMEDIA_G722_DEFAULT_PCM_SHIFT.
129
#ifndef PJMEDIA_G722_STOP_PCM_SHIFT_ON_CLIPPING
130
# define PJMEDIA_G722_STOP_PCM_SHIFT_ON_CLIPPING 1
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.
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.
142
#ifndef PJMEDIA_HAS_INTEL_IPP
143
# define PJMEDIA_HAS_INTEL_IPP 0
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.
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.
161
#ifndef PJMEDIA_AUTO_LINK_IPP_LIBS
162
# define PJMEDIA_AUTO_LINK_IPP_LIBS 1
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
173
#ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_AMR
174
# define PJMEDIA_HAS_INTEL_IPP_CODEC_AMR 1
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.
185
#ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_AMRWB
186
# define PJMEDIA_HAS_INTEL_IPP_CODEC_AMRWB 1
191
* Enable Intel IPP G.729 codec. This option is only used when
192
* PJMEDIA_HAS_INTEL_IPP is enabled.
196
#ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_G729
197
# define PJMEDIA_HAS_INTEL_IPP_CODEC_G729 1
202
* Enable Intel IPP G.723.1 codec. This option is only used when
203
* PJMEDIA_HAS_INTEL_IPP is enabled.
207
#ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_G723_1
208
# define PJMEDIA_HAS_INTEL_IPP_CODEC_G723_1 1
213
* Enable Intel IPP G.726 codec. This option is only used when
214
* PJMEDIA_HAS_INTEL_IPP is enabled.
218
#ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_G726
219
# define PJMEDIA_HAS_INTEL_IPP_CODEC_G726 1
224
* Enable Intel IPP G.728 codec. This option is only used when
225
* PJMEDIA_HAS_INTEL_IPP is enabled.
229
#ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_G728
230
# define PJMEDIA_HAS_INTEL_IPP_CODEC_G728 1
235
* Enable Intel IPP G.722.1 codec. This option is only used when
236
* PJMEDIA_HAS_INTEL_IPP is enabled.
240
#ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_G722_1
241
# define PJMEDIA_HAS_INTEL_IPP_CODEC_G722_1 1
245
* Enable Passthrough codecs.
249
#ifndef PJMEDIA_HAS_PASSTHROUGH_CODECS
250
# define PJMEDIA_HAS_PASSTHROUGH_CODECS 0
254
* Enable AMR passthrough codec.
258
#ifndef PJMEDIA_HAS_PASSTHROUGH_CODEC_AMR
259
# define PJMEDIA_HAS_PASSTHROUGH_CODEC_AMR 1
263
* Enable G.729 passthrough codec.
267
#ifndef PJMEDIA_HAS_PASSTHROUGH_CODEC_G729
268
# define PJMEDIA_HAS_PASSTHROUGH_CODEC_G729 1
272
* Enable iLBC passthrough codec.
276
#ifndef PJMEDIA_HAS_PASSTHROUGH_CODEC_ILBC
277
# define PJMEDIA_HAS_PASSTHROUGH_CODEC_ILBC 1
281
* Enable PCMU passthrough codec.
285
#ifndef PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMU
286
# define PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMU 1
290
* Enable PCMA passthrough codec.
294
#ifndef PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMA
295
# define PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMA 1
298
/* If passthrough and PCMU/PCMA are enabled, disable the software
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
309
* G.722.1 codec is disabled by default.
311
#ifndef PJMEDIA_HAS_G7221_CODEC
312
# define PJMEDIA_HAS_G7221_CODEC 0
316
* Enable OpenCORE AMR-NB codec.
317
* See https://trac.pjsip.org/repos/ticket/1388 for some info.
321
#ifndef PJMEDIA_HAS_OPENCORE_AMRNB_CODEC
322
# define PJMEDIA_HAS_OPENCORE_AMRNB_CODEC 0
326
* Link with libopencore-amrXX via pragma comment on Visual Studio.
327
* This option only makes sense if PJMEDIA_HAS_OPENCORE_AMRNB_CODEC
332
#ifndef PJMEDIA_AUTO_LINK_OPENCORE_AMR_LIBS
333
# define PJMEDIA_AUTO_LINK_OPENCORE_AMR_LIBS 1
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.
343
#ifndef PJMEDIA_OPENCORE_AMR_BUILT_WITH_GCC
344
# define PJMEDIA_OPENCORE_AMR_BUILT_WITH_GCC 1
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.
354
* This can be changed at run-time after initialization by calling
355
* #pjmedia_codec_g7221_set_pcm_shift().
357
#ifndef PJMEDIA_G7221_DEFAULT_PCM_SHIFT
358
# define PJMEDIA_G7221_DEFAULT_PCM_SHIFT 1
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.
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
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.
381
* Specify if FFMPEG codecs are available.
383
* Default: PJMEDIA_HAS_LIBAVCODEC
385
#ifndef PJMEDIA_HAS_FFMPEG_CODEC
386
# define PJMEDIA_HAS_FFMPEG_CODEC PJMEDIA_HAS_LIBAVCODEC
391
* Specify if FFMPEG video codecs are available.
393
* Default: PJMEDIA_HAS_FFMPEG_CODEC
395
#ifndef PJMEDIA_HAS_FFMPEG_VID_CODEC
396
# define PJMEDIA_HAS_FFMPEG_VID_CODEC PJMEDIA_HAS_FFMPEG_CODEC
400
* Enable FFMPEG H263+/H263-1998 codec.
404
#ifndef PJMEDIA_HAS_FFMPEG_CODEC_H263P
405
# define PJMEDIA_HAS_FFMPEG_CODEC_H263P PJMEDIA_HAS_FFMPEG_VID_CODEC
409
* Enable FFMPEG H264 codec (requires libx264).
413
#ifndef PJMEDIA_HAS_FFMPEG_CODEC_H264
414
# define PJMEDIA_HAS_FFMPEG_CODEC_H264 PJMEDIA_HAS_FFMPEG_VID_CODEC
423
#endif /* __PJMEDIA_CODEC_CONFIG_H__ */