config.h 19 KB

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