config.h 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. /*
  2. * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. */
  18. #ifndef __PJMEDIA_VIDEODEV_CONFIG_H__
  19. #define __PJMEDIA_VIDEODEV_CONFIG_H__
  20. /**
  21. * @file config.h
  22. * @brief Video config.
  23. */
  24. #include <pjmedia/types.h>
  25. #include <pj/pool.h>
  26. PJ_BEGIN_DECL
  27. /**
  28. * @defgroup video_device_api Video Device API
  29. * @brief PJMEDIA video device abstraction API.
  30. */
  31. /**
  32. * @defgroup s1_video_device_config Compile time configurations
  33. * @ingroup video_device_api
  34. * @brief Compile time configurations
  35. * @{
  36. */
  37. /**
  38. * This setting controls the maximum number of formats that can be
  39. * supported by a video device.
  40. *
  41. * Default: 128 (for Android), 64 (for others)
  42. */
  43. #ifndef PJMEDIA_VID_DEV_INFO_FMT_CNT
  44. # if defined(PJ_ANDROID) && PJ_ANDROID != 0
  45. # define PJMEDIA_VID_DEV_INFO_FMT_CNT 128
  46. # else
  47. # define PJMEDIA_VID_DEV_INFO_FMT_CNT 64
  48. # endif
  49. #endif
  50. /**
  51. * This setting controls the maximum number of supported video device drivers.
  52. *
  53. * Default: 8
  54. */
  55. #ifndef PJMEDIA_VID_DEV_MAX_DRIVERS
  56. # define PJMEDIA_VID_DEV_MAX_DRIVERS 8
  57. #endif
  58. /**
  59. * This setting controls the maximum number of supported video devices.
  60. *
  61. * Default: 16
  62. */
  63. #ifndef PJMEDIA_VID_DEV_MAX_DEVS
  64. # define PJMEDIA_VID_DEV_MAX_DEVS 16
  65. #endif
  66. #if defined(PJMEDIA_HAS_VIDEO) && (PJMEDIA_HAS_VIDEO != 0)
  67. /**
  68. * This setting controls whether OpenGL for iOS should be included.
  69. *
  70. * Default: 0 (or detected by configure)
  71. */
  72. #ifndef PJMEDIA_VIDEO_DEV_HAS_IOS_OPENGL
  73. # define PJMEDIA_VIDEO_DEV_HAS_IOS_OPENGL 0
  74. #else
  75. # if defined(PJMEDIA_VIDEO_DEV_HAS_IOS_OPENGL) && \
  76. PJMEDIA_VIDEO_DEV_HAS_IOS_OPENGL != 0
  77. # undef PJMEDIA_VIDEO_DEV_HAS_OPENGL_ES
  78. # define PJMEDIA_VIDEO_DEV_HAS_OPENGL_ES 1
  79. # endif
  80. #endif
  81. /**
  82. * This setting controls whether OpenGL for Android should be included.
  83. *
  84. * Default: 0 (or detected by configure)
  85. */
  86. #ifndef PJMEDIA_VIDEO_DEV_HAS_ANDROID_OPENGL
  87. # define PJMEDIA_VIDEO_DEV_HAS_ANDROID_OPENGL 0
  88. #else
  89. # if defined(PJMEDIA_VIDEO_DEV_HAS_ANDROID_OPENGL) && \
  90. PJMEDIA_VIDEO_DEV_HAS_ANDROID_OPENGL != 0
  91. # undef PJMEDIA_VIDEO_DEV_HAS_OPENGL_ES
  92. # define PJMEDIA_VIDEO_DEV_HAS_OPENGL_ES 1
  93. # endif
  94. #endif
  95. /**
  96. * This setting controls whether OpenGL ES support should be included.
  97. *
  98. * Default: 0 (or detected by configure)
  99. */
  100. #ifndef PJMEDIA_VIDEO_DEV_HAS_OPENGL_ES
  101. # define PJMEDIA_VIDEO_DEV_HAS_OPENGL_ES 0
  102. #else
  103. # if defined(PJMEDIA_VIDEO_DEV_HAS_OPENGL_ES) && \
  104. PJMEDIA_VIDEO_DEV_HAS_OPENGL_ES != 0
  105. # undef PJMEDIA_VIDEO_DEV_HAS_OPENGL
  106. # define PJMEDIA_VIDEO_DEV_HAS_OPENGL 1
  107. # endif
  108. #endif
  109. /**
  110. * This setting controls whether OpenGL support should be included. Note that as
  111. * currently only OpenGLES is supported, when PJMEDIA_VIDEO_DEV_HAS_OPENGL_ES is
  112. * unset, PJMEDIA_VIDEO_DEV_HAS_OPENGL will automatically also be unset.
  113. *
  114. * Default: 0 (or detected by configure)
  115. */
  116. #ifndef PJMEDIA_VIDEO_DEV_HAS_OPENGL
  117. # define PJMEDIA_VIDEO_DEV_HAS_OPENGL 0
  118. #else
  119. # if defined(PJMEDIA_VIDEO_DEV_HAS_OPENGL_ES) && \
  120. PJMEDIA_VIDEO_DEV_HAS_OPENGL_ES == 0
  121. # undef PJMEDIA_VIDEO_DEV_HAS_OPENGL
  122. # define PJMEDIA_VIDEO_DEV_HAS_OPENGL 0
  123. # endif
  124. #endif
  125. /**
  126. * This setting controls whether SDL support should be included.
  127. *
  128. * Default: 0 (or detected by configure)
  129. */
  130. #ifndef PJMEDIA_VIDEO_DEV_HAS_SDL
  131. # define PJMEDIA_VIDEO_DEV_HAS_SDL 0
  132. #endif
  133. /**
  134. * This setting controls whether SDL with OPENGL support should be included.
  135. *
  136. * Default: 0
  137. */
  138. #ifndef PJMEDIA_VIDEO_DEV_SDL_HAS_OPENGL
  139. # define PJMEDIA_VIDEO_DEV_SDL_HAS_OPENGL 0
  140. #endif
  141. /**
  142. * This setting controls whether QT support should be included.
  143. *
  144. * Default: 0 (or detected by configure)
  145. */
  146. #ifndef PJMEDIA_VIDEO_DEV_HAS_QT
  147. # define PJMEDIA_VIDEO_DEV_HAS_QT 0
  148. #endif
  149. /**
  150. * This setting controls whether IOS support should be included.
  151. *
  152. * Default: 0 (or detected by configure)
  153. */
  154. #ifndef PJMEDIA_VIDEO_DEV_HAS_IOS
  155. # define PJMEDIA_VIDEO_DEV_HAS_IOS 0
  156. #endif
  157. /**
  158. * This setting controls whether Direct Show support should be included.
  159. *
  160. * Default: 0 (unfinished)
  161. */
  162. #ifndef PJMEDIA_VIDEO_DEV_HAS_DSHOW
  163. # define PJMEDIA_VIDEO_DEV_HAS_DSHOW 0 //PJ_WIN32
  164. #endif
  165. /**
  166. * This setting controls whether colorbar source support should be included.
  167. *
  168. * Default: 1
  169. */
  170. #ifndef PJMEDIA_VIDEO_DEV_HAS_CBAR_SRC
  171. # define PJMEDIA_VIDEO_DEV_HAS_CBAR_SRC 1
  172. #endif
  173. /**
  174. * This setting controls whether ffmpeg support should be included.
  175. *
  176. * Default: 0 (unfinished)
  177. */
  178. #ifndef PJMEDIA_VIDEO_DEV_HAS_FFMPEG
  179. # define PJMEDIA_VIDEO_DEV_HAS_FFMPEG 0
  180. #endif
  181. /**
  182. * Video4Linux2
  183. *
  184. * Default: 0 (or detected by configure)
  185. */
  186. #ifndef PJMEDIA_VIDEO_DEV_HAS_V4L2
  187. # define PJMEDIA_VIDEO_DEV_HAS_V4L2 0
  188. #endif
  189. /**
  190. * Enable support for AVI player virtual capture device.
  191. *
  192. * Default: 1
  193. */
  194. #ifndef PJMEDIA_VIDEO_DEV_HAS_AVI
  195. # define PJMEDIA_VIDEO_DEV_HAS_AVI 1
  196. #endif
  197. /**
  198. * This setting controls whether Android support should be included.
  199. *
  200. * Default: 0 (or detected by configure)
  201. */
  202. #ifndef PJMEDIA_VIDEO_DEV_HAS_ANDROID
  203. # define PJMEDIA_VIDEO_DEV_HAS_ANDROID 0
  204. #endif
  205. /**
  206. * Specify the SDL library name to be linked with Visual Studio project.
  207. * By default, the name is autodetected based on SDL version ("sdl.lib" or
  208. * "sdl2.lib"), but application may explicitly specify the library name if this
  209. * autodetection fails. Common names are: "sdl2.lib" or "sdl.lib".
  210. *
  211. * Default: undeclared.
  212. */
  213. #ifndef PJMEDIA_SDL_LIB
  214. # undef PJMEDIA_SDL_LIB
  215. #endif
  216. #endif /* defined(PJMEDIA_HAS_VIDEO) && (PJMEDIA_HAS_VIDEO != 0) */
  217. /**
  218. * @}
  219. */
  220. PJ_END_DECL
  221. #endif /* __PJMEDIA_VIDEODEV_CONFIG_H__ */
  222. /*
  223. --------------------- DOCUMENTATION FOLLOWS ---------------------------
  224. */
  225. /**
  226. * @addtogroup video_device_api Video Device API
  227. * @{
  228. PJMEDIA Video Device API is a cross-platform video API appropriate for use with
  229. VoIP applications and many other types of video streaming applications.
  230. The API abstracts many different video API's on various platforms, such as:
  231. - native Direct Show video for Win32 and Windows Mobile devices
  232. - null-video implementation
  233. - and more to be implemented in the future
  234. The Video Device API/library is an evolution from PJMEDIA @ref PJMED_SND and
  235. contains many enhancements:
  236. - Forward compatibility:
  237. \n
  238. The new API has been designed to be extensible, it will support new API's as
  239. well as new features that may be introduced in the future without breaking
  240. compatibility with applications that use this API as well as compatibility
  241. with existing device implementations.
  242. - Device capabilities:
  243. \n
  244. At the heart of the API is device capabilities management, where all possible
  245. video capabilities of video devices should be able to be handled in a generic
  246. manner. With this framework, new capabilities that may be discovered in the
  247. future can be handled in manner without breaking existing applications.
  248. - Built-in features:
  249. \n
  250. The device capabilities framework enables applications to use and control
  251. video features built-in in the device, such as:
  252. - built-in formats,
  253. - etc.
  254. - Codec support:
  255. \n
  256. Some video devices support built-in hardware video codecs, and application
  257. can use the video device in encoded mode to make use of these hardware
  258. codecs.
  259. - Multiple backends:
  260. \n
  261. The new API supports multiple video backends (called factories or drivers in
  262. the code) to be active simultaneously, and video backends may be added or
  263. removed during run-time.
  264. */
  265. /**
  266. * @}
  267. */