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

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.0.1/pjmedia/include/pjmedia/config.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: config.h 4130 2012-05-17 08:35:51Z nanang $ */
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_CONFIG_H__
21
 
#define __PJMEDIA_CONFIG_H__
22
 
 
23
 
/**
24
 
 * @file pjmedia/config.h Compile time config
25
 
 * @brief Contains some compile time constants.
26
 
 */
27
 
#include <pj/config.h>
28
 
 
29
 
/**
30
 
 * @defgroup PJMEDIA_BASE Base Types and Configurations
31
 
 */
32
 
 
33
 
/**
34
 
 * @defgroup PJMEDIA_CONFIG Compile time configuration
35
 
 * @ingroup PJMEDIA_BASE
36
 
 * @brief Some compile time configuration settings.
37
 
 * @{
38
 
 */
39
 
 
40
 
/*
41
 
 * Include config_auto.h if autoconf is used (PJ_AUTOCONF is set)
42
 
 */
43
 
#if defined(PJ_AUTOCONF)
44
 
#   include <pjmedia/config_auto.h>
45
 
#endif
46
 
 
47
 
/**
48
 
 * Specify whether we prefer to use audio switch board rather than
49
 
 * conference bridge.
50
 
 *
51
 
 * Audio switch board is a kind of simplified version of conference
52
 
 * bridge, but not really the subset of conference bridge. It has
53
 
 * stricter rules on audio routing among the pjmedia ports and has
54
 
 * no audio mixing capability. The power of it is it could work with
55
 
 * encoded audio frames where conference brigde couldn't.
56
 
 *
57
 
 * Default: 0
58
 
 */
59
 
#ifndef PJMEDIA_CONF_USE_SWITCH_BOARD
60
 
#   define PJMEDIA_CONF_USE_SWITCH_BOARD    0
61
 
#endif
62
 
 
63
 
/*
64
 
 * Types of sound stream backends.
65
 
 */
66
 
 
67
 
/**
68
 
 * This macro has been deprecated in releasee 1.1. Please see
69
 
 * http://trac.pjsip.org/repos/wiki/Audio_Dev_API for more information.
70
 
 */
71
 
#if defined(PJMEDIA_SOUND_IMPLEMENTATION)
72
 
#   error PJMEDIA_SOUND_IMPLEMENTATION has been deprecated
73
 
#endif
74
 
 
75
 
/**
76
 
 * This macro has been deprecated in releasee 1.1. Please see
77
 
 * http://trac.pjsip.org/repos/wiki/Audio_Dev_API for more information.
78
 
 */
79
 
#if defined(PJMEDIA_PREFER_DIRECT_SOUND)
80
 
#   error PJMEDIA_PREFER_DIRECT_SOUND has been deprecated
81
 
#endif
82
 
 
83
 
/**
84
 
 * This macro controls whether the legacy sound device API is to be
85
 
 * implemented, for applications that still use the old sound device
86
 
 * API (sound.h). If this macro is set to non-zero, the sound_legacy.c
87
 
 * will be included in the compilation. The sound_legacy.c is an
88
 
 * implementation of old sound device (sound.h) using the new Audio
89
 
 * Device API.
90
 
 *
91
 
 * Please see http://trac.pjsip.org/repos/wiki/Audio_Dev_API for more
92
 
 * info.
93
 
 */
94
 
#ifndef PJMEDIA_HAS_LEGACY_SOUND_API
95
 
#   define PJMEDIA_HAS_LEGACY_SOUND_API     1
96
 
#endif
97
 
 
98
 
/**
99
 
 * Specify default sound device latency, in milisecond.
100
 
 */
101
 
#ifndef PJMEDIA_SND_DEFAULT_REC_LATENCY
102
 
#   define PJMEDIA_SND_DEFAULT_REC_LATENCY  100
103
 
#endif
104
 
 
105
 
/**
106
 
 * Specify default sound device latency, in milisecond.
107
 
 *
108
 
 * Default is 160ms for Windows Mobile and 140ms for other platforms.
109
 
 */
110
 
#ifndef PJMEDIA_SND_DEFAULT_PLAY_LATENCY
111
 
#   if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0
112
 
#       define PJMEDIA_SND_DEFAULT_PLAY_LATENCY     160
113
 
#   else
114
 
#       define PJMEDIA_SND_DEFAULT_PLAY_LATENCY     140
115
 
#   endif
116
 
#endif
117
 
 
118
 
 
119
 
/*
120
 
 * Types of WSOLA backend algorithm.
121
 
 */
122
 
 
123
 
/**
124
 
 * This denotes implementation of WSOLA using null algorithm. Expansion
125
 
 * will generate zero frames, and compression will just discard some
126
 
 * samples from the input.
127
 
 *
128
 
 * This type of implementation may be used as it requires the least
129
 
 * processing power.
130
 
 */
131
 
#define PJMEDIA_WSOLA_IMP_NULL              0
132
 
 
133
 
/**
134
 
 * This denotes implementation of WSOLA using fixed or floating point WSOLA
135
 
 * algorithm. This implementation provides the best quality of the result,
136
 
 * at the expense of one frame delay and intensive processing power
137
 
 * requirement.
138
 
 */
139
 
#define PJMEDIA_WSOLA_IMP_WSOLA             1
140
 
 
141
 
/**
142
 
 * This denotes implementation of WSOLA algorithm with faster waveform
143
 
 * similarity calculation. This implementation provides fair quality of
144
 
 * the result with the main advantage of low processing power requirement.
145
 
 */
146
 
#define PJMEDIA_WSOLA_IMP_WSOLA_LITE        2
147
 
 
148
 
/**
149
 
 * Specify type of Waveform based Similarity Overlap and Add (WSOLA) backend
150
 
 * implementation to be used. WSOLA is an algorithm to expand and/or compress
151
 
 * audio frames without changing the pitch, and used by the delaybuf and as PLC
152
 
 * backend algorithm.
153
 
 *
154
 
 * Default is PJMEDIA_WSOLA_IMP_WSOLA
155
 
 */
156
 
#ifndef PJMEDIA_WSOLA_IMP
157
 
#   define PJMEDIA_WSOLA_IMP                PJMEDIA_WSOLA_IMP_WSOLA
158
 
#endif
159
 
 
160
 
 
161
 
/**
162
 
 * Specify the default maximum duration of synthetic audio that is generated
163
 
 * by WSOLA. This value should be long enough to cover burst of packet losses.
164
 
 * but not too long, because as the duration increases the quality would
165
 
 * degrade considerably.
166
 
 *
167
 
 * Note that this limit is only applied when fading is enabled in the WSOLA
168
 
 * session.
169
 
 *
170
 
 * Default: 80
171
 
 */
172
 
#ifndef PJMEDIA_WSOLA_MAX_EXPAND_MSEC
173
 
#   define PJMEDIA_WSOLA_MAX_EXPAND_MSEC    80
174
 
#endif
175
 
 
176
 
 
177
 
/**
178
 
 * Specify WSOLA template length, in milliseconds. The longer the template,
179
 
 * the smoother signal to be generated at the expense of more computation
180
 
 * needed, since the algorithm will have to compare more samples to find
181
 
 * the most similar pitch.
182
 
 *
183
 
 * Default: 5
184
 
 */
185
 
#ifndef PJMEDIA_WSOLA_TEMPLATE_LENGTH_MSEC
186
 
#   define PJMEDIA_WSOLA_TEMPLATE_LENGTH_MSEC   5
187
 
#endif
188
 
 
189
 
 
190
 
/**
191
 
 * Specify WSOLA algorithm delay, in milliseconds. The algorithm delay is
192
 
 * used to merge synthetic samples with real samples in the transition
193
 
 * between real to synthetic and vice versa. The longer the delay, the
194
 
 * smoother signal to be generated, at the expense of longer latency and
195
 
 * a slighty more computation.
196
 
 *
197
 
 * Default: 5
198
 
 */
199
 
#ifndef PJMEDIA_WSOLA_DELAY_MSEC
200
 
#   define PJMEDIA_WSOLA_DELAY_MSEC         5
201
 
#endif
202
 
 
203
 
 
204
 
/**
205
 
 * Set this to non-zero to disable fade-out/in effect in the PLC when it
206
 
 * instructs WSOLA to generate synthetic frames. The use of fading may
207
 
 * or may not improve the quality of audio, depending on the nature of
208
 
 * packet loss and the type of audio input (e.g. speech vs music).
209
 
 * Disabling fading also implicitly remove the maximum limit of synthetic
210
 
 * audio samples generated by WSOLA (see PJMEDIA_WSOLA_MAX_EXPAND_MSEC).
211
 
 *
212
 
 * Default: 0
213
 
 */
214
 
#ifndef PJMEDIA_WSOLA_PLC_NO_FADING
215
 
#   define PJMEDIA_WSOLA_PLC_NO_FADING      0
216
 
#endif
217
 
 
218
 
 
219
 
/**
220
 
 * Limit the number of calls by stream to the PLC to generate synthetic
221
 
 * frames to this duration. If packets are still lost after this maximum
222
 
 * duration, silence will be generated by the stream instead. Since the
223
 
 * PLC normally should have its own limit on the maximum duration of
224
 
 * synthetic frames to be generated (for PJMEDIA's PLC, the limit is
225
 
 * PJMEDIA_WSOLA_MAX_EXPAND_MSEC), we can set this value to a large number
226
 
 * to give additional flexibility should the PLC wants to do something
227
 
 * clever with the lost frames.
228
 
 *
229
 
 * Default: 240 ms
230
 
 */
231
 
#ifndef PJMEDIA_MAX_PLC_DURATION_MSEC
232
 
#   define PJMEDIA_MAX_PLC_DURATION_MSEC    240
233
 
#endif
234
 
 
235
 
 
236
 
/**
237
 
 * Specify number of sound buffers. Larger number is better for sound
238
 
 * stability and to accommodate sound devices that are unable to send frames
239
 
 * in timely manner, however it would probably cause more audio delay (and
240
 
 * definitely will take more memory). One individual buffer is normally 10ms
241
 
 * or 20 ms long, depending on ptime settings (samples_per_frame value).
242
 
 *
243
 
 * The setting here currently is used by the conference bridge, the splitter
244
 
 * combiner port, and dsound.c.
245
 
 *
246
 
 * Default: (PJMEDIA_SND_DEFAULT_PLAY_LATENCY+20)/20
247
 
 */
248
 
#ifndef PJMEDIA_SOUND_BUFFER_COUNT
249
 
#   define PJMEDIA_SOUND_BUFFER_COUNT       ((PJMEDIA_SND_DEFAULT_PLAY_LATENCY+20)/20)
250
 
#endif
251
 
 
252
 
 
253
 
/**
254
 
 * Specify which A-law/U-law conversion algorithm to use.
255
 
 * By default the conversion algorithm uses A-law/U-law table which gives
256
 
 * the best performance, at the expense of 33 KBytes of static data.
257
 
 * If this option is disabled, a smaller but slower algorithm will be used.
258
 
 */
259
 
#ifndef PJMEDIA_HAS_ALAW_ULAW_TABLE
260
 
#   define PJMEDIA_HAS_ALAW_ULAW_TABLE      1
261
 
#endif
262
 
 
263
 
 
264
 
/**
265
 
 * Unless specified otherwise, G711 codec is included by default.
266
 
 */
267
 
#ifndef PJMEDIA_HAS_G711_CODEC
268
 
#   define PJMEDIA_HAS_G711_CODEC           1
269
 
#endif
270
 
 
271
 
 
272
 
/*
273
 
 * Warn about obsolete macros.
274
 
 *
275
 
 * PJMEDIA_HAS_SMALL_FILTER has been deprecated in 0.7.
276
 
 */
277
 
#if defined(PJMEDIA_HAS_SMALL_FILTER)
278
 
#   ifdef _MSC_VER
279
 
#       pragma message("Warning: PJMEDIA_HAS_SMALL_FILTER macro is deprecated"\
280
 
                       " and has no effect")
281
 
#   else
282
 
#       warning "PJMEDIA_HAS_SMALL_FILTER macro is deprecated and has no effect"
283
 
#   endif
284
 
#endif
285
 
 
286
 
 
287
 
/*
288
 
 * Warn about obsolete macros.
289
 
 *
290
 
 * PJMEDIA_HAS_LARGE_FILTER has been deprecated in 0.7.
291
 
 */
292
 
#if defined(PJMEDIA_HAS_LARGE_FILTER)
293
 
#   ifdef _MSC_VER
294
 
#       pragma message("Warning: PJMEDIA_HAS_LARGE_FILTER macro is deprecated"\
295
 
                       " and has no effect")
296
 
#   else
297
 
#       warning "PJMEDIA_HAS_LARGE_FILTER macro is deprecated"
298
 
#   endif
299
 
#endif
300
 
 
301
 
 
302
 
/*
303
 
 * These macros are obsolete in 0.7.1 so it will trigger compilation error.
304
 
 * Please use PJMEDIA_RESAMPLE_IMP to select the resample implementation
305
 
 * to use.
306
 
 */
307
 
#ifdef PJMEDIA_HAS_LIBRESAMPLE
308
 
#   error "PJMEDIA_HAS_LIBRESAMPLE macro is deprecated. Use '#define PJMEDIA_RESAMPLE_IMP PJMEDIA_RESAMPLE_LIBRESAMPLE'"
309
 
#endif
310
 
 
311
 
#ifdef PJMEDIA_HAS_SPEEX_RESAMPLE
312
 
#   error "PJMEDIA_HAS_SPEEX_RESAMPLE macro is deprecated. Use '#define PJMEDIA_RESAMPLE_IMP PJMEDIA_RESAMPLE_SPEEX'"
313
 
#endif
314
 
 
315
 
 
316
 
/*
317
 
 * Sample rate conversion backends.
318
 
 * Select one of these backends in PJMEDIA_RESAMPLE_IMP.
319
 
 */
320
 
#define PJMEDIA_RESAMPLE_NONE               1   /**< No resampling.         */
321
 
#define PJMEDIA_RESAMPLE_LIBRESAMPLE        2   /**< Sample rate conversion
322
 
                                                     using libresample.  */
323
 
#define PJMEDIA_RESAMPLE_SPEEX              3   /**< Sample rate conversion
324
 
                                                     using Speex. */
325
 
#define PJMEDIA_RESAMPLE_LIBSAMPLERATE      4   /**< Sample rate conversion
326
 
                                                     using libsamplerate
327
 
                                                     (a.k.a Secret Rabbit Code)
328
 
                                                 */
329
 
 
330
 
/**
331
 
 * Select which resample implementation to use. Currently pjmedia supports:
332
 
 *  - #PJMEDIA_RESAMPLE_LIBRESAMPLE, to use libresample-1.7, this is the default
333
 
 *    implementation to be used.
334
 
 *  - #PJMEDIA_RESAMPLE_LIBSAMPLERATE, to use libsamplerate implementation
335
 
 *    (a.k.a. Secret Rabbit Code).
336
 
 *  - #PJMEDIA_RESAMPLE_SPEEX, to use experimental sample rate conversion in
337
 
 *    Speex library.
338
 
 *  - #PJMEDIA_RESAMPLE_NONE, to disable sample rate conversion. Any calls to
339
 
 *    resample function will return error.
340
 
 *
341
 
 * Default is PJMEDIA_RESAMPLE_LIBRESAMPLE
342
 
 */
343
 
#ifndef PJMEDIA_RESAMPLE_IMP
344
 
#   define PJMEDIA_RESAMPLE_IMP             PJMEDIA_RESAMPLE_LIBRESAMPLE
345
 
#endif
346
 
 
347
 
 
348
 
/**
349
 
 * Specify whether libsamplerate, when used, should be linked statically
350
 
 * into the application. This option is only useful for Visual Studio
351
 
 * projects, and when this static linking is enabled
352
 
 */
353
 
 
354
 
 
355
 
/**
356
 
 * Default file player/writer buffer size.
357
 
 */
358
 
#ifndef PJMEDIA_FILE_PORT_BUFSIZE
359
 
#   define PJMEDIA_FILE_PORT_BUFSIZE            4000
360
 
#endif
361
 
 
362
 
 
363
 
/**
364
 
 * Maximum frame duration (in msec) to be supported.
365
 
 * This (among other thing) will affect the size of buffers to be allocated
366
 
 * for outgoing packets.
367
 
 */
368
 
#ifndef PJMEDIA_MAX_FRAME_DURATION_MS
369
 
#   define PJMEDIA_MAX_FRAME_DURATION_MS        200
370
 
#endif
371
 
 
372
 
 
373
 
/**
374
 
 * Max packet size to support.
375
 
 */
376
 
#ifndef PJMEDIA_MAX_MTU
377
 
#  define PJMEDIA_MAX_MTU                       1500
378
 
#endif
379
 
 
380
 
 
381
 
/**
382
 
 * DTMF/telephone-event duration, in timestamp.
383
 
 */
384
 
#ifndef PJMEDIA_DTMF_DURATION
385
 
#  define PJMEDIA_DTMF_DURATION                 1600    /* in timestamp */
386
 
#endif
387
 
 
388
 
 
389
 
/**
390
 
 * Number of RTP packets received from different source IP address from the
391
 
 * remote address required to make the stream switch transmission
392
 
 * to the source address.
393
 
 */
394
 
#ifndef PJMEDIA_RTP_NAT_PROBATION_CNT
395
 
#  define PJMEDIA_RTP_NAT_PROBATION_CNT         10
396
 
#endif
397
 
 
398
 
 
399
 
/**
400
 
 * Number of RTCP packets received from different source IP address from the
401
 
 * remote address required to make the stream switch RTCP transmission
402
 
 * to the source address.
403
 
 */
404
 
#ifndef PJMEDIA_RTCP_NAT_PROBATION_CNT
405
 
#  define PJMEDIA_RTCP_NAT_PROBATION_CNT        3
406
 
#endif
407
 
 
408
 
 
409
 
/**
410
 
 * Specify whether RTCP should be advertised in SDP. This setting would
411
 
 * affect whether RTCP candidate will be added in SDP when ICE is used.
412
 
 * Application might want to disable RTCP advertisement in SDP to
413
 
 * reduce the message size.
414
 
 *
415
 
 * Default: 1 (yes)
416
 
 */
417
 
#ifndef PJMEDIA_ADVERTISE_RTCP
418
 
#   define PJMEDIA_ADVERTISE_RTCP               1
419
 
#endif
420
 
 
421
 
 
422
 
/**
423
 
 * Interval to send RTCP packets, in msec
424
 
 */
425
 
#ifndef PJMEDIA_RTCP_INTERVAL
426
 
#       define PJMEDIA_RTCP_INTERVAL            5000    /* msec*/
427
 
#endif
428
 
 
429
 
 
430
 
/**
431
 
 * Tell RTCP to ignore the first N packets when calculating the
432
 
 * jitter statistics. From experimentation, the first few packets
433
 
 * (25 or so) have relatively big jitter, possibly because during
434
 
 * this time, the program is also busy setting up the signaling,
435
 
 * so they make the average jitter big.
436
 
 *
437
 
 * Default: 25.
438
 
 */
439
 
#ifndef PJMEDIA_RTCP_IGNORE_FIRST_PACKETS
440
 
#   define  PJMEDIA_RTCP_IGNORE_FIRST_PACKETS   25
441
 
#endif
442
 
 
443
 
 
444
 
/**
445
 
 * Specify whether RTCP statistics includes raw jitter statistics.
446
 
 * Raw jitter is defined as absolute value of network transit time
447
 
 * difference of two consecutive packets; refering to "difference D"
448
 
 * term in interarrival jitter calculation in RFC 3550 section 6.4.1.
449
 
 *
450
 
 * Default: 0 (no).
451
 
 */
452
 
#ifndef PJMEDIA_RTCP_STAT_HAS_RAW_JITTER
453
 
#   define PJMEDIA_RTCP_STAT_HAS_RAW_JITTER     0
454
 
#endif
455
 
 
456
 
/**
457
 
 * Specify the factor with wich RTCP RTT statistics should be normalized
458
 
 * if exceptionally high. For e.g. mobile networks with potentially large
459
 
 * fluctuations, this might be unwanted.
460
 
 *
461
 
 * Use (0) to disable this feature.
462
 
 *
463
 
 * Default: 3.
464
 
 */
465
 
#ifndef PJMEDIA_RTCP_NORMALIZE_FACTOR
466
 
#   define PJMEDIA_RTCP_NORMALIZE_FACTOR        3
467
 
#endif
468
 
 
469
 
 
470
 
/**
471
 
 * Specify whether RTCP statistics includes IP Delay Variation statistics.
472
 
 * IPDV is defined as network transit time difference of two consecutive
473
 
 * packets. The IPDV statistic can be useful to inspect clock skew existance
474
 
 * and level, e.g: when the IPDV mean values were stable in positive numbers,
475
 
 * then the remote clock (used in sending RTP packets) is faster than local
476
 
 * system clock. Ideally, the IPDV mean values are always equal to 0.
477
 
 *
478
 
 * Default: 0 (no).
479
 
 */
480
 
#ifndef PJMEDIA_RTCP_STAT_HAS_IPDV
481
 
#   define PJMEDIA_RTCP_STAT_HAS_IPDV           0
482
 
#endif
483
 
 
484
 
 
485
 
/**
486
 
 * Specify whether RTCP XR support should be built into PJMEDIA. Disabling
487
 
 * this feature will reduce footprint slightly. Note that even when this
488
 
 * setting is enabled, RTCP XR processing will only be performed in stream
489
 
 * if it is enabled on run-time on per stream basis. See
490
 
 * PJMEDIA_STREAM_ENABLE_XR setting for more info.
491
 
 *
492
 
 * Default: 0 (no).
493
 
 */
494
 
#ifndef PJMEDIA_HAS_RTCP_XR
495
 
#   define PJMEDIA_HAS_RTCP_XR                  0
496
 
#endif
497
 
 
498
 
 
499
 
/**
500
 
 * The RTCP XR feature is activated and used by stream if \a enable_rtcp_xr
501
 
 * field of \a pjmedia_stream_info structure is non-zero. This setting
502
 
 * controls the default value of this field.
503
 
 *
504
 
 * Default: 0 (disabled)
505
 
 */
506
 
#ifndef PJMEDIA_STREAM_ENABLE_XR
507
 
#   define PJMEDIA_STREAM_ENABLE_XR             0
508
 
#endif
509
 
 
510
 
 
511
 
/**
512
 
 * Specify the buffer length for storing any received RTCP SDES text
513
 
 * in a stream session. Usually RTCP contains only the mandatory SDES
514
 
 * field, i.e: CNAME.
515
 
 *
516
 
 * Default: 64 bytes.
517
 
 */
518
 
#ifndef PJMEDIA_RTCP_RX_SDES_BUF_LEN
519
 
#   define PJMEDIA_RTCP_RX_SDES_BUF_LEN         64
520
 
#endif
521
 
 
522
 
 
523
 
/**
524
 
 * Specify how long (in miliseconds) the stream should suspend the
525
 
 * silence detector/voice activity detector (VAD) during the initial
526
 
 * period of the session. This feature is useful to open bindings in
527
 
 * all NAT routers between local and remote endpoint since most NATs
528
 
 * do not allow incoming packet to get in before local endpoint sends
529
 
 * outgoing packets.
530
 
 *
531
 
 * Specify zero to disable this feature.
532
 
 *
533
 
 * Default: 600 msec (which gives good probability that some RTP
534
 
 *                    packets will reach the destination, but without
535
 
 *                    filling up the jitter buffer on the remote end).
536
 
 */
537
 
#ifndef PJMEDIA_STREAM_VAD_SUSPEND_MSEC
538
 
#   define PJMEDIA_STREAM_VAD_SUSPEND_MSEC      600
539
 
#endif
540
 
 
541
 
/**
542
 
 * Perform RTP payload type checking in the stream. Normally the peer
543
 
 * MUST send RTP with payload type as we specified in our SDP. Certain
544
 
 * agents may not be able to follow this hence the only way to have
545
 
 * communication is to disable this check.
546
 
 *
547
 
 * Default: 1
548
 
 */
549
 
#ifndef PJMEDIA_STREAM_CHECK_RTP_PT
550
 
#   define PJMEDIA_STREAM_CHECK_RTP_PT          1
551
 
#endif
552
 
 
553
 
/**
554
 
 * Reserve some space for application extra data, e.g: SRTP auth tag,
555
 
 * in RTP payload, so the total payload length will not exceed the MTU.
556
 
 */
557
 
#ifndef PJMEDIA_STREAM_RESV_PAYLOAD_LEN
558
 
#   define PJMEDIA_STREAM_RESV_PAYLOAD_LEN      20
559
 
#endif
560
 
 
561
 
 
562
 
/**
563
 
 * Specify the maximum duration of silence period in the codec, in msec.
564
 
 * This is useful for example to keep NAT binding open in the firewall
565
 
 * and to prevent server from disconnecting the call because no
566
 
 * RTP packet is received.
567
 
 *
568
 
 * This only applies to codecs that use PJMEDIA's VAD (pretty much
569
 
 * everything including iLBC, except Speex, which has its own DTX
570
 
 * mechanism).
571
 
 *
572
 
 * Use (-1) to disable this feature.
573
 
 *
574
 
 * Default: 5000 ms
575
 
 *
576
 
 */
577
 
#ifndef PJMEDIA_CODEC_MAX_SILENCE_PERIOD
578
 
#   define PJMEDIA_CODEC_MAX_SILENCE_PERIOD     5000
579
 
#endif
580
 
 
581
 
 
582
 
/**
583
 
 * Suggested or default threshold to be set for fixed silence detection
584
 
 * or as starting threshold for adaptive silence detection. The threshold
585
 
 * has the range from zero to 0xFFFF.
586
 
 */
587
 
#ifndef PJMEDIA_SILENCE_DET_THRESHOLD
588
 
#   define PJMEDIA_SILENCE_DET_THRESHOLD        4
589
 
#endif
590
 
 
591
 
 
592
 
/**
593
 
 * Maximum silence threshold in the silence detector. The silence detector
594
 
 * will not cut the audio transmission if the audio level is above this
595
 
 * level.
596
 
 *
597
 
 * Use 0x10000 (or greater) to disable this feature.
598
 
 *
599
 
 * Default: 0x10000 (disabled)
600
 
 */
601
 
#ifndef PJMEDIA_SILENCE_DET_MAX_THRESHOLD
602
 
#   define PJMEDIA_SILENCE_DET_MAX_THRESHOLD    0x10000
603
 
#endif
604
 
 
605
 
 
606
 
/**
607
 
 * Speex Accoustic Echo Cancellation (AEC).
608
 
 * By default is enabled.
609
 
 */
610
 
#ifndef PJMEDIA_HAS_SPEEX_AEC
611
 
#   define PJMEDIA_HAS_SPEEX_AEC                1
612
 
#endif
613
 
 
614
 
 
615
 
/**
616
 
 * Maximum number of parameters in SDP fmtp attribute.
617
 
 *
618
 
 * Default: 16
619
 
 */
620
 
#ifndef PJMEDIA_CODEC_MAX_FMTP_CNT
621
 
#   define PJMEDIA_CODEC_MAX_FMTP_CNT           16
622
 
#endif
623
 
 
624
 
 
625
 
/**
626
 
 * This specifies the behavior of the SDP negotiator when responding to an
627
 
 * offer, whether it should rather use the codec preference as set by
628
 
 * remote, or should it rather use the codec preference as specified by
629
 
 * local endpoint.
630
 
 *
631
 
 * For example, suppose incoming call has codec order "8 0 3", while
632
 
 * local codec order is "3 0 8". If remote codec order is preferable,
633
 
 * the selected codec will be 8, while if local codec order is preferable,
634
 
 * the selected codec will be 3.
635
 
 *
636
 
 * If set to non-zero, the negotiator will use the codec order as specified
637
 
 * by remote in the offer.
638
 
 *
639
 
 * Note that this behavior can be changed during run-time by calling
640
 
 * pjmedia_sdp_neg_set_prefer_remote_codec_order().
641
 
 *
642
 
 * Default is 1 (to maintain backward compatibility)
643
 
 */
644
 
#ifndef PJMEDIA_SDP_NEG_PREFER_REMOTE_CODEC_ORDER
645
 
#   define PJMEDIA_SDP_NEG_PREFER_REMOTE_CODEC_ORDER    1
646
 
#endif
647
 
 
648
 
 
649
 
/**
650
 
 * This specifies the maximum number of the customized SDP format
651
 
 * negotiation callbacks.
652
 
 */
653
 
#ifndef PJMEDIA_SDP_NEG_MAX_CUSTOM_FMT_NEG_CB
654
 
#   define PJMEDIA_SDP_NEG_MAX_CUSTOM_FMT_NEG_CB        8
655
 
#endif
656
 
 
657
 
 
658
 
/**
659
 
 * This specifies if the SDP negotiator should rewrite answer payload
660
 
 * type numbers to use the same payload type numbers as the remote offer
661
 
 * for all matched codecs.
662
 
 *
663
 
 * Default is 1 (yes)
664
 
 */
665
 
#ifndef PJMEDIA_SDP_NEG_ANSWER_SYMMETRIC_PT
666
 
#   define PJMEDIA_SDP_NEG_ANSWER_SYMMETRIC_PT          1
667
 
#endif
668
 
 
669
 
 
670
 
/**
671
 
 * Support for sending and decoding RTCP port in SDP (RFC 3605).
672
 
 * Default is equal to PJMEDIA_ADVERTISE_RTCP setting.
673
 
 */
674
 
#ifndef PJMEDIA_HAS_RTCP_IN_SDP
675
 
#   define PJMEDIA_HAS_RTCP_IN_SDP              (PJMEDIA_ADVERTISE_RTCP)
676
 
#endif
677
 
 
678
 
 
679
 
/**
680
 
 * This macro controls whether pjmedia should include SDP rtpmap
681
 
 * attribute for static payload types. SDP rtpmap for static
682
 
 * payload types are optional, although they are normally included
683
 
 * for interoperability reason.
684
 
 *
685
 
 * Note that there is also a run-time variable to turn this setting
686
 
 * on or off, defined in endpoint.c. To access this variable, use
687
 
 * the following construct
688
 
 *
689
 
 \verbatim
690
 
    extern pj_bool_t pjmedia_add_rtpmap_for_static_pt;
691
 
 
692
 
    // Do not include rtpmap for static payload types (<96)
693
 
    pjmedia_add_rtpmap_for_static_pt = PJ_FALSE;
694
 
 \endverbatim
695
 
 *
696
 
 * Default: 1 (yes)
697
 
 */
698
 
#ifndef PJMEDIA_ADD_RTPMAP_FOR_STATIC_PT
699
 
#   define PJMEDIA_ADD_RTPMAP_FOR_STATIC_PT     1
700
 
#endif
701
 
 
702
 
 
703
 
/**
704
 
 * This macro declares the payload type for telephone-event
705
 
 * that is advertised by PJMEDIA for outgoing SDP. If this macro
706
 
 * is set to zero, telephone events would not be advertised nor
707
 
 * supported.
708
 
 *
709
 
 * If this value is changed to other number, please update the
710
 
 * PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR too.
711
 
 */
712
 
#ifndef PJMEDIA_RTP_PT_TELEPHONE_EVENTS
713
 
#   define PJMEDIA_RTP_PT_TELEPHONE_EVENTS          96
714
 
#endif
715
 
 
716
 
 
717
 
/**
718
 
 * Macro to get the string representation of the telephone-event
719
 
 * payload type.
720
 
 */
721
 
#ifndef PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR
722
 
#   define PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR      "96"
723
 
#endif
724
 
 
725
 
 
726
 
/**
727
 
 * Maximum tones/digits that can be enqueued in the tone generator.
728
 
 */
729
 
#ifndef PJMEDIA_TONEGEN_MAX_DIGITS
730
 
#   define PJMEDIA_TONEGEN_MAX_DIGITS               32
731
 
#endif
732
 
 
733
 
 
734
 
/*
735
 
 * Below specifies the various tone generator backend algorithm.
736
 
 */
737
 
 
738
 
/**
739
 
 * The math's sine(), floating point. This has very good precision
740
 
 * but it's the slowest and requires floating point support and
741
 
 * linking with the math library.
742
 
 */
743
 
#define PJMEDIA_TONEGEN_SINE                        1
744
 
 
745
 
/**
746
 
 * Floating point approximation of sine(). This has relatively good
747
 
 * precision and much faster than plain sine(), but it requires floating-
748
 
 * point support and linking with the math library.
749
 
 */
750
 
#define PJMEDIA_TONEGEN_FLOATING_POINT              2
751
 
 
752
 
/**
753
 
 * Fixed point using sine signal generated by Cordic algorithm. This
754
 
 * algorithm can be tuned to provide balance between precision and
755
 
 * performance by tuning the PJMEDIA_TONEGEN_FIXED_POINT_CORDIC_LOOP
756
 
 * setting, and may be suitable for platforms that lack floating-point
757
 
 * support.
758
 
 */
759
 
#define PJMEDIA_TONEGEN_FIXED_POINT_CORDIC          3
760
 
 
761
 
/**
762
 
 * Fast fixed point using some approximation to generate sine waves.
763
 
 * The tone generated by this algorithm is not very precise, however
764
 
 * the algorithm is very fast.
765
 
 */
766
 
#define PJMEDIA_TONEGEN_FAST_FIXED_POINT            4
767
 
 
768
 
 
769
 
/**
770
 
 * Specify the tone generator algorithm to be used. Please see
771
 
 * http://trac.pjsip.org/repos/wiki/Tone_Generator for the performance
772
 
 * analysis results of the various tone generator algorithms.
773
 
 *
774
 
 * Default value:
775
 
 *  - PJMEDIA_TONEGEN_FLOATING_POINT when PJ_HAS_FLOATING_POINT is set
776
 
 *  - PJMEDIA_TONEGEN_FIXED_POINT_CORDIC when PJ_HAS_FLOATING_POINT is not set
777
 
 */
778
 
#ifndef PJMEDIA_TONEGEN_ALG
779
 
#   if defined(PJ_HAS_FLOATING_POINT) && PJ_HAS_FLOATING_POINT
780
 
#       define PJMEDIA_TONEGEN_ALG      PJMEDIA_TONEGEN_FLOATING_POINT
781
 
#   else
782
 
#       define PJMEDIA_TONEGEN_ALG      PJMEDIA_TONEGEN_FIXED_POINT_CORDIC
783
 
#   endif
784
 
#endif
785
 
 
786
 
 
787
 
/**
788
 
 * Specify the number of calculation loops to generate the tone, when
789
 
 * PJMEDIA_TONEGEN_FIXED_POINT_CORDIC algorithm is used. With more calculation
790
 
 * loops, the tone signal gets more precise, but this will add more
791
 
 * processing.
792
 
 *
793
 
 * Valid values are 1 to 28.
794
 
 *
795
 
 * Default value: 10
796
 
 */
797
 
#ifndef PJMEDIA_TONEGEN_FIXED_POINT_CORDIC_LOOP
798
 
#   define PJMEDIA_TONEGEN_FIXED_POINT_CORDIC_LOOP  10
799
 
#endif
800
 
 
801
 
 
802
 
/**
803
 
 * Enable high quality of tone generation, the better quality will cost
804
 
 * more CPU load. This is only applied to floating point enabled machines.
805
 
 *
806
 
 * By default it is enabled when PJ_HAS_FLOATING_POINT is set.
807
 
 *
808
 
 * This macro has been deprecated in version 1.0-rc3.
809
 
 */
810
 
#ifdef PJMEDIA_USE_HIGH_QUALITY_TONEGEN
811
 
#   error   "The PJMEDIA_USE_HIGH_QUALITY_TONEGEN macro is obsolete"
812
 
#endif
813
 
 
814
 
 
815
 
/**
816
 
 * Fade-in duration for the tone, in milliseconds. Set to zero to disable
817
 
 * this feature.
818
 
 *
819
 
 * Default: 1 (msec)
820
 
 */
821
 
#ifndef PJMEDIA_TONEGEN_FADE_IN_TIME
822
 
#   define PJMEDIA_TONEGEN_FADE_IN_TIME             1
823
 
#endif
824
 
 
825
 
 
826
 
/**
827
 
 * Fade-out duration for the tone, in milliseconds. Set to zero to disable
828
 
 * this feature.
829
 
 *
830
 
 * Default: 2 (msec)
831
 
 */
832
 
#ifndef PJMEDIA_TONEGEN_FADE_OUT_TIME
833
 
#   define PJMEDIA_TONEGEN_FADE_OUT_TIME            2
834
 
#endif
835
 
 
836
 
 
837
 
/**
838
 
 * The default tone generator amplitude (1-32767).
839
 
 *
840
 
 * Default value: 12288
841
 
 */
842
 
#ifndef PJMEDIA_TONEGEN_VOLUME
843
 
#   define PJMEDIA_TONEGEN_VOLUME                   12288
844
 
#endif
845
 
 
846
 
 
847
 
/**
848
 
 * Enable support for SRTP media transport. This will require linking
849
 
 * with libsrtp from the third_party directory.
850
 
 *
851
 
 * By default it is enabled.
852
 
 */
853
 
#ifndef PJMEDIA_HAS_SRTP
854
 
#   define PJMEDIA_HAS_SRTP                         1
855
 
#endif
856
 
 
857
 
 
858
 
/**
859
 
 * Enable support to handle codecs with inconsistent clock rate
860
 
 * between clock rate in SDP/RTP & the clock rate that is actually used.
861
 
 * This happens for example with G.722 and MPEG audio codecs.
862
 
 * See:
863
 
 *  - G.722      : RFC 3551 4.5.2
864
 
 *  - MPEG audio : RFC 3551 4.5.13 & RFC 3119
865
 
 *
866
 
 * Also when this feature is enabled, some handling will be performed
867
 
 * to deal with clock rate incompatibilities of some phones.
868
 
 *
869
 
 * By default it is enabled.
870
 
 */
871
 
#ifndef PJMEDIA_HANDLE_G722_MPEG_BUG
872
 
#   define PJMEDIA_HANDLE_G722_MPEG_BUG             1
873
 
#endif
874
 
 
875
 
 
876
 
/**
877
 
 * Transport info (pjmedia_transport_info) contains a socket info and list
878
 
 * of transport specific info, since transports can be chained together
879
 
 * (for example, SRTP transport uses UDP transport as the underlying
880
 
 * transport). This constant specifies maximum number of transport specific
881
 
 * infos that can be held in a transport info.
882
 
 */
883
 
#ifndef PJMEDIA_TRANSPORT_SPECIFIC_INFO_MAXCNT
884
 
#   define PJMEDIA_TRANSPORT_SPECIFIC_INFO_MAXCNT   4
885
 
#endif
886
 
 
887
 
 
888
 
/**
889
 
 * Maximum size in bytes of storage buffer of a transport specific info.
890
 
 */
891
 
#ifndef PJMEDIA_TRANSPORT_SPECIFIC_INFO_MAXSIZE
892
 
#   define PJMEDIA_TRANSPORT_SPECIFIC_INFO_MAXSIZE  (36*sizeof(long))
893
 
#endif
894
 
 
895
 
 
896
 
/**
897
 
 * Value to be specified in PJMEDIA_STREAM_ENABLE_KA setting.
898
 
 * This indicates that an empty RTP packet should be used as
899
 
 * the keep-alive packet.
900
 
 */
901
 
#define PJMEDIA_STREAM_KA_EMPTY_RTP                 1
902
 
 
903
 
/**
904
 
 * Value to be specified in PJMEDIA_STREAM_ENABLE_KA setting.
905
 
 * This indicates that a user defined packet should be used
906
 
 * as the keep-alive packet. The content of the user-defined
907
 
 * packet is specified by PJMEDIA_STREAM_KA_USER_PKT. Default
908
 
 * content is a CR-LF packet.
909
 
 */
910
 
#define PJMEDIA_STREAM_KA_USER                      2
911
 
 
912
 
/**
913
 
 * The content of the user defined keep-alive packet. The format
914
 
 * of the packet is initializer to pj_str_t structure. Note that
915
 
 * the content may contain NULL character.
916
 
 */
917
 
#ifndef PJMEDIA_STREAM_KA_USER_PKT
918
 
#   define PJMEDIA_STREAM_KA_USER_PKT   { "\r\n", 2 }
919
 
#endif
920
 
 
921
 
/**
922
 
 * Specify another type of keep-alive and NAT hole punching
923
 
 * mechanism (the other type is PJMEDIA_STREAM_VAD_SUSPEND_MSEC
924
 
 * and PJMEDIA_CODEC_MAX_SILENCE_PERIOD) to be used by stream.
925
 
 * When this feature is enabled, the stream will initially
926
 
 * transmit one packet to punch a hole in NAT, and periodically
927
 
 * transmit keep-alive packets.
928
 
 *
929
 
 * When this alternative keep-alive mechanism is used, application
930
 
 * may disable the other keep-alive mechanisms, i.e: by setting
931
 
 * PJMEDIA_STREAM_VAD_SUSPEND_MSEC to zero and
932
 
 * PJMEDIA_CODEC_MAX_SILENCE_PERIOD to -1.
933
 
 *
934
 
 * The value of this macro specifies the type of packet used
935
 
 * for the keep-alive mechanism. Valid values are
936
 
 * PJMEDIA_STREAM_KA_EMPTY_RTP and PJMEDIA_STREAM_KA_USER.
937
 
 *
938
 
 * The duration of the keep-alive interval further can be set
939
 
 * with PJMEDIA_STREAM_KA_INTERVAL setting.
940
 
 *
941
 
 * Default: 0 (disabled)
942
 
 */
943
 
#ifndef PJMEDIA_STREAM_ENABLE_KA
944
 
#   define PJMEDIA_STREAM_ENABLE_KA                 0
945
 
#endif
946
 
 
947
 
 
948
 
/**
949
 
 * Specify the keep-alive interval of PJMEDIA_STREAM_ENABLE_KA
950
 
 * mechanism, in seconds.
951
 
 *
952
 
 * Default: 5 seconds
953
 
 */
954
 
#ifndef PJMEDIA_STREAM_KA_INTERVAL
955
 
#   define PJMEDIA_STREAM_KA_INTERVAL               5
956
 
#endif
957
 
 
958
 
 
959
 
/*
960
 
 * .... new stuffs ...
961
 
 */
962
 
 
963
 
/*
964
 
 * Video
965
 
 */
966
 
 
967
 
/**
968
 
 * Top level option to enable/disable video features.
969
 
 *
970
 
 * Default: 0 (disabled)
971
 
 */
972
 
#ifndef PJMEDIA_HAS_VIDEO
973
 
#   define PJMEDIA_HAS_VIDEO                            0
974
 
#endif
975
 
 
976
 
 
977
 
/**
978
 
 * Specify if FFMPEG is available. The value here will be used as the default
979
 
 * value for other FFMPEG settings below.
980
 
 *
981
 
 * Default: 0
982
 
 */
983
 
#ifndef PJMEDIA_HAS_FFMPEG
984
 
#   define PJMEDIA_HAS_FFMPEG                           0
985
 
#endif
986
 
 
987
 
/**
988
 
 * Specify if FFMPEG libavformat is available.
989
 
 *
990
 
 * Default: PJMEDIA_HAS_FFMPEG (or detected by configure)
991
 
 */
992
 
#ifndef PJMEDIA_HAS_LIBAVFORMAT
993
 
#   define PJMEDIA_HAS_LIBAVFORMAT                      PJMEDIA_HAS_FFMPEG
994
 
#endif
995
 
 
996
 
/**
997
 
 * Specify if FFMPEG libavformat is available.
998
 
 *
999
 
 * Default: PJMEDIA_HAS_FFMPEG (or detected by configure)
1000
 
 */
1001
 
#ifndef PJMEDIA_HAS_LIBAVCODEC
1002
 
#   define PJMEDIA_HAS_LIBAVCODEC                       PJMEDIA_HAS_FFMPEG
1003
 
#endif
1004
 
 
1005
 
/**
1006
 
 * Specify if FFMPEG libavutil is available.
1007
 
 *
1008
 
 * Default: PJMEDIA_HAS_FFMPEG (or detected by configure)
1009
 
 */
1010
 
#ifndef PJMEDIA_HAS_LIBAVUTIL
1011
 
#   define PJMEDIA_HAS_LIBAVUTIL                        PJMEDIA_HAS_FFMPEG
1012
 
#endif
1013
 
 
1014
 
/**
1015
 
 * Specify if FFMPEG libswscale is available.
1016
 
 *
1017
 
 * Default: PJMEDIA_HAS_FFMPEG (or detected by configure)
1018
 
 */
1019
 
#ifndef PJMEDIA_HAS_LIBSWSCALE
1020
 
#   define PJMEDIA_HAS_LIBSWSCALE                       PJMEDIA_HAS_FFMPEG
1021
 
#endif
1022
 
 
1023
 
/**
1024
 
 * Specify if FFMPEG libavdevice is available.
1025
 
 *
1026
 
 * Default: PJMEDIA_HAS_FFMPEG (or detected by configure)
1027
 
 */
1028
 
#ifndef PJMEDIA_HAS_LIBAVDEVICE
1029
 
#   define PJMEDIA_HAS_LIBAVDEVICE                      PJMEDIA_HAS_FFMPEG
1030
 
#endif
1031
 
 
1032
 
/**
1033
 
 * Specify if FFMPEG libavcore is available.
1034
 
 *
1035
 
 * Default: PJMEDIA_HAS_FFMPEG (or detected by configure)
1036
 
 */
1037
 
#ifndef PJMEDIA_HAS_LIBAVCORE
1038
 
#   define PJMEDIA_HAS_LIBAVCORE                        PJMEDIA_HAS_FFMPEG
1039
 
#endif
1040
 
 
1041
 
/**
1042
 
 * Maximum video planes.
1043
 
 *
1044
 
 * Default: 4
1045
 
 */
1046
 
#ifndef PJMEDIA_MAX_VIDEO_PLANES
1047
 
#   define PJMEDIA_MAX_VIDEO_PLANES                     4
1048
 
#endif
1049
 
 
1050
 
/**
1051
 
 * Maximum number of video formats.
1052
 
 *
1053
 
 * Default: 32
1054
 
 */
1055
 
#ifndef PJMEDIA_MAX_VIDEO_FORMATS
1056
 
#   define PJMEDIA_MAX_VIDEO_FORMATS                    32
1057
 
#endif
1058
 
 
1059
 
/**
1060
 
 * Specify the maximum time difference (in ms) for synchronization between
1061
 
 * two medias. If the synchronization media source is ahead of time
1062
 
 * greater than this duration, it is considered to make a very large jump
1063
 
 * and the synchronization will be reset.
1064
 
 *
1065
 
 * Default: 20000
1066
 
 */
1067
 
#ifndef PJMEDIA_CLOCK_SYNC_MAX_SYNC_MSEC
1068
 
#   define PJMEDIA_CLOCK_SYNC_MAX_SYNC_MSEC         20000
1069
 
#endif
1070
 
 
1071
 
/**
1072
 
 * Maximum video frame size.
1073
 
 * Default: 128kB
1074
 
 */
1075
 
#ifndef PJMEDIA_MAX_VIDEO_ENC_FRAME_SIZE
1076
 
#  define PJMEDIA_MAX_VIDEO_ENC_FRAME_SIZE          (1<<17)
1077
 
#endif
1078
 
 
1079
 
 
1080
 
/**
1081
 
 * Specify the maximum duration (in ms) for resynchronization. When a media
1082
 
 * is late to another media it is supposed to be synchronized to, it is
1083
 
 * guaranteed to be synchronized again after this duration. While if the
1084
 
 * media is ahead/early by t ms, it is guaranteed to be synchronized after
1085
 
 * t + this duration. This timing only applies if there is no additional
1086
 
 * resynchronization required during the specified duration.
1087
 
 *
1088
 
 * Default: 2000
1089
 
 */
1090
 
#ifndef PJMEDIA_CLOCK_SYNC_MAX_RESYNC_DURATION
1091
 
#   define PJMEDIA_CLOCK_SYNC_MAX_RESYNC_DURATION 2000
1092
 
#endif
1093
 
 
1094
 
 
1095
 
/**
1096
 
 * Minimum gap between two consecutive discards in jitter buffer,
1097
 
 * in milliseconds.
1098
 
 *
1099
 
 * Default: 200 ms
1100
 
 */
1101
 
#ifndef PJMEDIA_JBUF_DISC_MIN_GAP
1102
 
#   define PJMEDIA_JBUF_DISC_MIN_GAP                200
1103
 
#endif
1104
 
 
1105
 
 
1106
 
/**
1107
 
 * Minimum burst level reference used for calculating discard duration
1108
 
 * in jitter buffer progressive discard algorithm, in frames.
1109
 
 *
1110
 
 * Default: 1 frame
1111
 
 */
1112
 
#ifndef PJMEDIA_JBUF_PRO_DISC_MIN_BURST
1113
 
#   define PJMEDIA_JBUF_PRO_DISC_MIN_BURST          1
1114
 
#endif
1115
 
 
1116
 
 
1117
 
/**
1118
 
 * Maximum burst level reference used for calculating discard duration
1119
 
 * in jitter buffer progressive discard algorithm, in frames.
1120
 
 *
1121
 
 * Default: 200 frames
1122
 
 */
1123
 
#ifndef PJMEDIA_JBUF_PRO_DISC_MAX_BURST
1124
 
#   define PJMEDIA_JBUF_PRO_DISC_MAX_BURST          100
1125
 
#endif
1126
 
 
1127
 
 
1128
 
/**
1129
 
 * Duration for progressive discard algotithm in jitter buffer to discard
1130
 
 * an excessive frame when burst is equal to or lower than
1131
 
 * PJMEDIA_JBUF_PRO_DISC_MIN_BURST, in milliseconds.
1132
 
 *
1133
 
 * Default: 2000 ms
1134
 
 */
1135
 
#ifndef PJMEDIA_JBUF_PRO_DISC_T1
1136
 
#   define PJMEDIA_JBUF_PRO_DISC_T1                 2000
1137
 
#endif
1138
 
 
1139
 
 
1140
 
/**
1141
 
 * Duration for progressive discard algotithm in jitter buffer to discard
1142
 
 * an excessive frame when burst is equal to or greater than
1143
 
 * PJMEDIA_JBUF_PRO_DISC_MAX_BURST, in milliseconds.
1144
 
 *
1145
 
 * Default: 10000 ms
1146
 
 */
1147
 
#ifndef PJMEDIA_JBUF_PRO_DISC_T2
1148
 
#   define PJMEDIA_JBUF_PRO_DISC_T2                 10000
1149
 
#endif
1150
 
 
1151
 
 
1152
 
/**
1153
 
 * Video stream will discard old picture from the jitter buffer as soon as
1154
 
 * new picture is received, to reduce latency.
1155
 
 *
1156
 
 * Default: 0
1157
 
 */
1158
 
#ifndef PJMEDIA_VID_STREAM_SKIP_PACKETS_TO_REDUCE_LATENCY
1159
 
#   define PJMEDIA_VID_STREAM_SKIP_PACKETS_TO_REDUCE_LATENCY    0
1160
 
#endif
1161
 
 
1162
 
 
1163
 
/**
1164
 
 * Maximum video payload size. Note that this must not be greater than
1165
 
 * PJMEDIA_MAX_MTU.
1166
 
 *
1167
 
 * Default: (PJMEDIA_MAX_MTU - 100)
1168
 
 */
1169
 
#ifndef PJMEDIA_MAX_VID_PAYLOAD_SIZE
1170
 
#  define PJMEDIA_MAX_VID_PAYLOAD_SIZE          (PJMEDIA_MAX_MTU - 100)
1171
 
#endif
1172
 
 
1173
 
 
1174
 
/**
1175
 
 * @}
1176
 
 */
1177
 
 
1178
 
 
1179
 
#endif  /* __PJMEDIA_CONFIG_H__ */