Debian Codegraph @

Xpjproject/pjmedia/include/pjmedia-codec/config.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
3 * Copyright (C) 2003-2008 Benny Prijono <[email protected]>
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 __PJMEDIA_CODEC_CONFIG_H__
20 #define __PJMEDIA_CODEC_CONFIG_H__
21
22 /**
23 * @file config.h
24 * @brief PJMEDIA-CODEC compile time settings
25 */
26
27 /**
28 * @defgroup pjmedia_codec_config PJMEDIA-CODEC Compile Time Settings
29 * @ingroup PJMEDIA_CODEC
30 * @brief Various compile time settings such as to enable/disable codecs
31 * @{
32 */
33
34 #include <pjmedia/types.h>
35
36 /*
37 * Include config_auto.h if autoconf is used (PJ_AUTOCONF is set)
38 */
39 #if defined(PJ_AUTOCONF)
40 # include <pjmedia-codec/config_auto.h>
41 #endif
42
43
44 /**
45 * Unless specified otherwise, L16 codec is included by default.
46 */
47 #ifndef PJMEDIA_HAS_L16_CODEC
48 # define PJMEDIA_HAS_L16_CODEC 1
49 #endif
50
51
52 /**
53 * Settings to enable L16 codec 8KHz, mono. By default it is disabled.
54 */
55 #ifndef PJMEDIA_CODEC_L16_HAS_8KHZ_MONO
56 # define PJMEDIA_CODEC_L16_HAS_8KHZ_MONO 0
57 #endif
58
59
60 /**
61 * Settings to enable L16 codec 8KHz, stereo. By default it is disabled.
62 */
63 #ifndef PJMEDIA_CODEC_L16_HAS_8KHZ_STEREO
64 # define PJMEDIA_CODEC_L16_HAS_8KHZ_STEREO 0
65 #endif
66
67
68 /**
69 * Settings to enable L16 codec 16KHz, mono. By default it is disabled.
70 */
71 #ifndef PJMEDIA_CODEC_L16_HAS_16KHZ_MONO
72 # define PJMEDIA_CODEC_L16_HAS_16KHZ_MONO 0
73 #endif
74
75
76 /**
77 * Settings to enable L16 codec 16KHz, stereo. By default it is disabled.
78 */
79 #ifndef PJMEDIA_CODEC_L16_HAS_16KHZ_STEREO
80 # define PJMEDIA_CODEC_L16_HAS_16KHZ_STEREO 0
81 #endif
82
83
84 /**
85 * Settings to enable L16 codec 48KHz, mono. By default it is disabled.
86 */
87 #ifndef PJMEDIA_CODEC_L16_HAS_48KHZ_MONO
88 # define PJMEDIA_CODEC_L16_HAS_48KHZ_MONO 0
89 #endif
90
91
92 /**
93 * Settings to enable L16 codec 48KHz, stereo. By default it is disabled.
94 */
95 #ifndef PJMEDIA_CODEC_L16_HAS_48KHZ_STEREO
96 # define PJMEDIA_CODEC_L16_HAS_48KHZ_STEREO 0
97 #endif
98
99
100 /**
101 * Unless specified otherwise, GSM codec is included by default.
102 */
103 #ifndef PJMEDIA_HAS_GSM_CODEC
104 # define PJMEDIA_HAS_GSM_CODEC 1
105 #endif
106
107
108 /**
109 * Unless specified otherwise, Speex codec is included by default.
110 */
111 #ifndef PJMEDIA_HAS_SPEEX_CODEC
112 # define PJMEDIA_HAS_SPEEX_CODEC 1
113 #endif
114
115 /**
116 * Speex codec default complexity setting.
117 */
118 #ifndef PJMEDIA_CODEC_SPEEX_DEFAULT_COMPLEXITY
119 # define PJMEDIA_CODEC_SPEEX_DEFAULT_COMPLEXITY 2
120 #endif
121
122 /**
123 * Speex codec default quality setting. Please note that pjsua-lib may override
124 * this setting via its codec quality setting (i.e PJSUA_DEFAULT_CODEC_QUALITY).
125 */
126 #ifndef PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY
127 # define PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY 8
128 #endif
129
130
131 /**
132 * Unless specified otherwise, iLBC codec is included by default.
133 */
134 #ifndef PJMEDIA_HAS_ILBC_CODEC
135 # define PJMEDIA_HAS_ILBC_CODEC 1
136 #endif
137
138
139 /**
140 * Unless specified otherwise, G.722 codec is included by default.
141 */
142 #ifndef PJMEDIA_HAS_G722_CODEC
143 # define PJMEDIA_HAS_G722_CODEC 1
144 #endif
145
146 /**
147 * Initial memory block for G.722 codec implementation.
148 */
149 #ifndef PJMEDIA_POOL_LEN_G722_CODEC
150 # define PJMEDIA_POOL_LEN_G722_CODEC 1000
151 #endif
152
153 /**
154 * Memory increment for G.722 codec implementation.
155 */
156 #ifndef PJMEDIA_POOL_INC_G722_CODEC
157 # define PJMEDIA_POOL_INC_G722_CODEC 1000
158 #endif
159
160 /**
161 * Default G.722 codec encoder and decoder level adjustment. The G.722
162 * specifies that it uses 14 bit PCM for input and output, while PJMEDIA
163 * normally uses 16 bit PCM, so the conversion is done by applying
164 * level adjustment. If the value is non-zero, then PCM input samples to
165 * the encoder will be shifted right by this value, and similarly PCM
166 * output samples from the decoder will be shifted left by this value.
167 *
168 * This can be changed at run-time after initialization by calling
169 * #pjmedia_codec_g722_set_pcm_shift().
170 *
171 * Default: 2.
172 */
173 #ifndef PJMEDIA_G722_DEFAULT_PCM_SHIFT
174 # define PJMEDIA_G722_DEFAULT_PCM_SHIFT 2
175 #endif
176
177
178 /**
179 * Specifies whether G.722 PCM shifting should be stopped when clipping
180 * detected in the decoder. Enabling this feature can be useful when
181 * talking to G.722 implementation that uses 16 bit PCM for G.722 input/
182 * output (for any reason it seems to work) and the PCM shifting causes
183 * audio clipping.
184 *
185 * See also #PJMEDIA_G722_DEFAULT_PCM_SHIFT.
186 *
187 * Default: enabled.
188 */
189 #ifndef PJMEDIA_G722_STOP_PCM_SHIFT_ON_CLIPPING
190 # define PJMEDIA_G722_STOP_PCM_SHIFT_ON_CLIPPING 1
191 #endif
192
193
194 /**
195 * Enable the features provided by Intel IPP libraries, for example
196 * codecs such as G.729, G.723.1, G.726, G.728, G.722.1, and AMR.
197 *
198 * By default this is disabled. Please follow the instructions in
199 * http://trac.pjsip.org/repos/wiki/Intel_IPP_Codecs on how to setup
200 * Intel IPP with PJMEDIA.
201 */
202 #ifndef PJMEDIA_HAS_INTEL_IPP
203 # define PJMEDIA_HAS_INTEL_IPP 0
204 #endif
205
206
207 /**
208 * Visual Studio only: when this option is set, the Intel IPP libraries
209 * will be automatically linked to application using pragma(comment)
210 * constructs. This is convenient, however it will only link with
211 * the stub libraries and the Intel IPP DLL's will be required when
212 * distributing the application.
213 *
214 * If application wants to link with the different types of the Intel IPP
215 * libraries (for example, the static libraries), it must set this option
216 * to zero and specify the Intel IPP libraries in the application's input
217 * library specification manually.
218 *
219 * Default 1.
220 */
221 #ifndef PJMEDIA_AUTO_LINK_IPP_LIBS
222 # define PJMEDIA_AUTO_LINK_IPP_LIBS 1
223 #endif
224
225
226 /**
227 * Enable Intel IPP AMR codec. This also needs to be enabled when AMR WB
228 * codec is enabled. This option is only used when PJMEDIA_HAS_INTEL_IPP
229 * is enabled.
230 *
231 * Default: 1
232 */
233 #ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_AMR
234 # define PJMEDIA_HAS_INTEL_IPP_CODEC_AMR 1
235 #endif
236
237
238 /**
239 * Enable Intel IPP AMR wideband codec. The PJMEDIA_HAS_INTEL_IPP_CODEC_AMR
240 * option must also be enabled to use this codec. This option is only used
241 * when PJMEDIA_HAS_INTEL_IPP is enabled.
242 *
243 * Default: 1
244 */
245 #ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_AMRWB
246 # define PJMEDIA_HAS_INTEL_IPP_CODEC_AMRWB 1
247 #endif
248
249
250 /**
251 * Enable Intel IPP G.729 codec. This option is only used when
252 * PJMEDIA_HAS_INTEL_IPP is enabled.
253 *
254 * Default: 1
255 */
256 #ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_G729
257 # define PJMEDIA_HAS_INTEL_IPP_CODEC_G729 1
258 #endif
259
260
261 /**
262 * Enable Intel IPP G.723.1 codec. This option is only used when
263 * PJMEDIA_HAS_INTEL_IPP is enabled.
264 *
265 * Default: 1
266 */
267 #ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_G723_1
268 # define PJMEDIA_HAS_INTEL_IPP_CODEC_G723_1 1
269 #endif
270
271
272 /**
273 * Enable Intel IPP G.726 codec. This option is only used when
274 * PJMEDIA_HAS_INTEL_IPP is enabled.
275 *
276 * Default: 1
277 */
278 #ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_G726
279 # define PJMEDIA_HAS_INTEL_IPP_CODEC_G726 1
280 #endif
281
282
283 /**
284 * Enable Intel IPP G.728 codec. This option is only used when
285 * PJMEDIA_HAS_INTEL_IPP is enabled.
286 *
287 * Default: 1
288 */
289 #ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_G728
290 # define PJMEDIA_HAS_INTEL_IPP_CODEC_G728 1
291 #endif
292
293
294 /**
295 * Enable Intel IPP G.722.1 codec. This option is only used when
296 * PJMEDIA_HAS_INTEL_IPP is enabled.
297 *
298 * Default: 1
299 */
300 #ifndef PJMEDIA_HAS_INTEL_IPP_CODEC_G722_1
301 # define PJMEDIA_HAS_INTEL_IPP_CODEC_G722_1 1
302 #endif
303
304 /**
305 * Enable Passthrough codecs.
306 *
307 * Default: 0
308 */
309 #ifndef PJMEDIA_HAS_PASSTHROUGH_CODECS
310 # define PJMEDIA_HAS_PASSTHROUGH_CODECS 0
311 #endif
312
313 /**
314 * Enable AMR passthrough codec.
315 *
316 * Default: 1
317 */
318 #ifndef PJMEDIA_HAS_PASSTHROUGH_CODEC_AMR
319 # define PJMEDIA_HAS_PASSTHROUGH_CODEC_AMR 1
320 #endif
321
322 /**
323 * Enable G.722 passthrough codec.
324 *
325 * Default: 1
326 */
327 #ifndef PJMEDIA_HAS_PASSTHROUGH_CODEC_G722
328 # define PJMEDIA_HAS_PASSTHROUGH_CODEC_G722 1
329 #endif
330
331 /**
332 * Enable G.729 passthrough codec.
333 *
334 * Default: 1
335 */
336 #ifndef PJMEDIA_HAS_PASSTHROUGH_CODEC_G729
337 # define PJMEDIA_HAS_PASSTHROUGH_CODEC_G729 1
338 #endif
339
340 /**
341 * Enable iLBC passthrough codec.
342 *
343 * Default: 1
344 */
345 #ifndef PJMEDIA_HAS_PASSTHROUGH_CODEC_ILBC
346 # define PJMEDIA_HAS_PASSTHROUGH_CODEC_ILBC 1
347 #endif
348
349 /**
350 * Enable PCMU passthrough codec.
351 *
352 * Default: 1
353 */
354 #ifndef PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMU
355 # define PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMU 1
356 #endif
357
358 /**
359 * Enable PCMA passthrough codec.
360 *
361 * Default: 1
362 */
363 #ifndef PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMA
364 # define PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMA 1
365 #endif
366
367 /* If passthrough and PCMU/PCMA are enabled, disable the software
368 * G.711 codec
369 */
370 #if PJMEDIA_HAS_PASSTHROUGH_CODECS && \
371 (PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMU || PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMA)
372 # undef PJMEDIA_HAS_G711_CODEC
373 # define PJMEDIA_HAS_G711_CODEC 0
374 #endif
375
376
377 /**
378 * G.722.1 codec is disabled by default.
379 */
380 #ifndef PJMEDIA_HAS_G7221_CODEC
381 # define PJMEDIA_HAS_G7221_CODEC 0
382 #endif
383
384 /* If passthrough and G.722 is enabled, disable the software
385 * G.722 codec
386 */
387 #if PJMEDIA_HAS_PASSTHROUGH_CODECS && PJMEDIA_HAS_PASSTHROUGH_CODEC_G722
388 # undef PJMEDIA_HAS_G722_CODEC
389 # define PJMEDIA_HAS_G722_CODEC 0
390 #endif
391
392 /**
393 * Enable OpenCORE AMR-NB codec.
394 * See https://github.com/pjsip/pjproject/issues/1388 for some info.
395 *
396 * Default: 0
397 */
398 #ifndef PJMEDIA_HAS_OPENCORE_AMRNB_CODEC
399 # define PJMEDIA_HAS_OPENCORE_AMRNB_CODEC 0
400 #endif
401
402 /**
403 * Enable OpenCORE AMR-WB codec.
404 * See https://github.com/pjsip/pjproject/issues/1608 for some info.
405 *
406 * Default: 0
407 */
408 #ifndef PJMEDIA_HAS_OPENCORE_AMRWB_CODEC
409 # define PJMEDIA_HAS_OPENCORE_AMRWB_CODEC 0
410 #endif
411
412 /**
413 * Link with libopencore-amrXX via pragma comment on Visual Studio.
414 * This option only makes sense if PJMEDIA_HAS_OPENCORE_AMRNB/WB_CODEC
415 * is enabled.
416 *
417 * Default: 1
418 */
419 #ifndef PJMEDIA_AUTO_LINK_OPENCORE_AMR_LIBS
420 # define PJMEDIA_AUTO_LINK_OPENCORE_AMR_LIBS 1
421 #endif
422
423 /**
424 * Link with libopencore-amrXX.a that has been produced with gcc.
425 * This option only makes sense if PJMEDIA_HAS_OPENCORE_AMRNB/WB_CODEC
426 * and PJMEDIA_AUTO_LINK_OPENCORE_AMR_LIBS are enabled.
427 *
428 * Default: 1
429 */
430 #ifndef PJMEDIA_OPENCORE_AMR_BUILT_WITH_GCC
431 # define PJMEDIA_OPENCORE_AMR_BUILT_WITH_GCC 1
432 #endif
433
434
435 /**
436 * Default G.722.1 codec encoder and decoder level adjustment.
437 * If the value is non-zero, then PCM input samples to the encoder will
438 * be shifted right by this value, and similarly PCM output samples from
439 * the decoder will be shifted left by this value.
440 *
441 * This can be changed at run-time after initialization by calling
442 * #pjmedia_codec_g7221_set_pcm_shift().
443 */
444 #ifndef PJMEDIA_G7221_DEFAULT_PCM_SHIFT
445 # define PJMEDIA_G7221_DEFAULT_PCM_SHIFT 1
446 #endif
447
448
449 /**
450 * Enabling both G.722.1 codec implementations, internal PJMEDIA and IPP,
451 * may cause problem in SDP, i.e: payload types duplications. So, let's
452 * just trap such case here at compile time.
453 *
454 * Application can control which implementation to be used by manipulating
455 * PJMEDIA_HAS_G7221_CODEC and PJMEDIA_HAS_INTEL_IPP_CODEC_G722_1 in
456 * config_site.h.
457 */
458 #if (PJMEDIA_HAS_G7221_CODEC != 0) && (PJMEDIA_HAS_INTEL_IPP != 0) && \
459 (PJMEDIA_HAS_INTEL_IPP_CODEC_G722_1 != 0)
460 # error Only one G.722.1 implementation can be enabled at the same time. \
461 Please use PJMEDIA_HAS_G7221_CODEC and \
462 PJMEDIA_HAS_INTEL_IPP_CODEC_G722_1 in your config_site.h \
463 to control which implementation to be used.
464 #endif
465
466
467 /**
468 * Enable SILK codec.
469 *
470 * Default: 0
471 */
472 #ifndef PJMEDIA_HAS_SILK_CODEC
473 # define PJMEDIA_HAS_SILK_CODEC 0
474 #endif
475
476
477 /**
478 * SILK codec default complexity setting, valid values are 0 (lowest), 1,
479 * and 2.
480 *
481 * Default: 2
482 */
483 #ifndef PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY
484 # define PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY 2
485 #endif
486
487 /**
488 * SILK codec default quality setting, valid values are ranging from
489 * 0 (lowest) to 10. Please note that pjsua-lib may override this setting
490 * via its codec quality setting (i.e PJSUA_DEFAULT_CODEC_QUALITY).
491 *
492 * Default: 10
493 */
494 #ifndef PJMEDIA_CODEC_SILK_DEFAULT_QUALITY
495 # define PJMEDIA_CODEC_SILK_DEFAULT_QUALITY 10
496 #endif
497
498
499 /**
500 * Enable OPUS codec.
501 *
502 * Default: 0
503 */
504 #ifndef PJMEDIA_HAS_OPUS_CODEC
505 # define PJMEDIA_HAS_OPUS_CODEC 0
506 #endif
507
508 /**
509 * OPUS codec sample rate.
510 *
511 * Default: 48000
512 */
513 #ifndef PJMEDIA_CODEC_OPUS_DEFAULT_SAMPLE_RATE
514 # define PJMEDIA_CODEC_OPUS_DEFAULT_SAMPLE_RATE 48000
515 #endif
516
517 /**
518 * OPUS codec default maximum average bit rate.
519 *
520 * Default: 0 (leave it to default value specified by Opus, which will
521 * take into account factors such as media content (speech/music), sample
522 * rate, channel count, etc).
523 */
524 #ifndef PJMEDIA_CODEC_OPUS_DEFAULT_BIT_RATE
525 # define PJMEDIA_CODEC_OPUS_DEFAULT_BIT_RATE 0
526 #endif
527
528 /**
529 * Opus library name for MSVC \a \#pragma \a comment(lib,...) linking.
530 *
531 * Default: "opus.lib"
532 */
533 #ifndef PJMEDIA_CODEC_OPUS_LIB_NAME
534 # define PJMEDIA_CODEC_OPUS_LIB_NAME "opus.lib"
535 #endif
536
537
538 /**
539 * OPUS default encoding complexity, which is an integer from
540 * 0 to 10, where 0 is the lowest complexity and 10 is the highest.
541 *
542 * Default: 5
543 */
544 #ifndef PJMEDIA_CODEC_OPUS_DEFAULT_COMPLEXITY
545 # define PJMEDIA_CODEC_OPUS_DEFAULT_COMPLEXITY 5
546 #endif
547
548
549 /**
550 * OPUS default CBR (constant bit rate) setting
551 *
552 * Default: PJ_FALSE (which means Opus will use VBR (variable bit rate))
553 */
554 #ifndef PJMEDIA_CODEC_OPUS_DEFAULT_CBR
555 # define PJMEDIA_CODEC_OPUS_DEFAULT_CBR PJ_FALSE
556 #endif
557
558
559 /**
560 * Enable G.729 codec using BCG729 backend.
561 *
562 * Default: 0
563 */
564 #ifndef PJMEDIA_HAS_BCG729
565 # define PJMEDIA_HAS_BCG729 0
566 #endif
567
568
569 /**
570 * Enable Lyra codec.
571 *
572 * Default: 0
573 */
574 #ifndef PJMEDIA_HAS_LYRA_CODEC
575 # define PJMEDIA_HAS_LYRA_CODEC 0
576 #endif
577
578 /**
579 * Lyra default bitrate setting
580 *
581 * Default: 3200 (available bitrate:3200, 6000, 9200)
582 */
583 #ifndef PJMEDIA_CODEC_LYRA_DEFAULT_BIT_RATE
584 # define PJMEDIA_CODEC_LYRA_DEFAULT_BIT_RATE 3200
585 #endif
586
587 /**
588 * Lyra default model path containing lyra_config.binarypb, lyragan.tflite,
589 * quantizer.tflite and soundstream_encoder.tflite file. If autoconf is used,
590 * it will be set to "[lyra src folder]/model_coeffs".
591 *
592 * Default: "model_coeffs"
593 */
594 #ifndef PJMEDIA_CODEC_LYRA_DEFAULT_MODEL_PATH
595 # define PJMEDIA_CODEC_LYRA_DEFAULT_MODEL_PATH "model_coeffs"
596 #endif
597
598 /**
599 * Settings to enable Lyra codec 8KHz. This option is only used
600 * when PJMEDIA_HAS_LYRA_CODEC is enabled.
601 *
602 * Default: 0
603 */
604 #ifndef PJMEDIA_CODEC_LYRA_HAS_8KHZ
605 # define PJMEDIA_CODEC_LYRA_HAS_8KHZ 0
606 #endif
607
608 /**
609 * Settings to enable Lyra codec 16KHz. This option is only used
610 * when PJMEDIA_HAS_LYRA_CODEC is enabled.
611 *
612 * Default: 1
613 */
614 #ifndef PJMEDIA_CODEC_LYRA_HAS_16KHZ
615 # define PJMEDIA_CODEC_LYRA_HAS_16KHZ 1
616 #endif
617
618 /**
619 * Settings to enable Lyra codec 32KHz. This option is only used
620 * when PJMEDIA_HAS_LYRA_CODEC is enabled.
621 *
622 * Default: 0
623 */
624 #ifndef PJMEDIA_CODEC_LYRA_HAS_32KHZ
625 # define PJMEDIA_CODEC_LYRA_HAS_32KHZ 0
626 #endif
627
628 /**
629 * Settings to enable Lyra codec 48KHz. This option is only used
630 * when PJMEDIA_HAS_LYRA_CODEC is enabled.
631 *
632 * Default: 0
633 */
634 #ifndef PJMEDIA_CODEC_LYRA_HAS_48KHZ
635 # define PJMEDIA_CODEC_LYRA_HAS_48KHZ 0
636 #endif
637
638 /**
639 * Specify if FFMPEG codecs are available.
640 *
641 * Default: PJMEDIA_HAS_LIBAVFORMAT
642 */
643 #ifndef PJMEDIA_HAS_FFMPEG_CODEC
644 # define PJMEDIA_HAS_FFMPEG_CODEC PJMEDIA_HAS_LIBAVFORMAT
645 #endif
646
647
648 /**
649 * Specify if FFMPEG video codecs are available.
650 *
651 * Default: PJMEDIA_HAS_FFMPEG_CODEC
652 */
653 #ifndef PJMEDIA_HAS_FFMPEG_VID_CODEC
654 # define PJMEDIA_HAS_FFMPEG_VID_CODEC PJMEDIA_HAS_FFMPEG_CODEC
655 #endif
656
657 /**
658 * Enable FFMPEG H263+/H263-1998 codec.
659 *
660 * Default: 1
661 */
662 #ifndef PJMEDIA_HAS_FFMPEG_CODEC_H263P
663 # define PJMEDIA_HAS_FFMPEG_CODEC_H263P PJMEDIA_HAS_FFMPEG_VID_CODEC
664 #endif
665
666 /**
667 * Enable FFMPEG H264 codec (requires libx264).
668 *
669 * Default: disabled when OpenH264 is used, otherwise it is set to
670 * PJMEDIA_HAS_FFMPEG_VID_CODEC
671 */
672 #ifndef PJMEDIA_HAS_FFMPEG_CODEC_H264
673 # if defined(PJMEDIA_HAS_OPENH264_CODEC) && PJMEDIA_HAS_OPENH264_CODEC != 0
674 # define PJMEDIA_HAS_FFMPEG_CODEC_H264 0
675 # else
676 # define PJMEDIA_HAS_FFMPEG_CODEC_H264 PJMEDIA_HAS_FFMPEG_VID_CODEC
677 # endif
678 #endif
679
680 /**
681 * Enable FFMPEG VPX codec (requires libvpx)
682 */
683 #ifndef PJMEDIA_HAS_FFMPEG_CODEC_VP8
684 # if defined(PJMEDIA_HAS_VPX_CODEC) && PJMEDIA_HAS_VPX_CODEC != 0
685 # define PJMEDIA_HAS_FFMPEG_CODEC_VP8 0
686 # else
687 # define PJMEDIA_HAS_FFMPEG_CODEC_VP8 1
688 # endif
689 #endif
690
691 #ifndef PJMEDIA_HAS_FFMPEG_CODEC_VP9
692 # if defined(PJMEDIA_HAS_VPX_CODEC) && PJMEDIA_HAS_VPX_CODEC != 0
693 # define PJMEDIA_HAS_FFMPEG_CODEC_VP9 0
694 # else
695 # define PJMEDIA_HAS_FFMPEG_CODEC_VP9 1
696 # endif
697 #endif
698
699
700 /**
701 * Determine the log level of the native openH264 log which will be forwarded
702 * to the library's log.
703 * Set to WELS_LOG_QUIET to disable logging, or WELS_LOG_DETAIL for debugging.
704 *
705 * Default: WELS_LOG_ERROR.
706 */
707 #ifndef PJMEDIA_CODEC_OPENH264_LOG_LEVEL
708 # define PJMEDIA_CODEC_OPENH264_LOG_LEVEL WELS_LOG_ERROR
709 #endif
710
711 /**
712 * Enable VPX VP8 codec.
713 *
714 * Default: 1
715 */
716 #ifndef PJMEDIA_HAS_VPX_CODEC_VP8
717 # define PJMEDIA_HAS_VPX_CODEC_VP8 1
718 #endif
719
720 /**
721 * Enable VPX VP9 codec.
722 *
723 * Default: 0 (disabled)
724 */
725 #ifndef PJMEDIA_HAS_VPX_CODEC_VP9
726 # define PJMEDIA_HAS_VPX_CODEC_VP9 0
727 #endif
728
729 /**
730 * Enable Android MediaCodec AMRNB codec.
731 *
732 * Default: 1
733 */
734 #ifndef PJMEDIA_HAS_AND_MEDIA_AMRNB
735 # define PJMEDIA_HAS_AND_MEDIA_AMRNB 1
736 #endif
737
738 /**
739 * Enable Android MediaCodec AMRWB codec.
740 *
741 * Default: 1
742 */
743 #ifndef PJMEDIA_HAS_AND_MEDIA_AMRWB
744 # define PJMEDIA_HAS_AND_MEDIA_AMRWB 1
745 #endif
746
747 /**
748 * Enable Android MediaCodec AVC/H264 codec.
749 *
750 * Default: 1
751 */
752 #ifndef PJMEDIA_HAS_AND_MEDIA_H264
753 # define PJMEDIA_HAS_AND_MEDIA_H264 1
754 #endif
755
756 /**
757 * Enable Android MediaCodec VP8 codec.
758 *
759 * Default: 1
760 */
761 #ifndef PJMEDIA_HAS_AND_MEDIA_VP8
762 # define PJMEDIA_HAS_AND_MEDIA_VP8 1
763 #endif
764
765 /**
766 * Enable Android MediaCodec VP9 codec.
767 *
768 * Default: 1
769 */
770 #ifndef PJMEDIA_HAS_AND_MEDIA_VP9
771 # define PJMEDIA_HAS_AND_MEDIA_VP9 1
772 #endif
773
774 /**
775 * Prioritize to use software video encoder on Android MediaCodec.
776 * Set to 0 to prioritize Hardware encoder.
777 * Note: based on test, software encoder configuration provided the most stable
778 * configuration.
779 *
780 * Default: 1
781 */
782 #ifndef PJMEDIA_AND_MEDIA_PRIO_SW_VID_ENC
783 # define PJMEDIA_AND_MEDIA_PRIO_SW_VID_ENC 1
784 #endif
785
786 /**
787 * Prioritize to use software video encoder on Android MediaCodec.
788 * Set to 0 to prioritize Hardware encoder.
789 * Note: based on test, software decoder configuration provided the most stable
790 * configuration.
791 *
792 * Default: 1
793 */
794 #ifndef PJMEDIA_AND_MEDIA_PRIO_SW_VID_DEC
795 # define PJMEDIA_AND_MEDIA_PRIO_SW_VID_DEC 1
796 #endif
797
798
799 /**
800 * Maximum interval between keyframes for Apple VideoToolbox codecs,
801 * in second.
802 *
803 * Default: 5 (seconds)
804 */
805 #ifndef PJMEDIA_CODEC_VID_TOOLBOX_MAX_KEYFRAME_INTERVAL
806 # define PJMEDIA_CODEC_VID_TOOLBOX_MAX_KEYFRAME_INTERVAL 5
807 #endif
808
809 /**
810 * @}
811 */
812
813
814
815 #endif /* __PJMEDIA_CODEC_CONFIG_H__ */