@scrypted/libav 1.0.179 → 1.0.181

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/_openh264install/include/wels/codec_api.h +592 -0
  2. package/_openh264install/include/wels/codec_app_def.h +820 -0
  3. package/_openh264install/include/wels/codec_def.h +216 -0
  4. package/_openh264install/include/wels/codec_ver.h +15 -0
  5. package/_openh264install/lib/libopenh264.a +0 -0
  6. package/_openh264install/lib/pkgconfig/openh264.pc +10 -0
  7. package/binding.gyp +4 -0
  8. package/openh264/.reviewboardrc +3 -0
  9. package/openh264/.travis.yml +42 -0
  10. package/openh264/CODING_STYLE +8 -0
  11. package/openh264/CONTRIBUTORS +55 -0
  12. package/openh264/LICENSE +23 -0
  13. package/openh264/Makefile +408 -0
  14. package/openh264/README.md +197 -0
  15. package/openh264/RELEASES +467 -0
  16. package/openh264/SECURITY.md +16 -0
  17. package/openh264/autotest/codec_comparision/run_MultiCodecComparision.sh +431 -0
  18. package/openh264/autotest/performanceTest/android/run_AutoTest_android.sh +180 -0
  19. package/openh264/autotest/performanceTest/ios/fruitstrap +0 -0
  20. package/openh264/autotest/performanceTest/ios/iFileTransfer +0 -0
  21. package/openh264/autotest/performanceTest/ios/run_AutoTest_ios.sh +193 -0
  22. package/openh264/autotest/performanceTest/ios/uiascript.js +19 -0
  23. package/openh264/autotest/performanceTest/parsePerfData.sh +107 -0
  24. package/openh264/autotest/performanceTest/run_perfTest.sh +122 -0
  25. package/openh264/autotest/unitTest/android/run_AutoTest_android.sh +112 -0
  26. package/openh264/autotest/unitTest/ios/run_AutoTest_ios.sh +167 -0
  27. package/openh264/autotest/unitTest/run_ParseUTxml.sh +70 -0
  28. package/openh264/autotest/unitTest/run_unitTest.sh +98 -0
  29. package/openh264/build.gradle +30 -0
  30. package/openh264/code-coverage.sh +6 -0
  31. package/openh264/codec/api/meson.build +1 -0
  32. package/openh264/codec/api/wels/codec_api.h +592 -0
  33. package/openh264/codec/api/wels/codec_app_def.h +820 -0
  34. package/openh264/codec/api/wels/codec_def.h +216 -0
  35. package/openh264/codec/api/wels/codec_ver.h +15 -0
  36. package/openh264/codec/api/wels/meson.build +9 -0
  37. package/openh264/codec/common/arm/arm_arch_common_macro.S +83 -0
  38. package/openh264/codec/common/arm/copy_mb_neon.S +161 -0
  39. package/openh264/codec/common/arm/deblocking_neon.S +857 -0
  40. package/openh264/codec/common/arm/expand_picture_neon.S +154 -0
  41. package/openh264/codec/common/arm/intra_pred_common_neon.S +82 -0
  42. package/openh264/codec/common/arm/mc_neon.S +2283 -0
  43. package/openh264/codec/common/arm64/arm_aarch64_common.h +85 -0
  44. package/openh264/codec/common/arm64/arm_arch64_common_macro.S +79 -0
  45. package/openh264/codec/common/arm64/copy_mb_aarch64_neon.S +202 -0
  46. package/openh264/codec/common/arm64/deblocking_aarch64_neon.S +852 -0
  47. package/openh264/codec/common/arm64/expand_picture_aarch64_neon.S +150 -0
  48. package/openh264/codec/common/arm64/intra_pred_common_aarch64_neon.S +58 -0
  49. package/openh264/codec/common/arm64/mc_aarch64_neon.S +2614 -0
  50. package/openh264/codec/common/generate_version.sh +28 -0
  51. package/openh264/codec/common/inc/WelsList.h +287 -0
  52. package/openh264/codec/common/inc/WelsLock.h +97 -0
  53. package/openh264/codec/common/inc/WelsTask.h +75 -0
  54. package/openh264/codec/common/inc/WelsTaskThread.h +83 -0
  55. package/openh264/codec/common/inc/WelsThread.h +106 -0
  56. package/openh264/codec/common/inc/WelsThreadLib.h +151 -0
  57. package/openh264/codec/common/inc/WelsThreadPool.h +124 -0
  58. package/openh264/codec/common/inc/asmdefs_mmi.h +345 -0
  59. package/openh264/codec/common/inc/copy_mb.h +103 -0
  60. package/openh264/codec/common/inc/cpu.h +81 -0
  61. package/openh264/codec/common/inc/cpu_core.h +103 -0
  62. package/openh264/codec/common/inc/crt_util_safe_x.h +104 -0
  63. package/openh264/codec/common/inc/deblocking_common.h +124 -0
  64. package/openh264/codec/common/inc/expand_pic.h +107 -0
  65. package/openh264/codec/common/inc/golomb_common.h +166 -0
  66. package/openh264/codec/common/inc/intra_pred_common.h +86 -0
  67. package/openh264/codec/common/inc/loongson_intrinsics.h +1919 -0
  68. package/openh264/codec/common/inc/ls_defines.h +130 -0
  69. package/openh264/codec/common/inc/macros.h +329 -0
  70. package/openh264/codec/common/inc/mc.h +407 -0
  71. package/openh264/codec/common/inc/measure_time.h +88 -0
  72. package/openh264/codec/common/inc/memory_align.h +116 -0
  73. package/openh264/codec/common/inc/msa_macros.h +2393 -0
  74. package/openh264/codec/common/inc/sad_common.h +139 -0
  75. package/openh264/codec/common/inc/typedefs.h +86 -0
  76. package/openh264/codec/common/inc/utils.h +95 -0
  77. package/openh264/codec/common/inc/version.h +10 -0
  78. package/openh264/codec/common/inc/version_gen.h.template +6 -0
  79. package/openh264/codec/common/inc/welsCodecTrace.h +64 -0
  80. package/openh264/codec/common/inc/wels_common_defs.h +373 -0
  81. package/openh264/codec/common/inc/wels_const_common.h +63 -0
  82. package/openh264/codec/common/loongarch/copy_mb_lsx.c +194 -0
  83. package/openh264/codec/common/loongarch/deblock_lsx.c +1489 -0
  84. package/openh264/codec/common/loongarch/intra_pred_com_lasx.c +112 -0
  85. package/openh264/codec/common/loongarch/intra_pred_com_lsx.c +91 -0
  86. package/openh264/codec/common/loongarch/mc_chroma_lsx.c +192 -0
  87. package/openh264/codec/common/loongarch/mc_horver_lsx.c +654 -0
  88. package/openh264/codec/common/loongarch/satd_sad_lasx.c +568 -0
  89. package/openh264/codec/common/meson.build +84 -0
  90. package/openh264/codec/common/mips/copy_mb_mmi.c +477 -0
  91. package/openh264/codec/common/mips/copy_mb_msa.c +80 -0
  92. package/openh264/codec/common/mips/deblock_mmi.c +2826 -0
  93. package/openh264/codec/common/mips/deblock_msa.c +1024 -0
  94. package/openh264/codec/common/mips/expand_picture_mmi.c +673 -0
  95. package/openh264/codec/common/mips/intra_pred_com_mmi.c +548 -0
  96. package/openh264/codec/common/mips/satd_sad_mmi.c +2154 -0
  97. package/openh264/codec/common/targets.mk +136 -0
  98. package/openh264/codec/common/x86/asm_inc.asm +743 -0
  99. package/openh264/codec/common/x86/cpuid.asm +263 -0
  100. package/openh264/codec/common/x86/dct.asm +1036 -0
  101. package/openh264/codec/common/x86/deblock.asm +848 -0
  102. package/openh264/codec/common/x86/expand_picture.asm +728 -0
  103. package/openh264/codec/common/x86/intra_pred_com.asm +117 -0
  104. package/openh264/codec/common/x86/mb_copy.asm +615 -0
  105. package/openh264/codec/common/x86/mc_chroma.asm +313 -0
  106. package/openh264/codec/common/x86/mc_luma.asm +4490 -0
  107. package/openh264/codec/common/x86/satd_sad.asm +2734 -0
  108. package/openh264/codec/common/x86/vaa.asm +411 -0
  109. package/openh264/codec/console/common/inc/read_config.h +68 -0
  110. package/openh264/codec/console/common/meson.build +12 -0
  111. package/openh264/codec/console/common/targets.mk +20 -0
  112. package/openh264/codec/console/dec/inc/d3d9_utils.h +148 -0
  113. package/openh264/codec/console/dec/meson.build +15 -0
  114. package/openh264/codec/console/dec/targets.mk +20 -0
  115. package/openh264/codec/console/enc/meson.build +9 -0
  116. package/openh264/codec/console/enc/targets.mk +19 -0
  117. package/openh264/codec/console/meson.build +3 -0
  118. package/openh264/codec/decoder/core/arm/block_add_neon.S +129 -0
  119. package/openh264/codec/decoder/core/arm/intra_pred_neon.S +635 -0
  120. package/openh264/codec/decoder/core/arm64/block_add_aarch64_neon.S +131 -0
  121. package/openh264/codec/decoder/core/arm64/intra_pred_aarch64_neon.S +524 -0
  122. package/openh264/codec/decoder/core/inc/au_parser.h +199 -0
  123. package/openh264/codec/decoder/core/inc/bit_stream.h +62 -0
  124. package/openh264/codec/decoder/core/inc/cabac_decoder.h +111 -0
  125. package/openh264/codec/decoder/core/inc/deblocking.h +118 -0
  126. package/openh264/codec/decoder/core/inc/dec_frame.h +156 -0
  127. package/openh264/codec/decoder/core/inc/dec_golomb.h +344 -0
  128. package/openh264/codec/decoder/core/inc/decode_mb_aux.h +83 -0
  129. package/openh264/codec/decoder/core/inc/decode_slice.h +104 -0
  130. package/openh264/codec/decoder/core/inc/decoder.h +186 -0
  131. package/openh264/codec/decoder/core/inc/decoder_context.h +590 -0
  132. package/openh264/codec/decoder/core/inc/decoder_core.h +206 -0
  133. package/openh264/codec/decoder/core/inc/error_code.h +222 -0
  134. package/openh264/codec/decoder/core/inc/error_concealment.h +68 -0
  135. package/openh264/codec/decoder/core/inc/fmo.h +114 -0
  136. package/openh264/codec/decoder/core/inc/get_intra_predictor.h +191 -0
  137. package/openh264/codec/decoder/core/inc/manage_dec_ref.h +62 -0
  138. package/openh264/codec/decoder/core/inc/mb_cache.h +80 -0
  139. package/openh264/codec/decoder/core/inc/memmgr_nal_unit.h +66 -0
  140. package/openh264/codec/decoder/core/inc/mv_pred.h +195 -0
  141. package/openh264/codec/decoder/core/inc/nal_prefix.h +56 -0
  142. package/openh264/codec/decoder/core/inc/nalu.h +79 -0
  143. package/openh264/codec/decoder/core/inc/parameter_sets.h +217 -0
  144. package/openh264/codec/decoder/core/inc/parse_mb_syn_cabac.h +89 -0
  145. package/openh264/codec/decoder/core/inc/parse_mb_syn_cavlc.h +137 -0
  146. package/openh264/codec/decoder/core/inc/pic_queue.h +62 -0
  147. package/openh264/codec/decoder/core/inc/picture.h +112 -0
  148. package/openh264/codec/decoder/core/inc/rec_mb.h +104 -0
  149. package/openh264/codec/decoder/core/inc/slice.h +208 -0
  150. package/openh264/codec/decoder/core/inc/vlc_decoder.h +177 -0
  151. package/openh264/codec/decoder/core/inc/wels_common_basis.h +317 -0
  152. package/openh264/codec/decoder/core/inc/wels_const.h +65 -0
  153. package/openh264/codec/decoder/core/inc/wels_decoder_thread.h +170 -0
  154. package/openh264/codec/decoder/core/loongarch/mb_aux_lsx.c +296 -0
  155. package/openh264/codec/decoder/core/mips/dct_mmi.c +786 -0
  156. package/openh264/codec/decoder/core/x86/dct.asm +72 -0
  157. package/openh264/codec/decoder/core/x86/intra_pred.asm +1456 -0
  158. package/openh264/codec/decoder/meson.build +69 -0
  159. package/openh264/codec/decoder/plus/inc/welsDecoderExt.h +170 -0
  160. package/openh264/codec/decoder/targets.mk +115 -0
  161. package/openh264/codec/encoder/core/arm/intra_pred_neon.S +589 -0
  162. package/openh264/codec/encoder/core/arm/intra_pred_sad_3_opt_neon.S +735 -0
  163. package/openh264/codec/encoder/core/arm/memory_neon.S +62 -0
  164. package/openh264/codec/encoder/core/arm/pixel_neon.S +882 -0
  165. package/openh264/codec/encoder/core/arm/reconstruct_neon.S +903 -0
  166. package/openh264/codec/encoder/core/arm/svc_motion_estimation.S +366 -0
  167. package/openh264/codec/encoder/core/arm64/intra_pred_aarch64_neon.S +505 -0
  168. package/openh264/codec/encoder/core/arm64/intra_pred_sad_3_opt_aarch64_neon.S +611 -0
  169. package/openh264/codec/encoder/core/arm64/memory_aarch64_neon.S +63 -0
  170. package/openh264/codec/encoder/core/arm64/pixel_aarch64_neon.S +621 -0
  171. package/openh264/codec/encoder/core/arm64/reconstruct_aarch64_neon.S +717 -0
  172. package/openh264/codec/encoder/core/arm64/svc_motion_estimation_aarch64_neon.S +350 -0
  173. package/openh264/codec/encoder/core/inc/as264_common.h +138 -0
  174. package/openh264/codec/encoder/core/inc/au_set.h +152 -0
  175. package/openh264/codec/encoder/core/inc/deblocking.h +92 -0
  176. package/openh264/codec/encoder/core/inc/decode_mb_aux.h +112 -0
  177. package/openh264/codec/encoder/core/inc/dq_map.h +58 -0
  178. package/openh264/codec/encoder/core/inc/encode_mb_aux.h +199 -0
  179. package/openh264/codec/encoder/core/inc/encoder.h +148 -0
  180. package/openh264/codec/encoder/core/inc/encoder_context.h +240 -0
  181. package/openh264/codec/encoder/core/inc/extern.h +124 -0
  182. package/openh264/codec/encoder/core/inc/get_intra_predictor.h +186 -0
  183. package/openh264/codec/encoder/core/inc/mb_cache.h +141 -0
  184. package/openh264/codec/encoder/core/inc/md.h +181 -0
  185. package/openh264/codec/encoder/core/inc/mt_defs.h +91 -0
  186. package/openh264/codec/encoder/core/inc/mv_pred.h +191 -0
  187. package/openh264/codec/encoder/core/inc/nal_encap.h +143 -0
  188. package/openh264/codec/encoder/core/inc/param_svc.h +576 -0
  189. package/openh264/codec/encoder/core/inc/parameter_sets.h +181 -0
  190. package/openh264/codec/encoder/core/inc/paraset_strategy.h +310 -0
  191. package/openh264/codec/encoder/core/inc/picture.h +137 -0
  192. package/openh264/codec/encoder/core/inc/picture_handle.h +66 -0
  193. package/openh264/codec/encoder/core/inc/rc.h +284 -0
  194. package/openh264/codec/encoder/core/inc/ref_list_mgr_svc.h +148 -0
  195. package/openh264/codec/encoder/core/inc/sample.h +154 -0
  196. package/openh264/codec/encoder/core/inc/set_mb_syn_cabac.h +127 -0
  197. package/openh264/codec/encoder/core/inc/set_mb_syn_cavlc.h +92 -0
  198. package/openh264/codec/encoder/core/inc/slice.h +212 -0
  199. package/openh264/codec/encoder/core/inc/slice_multi_threading.h +97 -0
  200. package/openh264/codec/encoder/core/inc/stat.h +102 -0
  201. package/openh264/codec/encoder/core/inc/svc_base_layer_md.h +102 -0
  202. package/openh264/codec/encoder/core/inc/svc_enc_frame.h +136 -0
  203. package/openh264/codec/encoder/core/inc/svc_enc_golomb.h +123 -0
  204. package/openh264/codec/encoder/core/inc/svc_enc_macroblock.h +82 -0
  205. package/openh264/codec/encoder/core/inc/svc_enc_slice_segment.h +212 -0
  206. package/openh264/codec/encoder/core/inc/svc_encode_mb.h +63 -0
  207. package/openh264/codec/encoder/core/inc/svc_encode_slice.h +184 -0
  208. package/openh264/codec/encoder/core/inc/svc_mode_decision.h +94 -0
  209. package/openh264/codec/encoder/core/inc/svc_motion_estimate.h +369 -0
  210. package/openh264/codec/encoder/core/inc/svc_set_mb_syn.h +70 -0
  211. package/openh264/codec/encoder/core/inc/svc_set_mb_syn_cavlc.h +67 -0
  212. package/openh264/codec/encoder/core/inc/vlc_encoder.h +92 -0
  213. package/openh264/codec/encoder/core/inc/wels_common_basis.h +160 -0
  214. package/openh264/codec/encoder/core/inc/wels_const.h +174 -0
  215. package/openh264/codec/encoder/core/inc/wels_func_ptr_def.h +300 -0
  216. package/openh264/codec/encoder/core/inc/wels_preprocess.h +251 -0
  217. package/openh264/codec/encoder/core/inc/wels_task_base.h +79 -0
  218. package/openh264/codec/encoder/core/inc/wels_task_encoder.h +142 -0
  219. package/openh264/codec/encoder/core/inc/wels_task_management.h +135 -0
  220. package/openh264/codec/encoder/core/inc/wels_transpose_matrix.h +58 -0
  221. package/openh264/codec/encoder/core/loongarch/dct_lasx.c +452 -0
  222. package/openh264/codec/encoder/core/loongarch/get_intra_predictor_lsx.c +166 -0
  223. package/openh264/codec/encoder/core/loongarch/quant_lsx.c +153 -0
  224. package/openh264/codec/encoder/core/loongarch/sample_lasx.c +87 -0
  225. package/openh264/codec/encoder/core/loongarch/svc_motion_estimate_lsx.c +104 -0
  226. package/openh264/codec/encoder/core/mips/dct_mmi.c +529 -0
  227. package/openh264/codec/encoder/core/mips/quant_mmi.c +553 -0
  228. package/openh264/codec/encoder/core/mips/score_mmi.c +324 -0
  229. package/openh264/codec/encoder/core/x86/coeff.asm +695 -0
  230. package/openh264/codec/encoder/core/x86/dct.asm +108 -0
  231. package/openh264/codec/encoder/core/x86/intra_pred.asm +1129 -0
  232. package/openh264/codec/encoder/core/x86/matrix_transpose.asm +395 -0
  233. package/openh264/codec/encoder/core/x86/memzero.asm +132 -0
  234. package/openh264/codec/encoder/core/x86/quant.asm +507 -0
  235. package/openh264/codec/encoder/core/x86/sample_sc.asm +1829 -0
  236. package/openh264/codec/encoder/core/x86/score.asm +363 -0
  237. package/openh264/codec/encoder/meson.build +98 -0
  238. package/openh264/codec/encoder/plus/inc/welsEncoderExt.h +129 -0
  239. package/openh264/codec/encoder/targets.mk +146 -0
  240. package/openh264/codec/meson.build +9 -0
  241. package/openh264/codec/processing/interface/IWelsVP.h +310 -0
  242. package/openh264/codec/processing/meson.build +71 -0
  243. package/openh264/codec/processing/targets.mk +117 -0
  244. package/openh264/docs/doxygen/Doxyfile +1865 -0
  245. package/openh264/docs/doxygen/Home.rest +25 -0
  246. package/openh264/docs/doxygen/ISVCDecoder.rest +19 -0
  247. package/openh264/docs/doxygen/ISVCEncoder.rest +16 -0
  248. package/openh264/docs/doxygen/UsageExampleForDecoder.rest +10 -0
  249. package/openh264/docs/doxygen/UsageExampleForEncoder.rest +15 -0
  250. package/openh264/docs/doxygen2rst.py +619 -0
  251. package/openh264/gmpopenh264.info +4 -0
  252. package/openh264/gradlew +172 -0
  253. package/openh264/meson.build +218 -0
  254. package/openh264/meson_options.txt +1 -0
  255. package/openh264/module/RefCounted.h +141 -0
  256. package/openh264/module/gmp-openh264.cpp +1196 -0
  257. package/openh264/module/targets.mk +14 -0
  258. package/openh264/module/task_utils.h +38 -0
  259. package/openh264/module/task_utils.py +207 -0
  260. package/openh264/module/task_utils_generated.h +2087 -0
  261. package/openh264/openh264.def +7 -0
  262. package/openh264/openh264.pc.in +10 -0
  263. package/openh264/openh264.rc +61 -0
  264. package/openh264/openh264.rc.template +61 -0
  265. package/openh264/res/Adobe_PDF_sample_a_1024x768_50Frms.264 +0 -0
  266. package/openh264/res/BA1_FT_C.264 +0 -0
  267. package/openh264/res/BA1_Sony_D.jsv +0 -0
  268. package/openh264/res/BAMQ1_JVC_C.264 +0 -0
  269. package/openh264/res/BAMQ2_JVC_C.264 +0 -0
  270. package/openh264/res/BANM_MW_D.264 +0 -0
  271. package/openh264/res/BASQP1_Sony_C.jsv +0 -0
  272. package/openh264/res/BA_MW_D.264 +0 -0
  273. package/openh264/res/BA_MW_D_IDR_LOST.264 +0 -0
  274. package/openh264/res/BA_MW_D_P_LOST.264 +0 -0
  275. package/openh264/res/CI1_FT_B.264 +0 -0
  276. package/openh264/res/CI_MW_D.264 +0 -0
  277. package/openh264/res/CVFC1_Sony_C.jsv +0 -0
  278. package/openh264/res/CVPCMNL1_SVA_C.264 +0 -0
  279. package/openh264/res/CiscoVT2people_160x96_6fps.yuv +1 -0
  280. package/openh264/res/CiscoVT2people_320x192_12fps.yuv +1 -0
  281. package/openh264/res/Cisco_Absolute_Power_1280x720_30fps.yuv +3607 -0
  282. package/openh264/res/Cisco_Adobe_PDF_sample_a_1024x768_CAVLC_Bframe_9.264 +0 -0
  283. package/openh264/res/Cisco_Men_whisper_640x320_CABAC_Bframe_9.264 +0 -0
  284. package/openh264/res/Cisco_Men_whisper_640x320_CAVLC_Bframe_9.264 +0 -0
  285. package/openh264/res/Error_I_P.264 +0 -0
  286. package/openh264/res/LS_SVA_D.264 +0 -0
  287. package/openh264/res/MIDR_MW_D.264 +0 -0
  288. package/openh264/res/MPS_MW_A.264 +0 -0
  289. package/openh264/res/MR1_BT_A.h264 +0 -0
  290. package/openh264/res/MR1_MW_A.264 +0 -0
  291. package/openh264/res/MR2_MW_A.264 +0 -0
  292. package/openh264/res/MR2_TANDBERG_E.264 +0 -0
  293. package/openh264/res/NL1_Sony_D.jsv +0 -0
  294. package/openh264/res/NLMQ1_JVC_C.264 +0 -0
  295. package/openh264/res/NLMQ2_JVC_C.264 +0 -0
  296. package/openh264/res/NRF_MW_E.264 +0 -0
  297. package/openh264/res/QCIF_2P_I_allIPCM.264 +0 -0
  298. package/openh264/res/SVA_BA1_B.264 +0 -0
  299. package/openh264/res/SVA_BA2_D.264 +0 -0
  300. package/openh264/res/SVA_Base_B.264 +0 -0
  301. package/openh264/res/SVA_CL1_E.264 +0 -0
  302. package/openh264/res/SVA_FM1_E.264 +0 -0
  303. package/openh264/res/SVA_NL1_B.264 +0 -0
  304. package/openh264/res/SVA_NL2_E.264 +0 -0
  305. package/openh264/res/SarVui.264 +0 -0
  306. package/openh264/res/Static.264 +0 -0
  307. package/openh264/res/Static_152_100.yuv +1 -0
  308. package/openh264/res/VID_1280x544_cabac_temporal_direct.264 +0 -0
  309. package/openh264/res/VID_1280x544_cavlc_temporal_direct.264 +0 -0
  310. package/openh264/res/VID_1280x720_cabac_temporal_direct.264 +0 -0
  311. package/openh264/res/VID_1280x720_cavlc_temporal_direct.264 +0 -0
  312. package/openh264/res/VID_1920x1080_cabac_temporal_direct.264 +0 -0
  313. package/openh264/res/VID_1920x1080_cavlc_temporal_direct.264 +0 -0
  314. package/openh264/res/Zhling_1280x720.264 +0 -0
  315. package/openh264/res/jm_1080p_allslice.264 +0 -0
  316. package/openh264/res/sps_subsetsps_bothVUI.264 +0 -0
  317. package/openh264/res/test_cif_I_CABAC_PCM.264 +0 -0
  318. package/openh264/res/test_cif_I_CABAC_slice.264 +0 -0
  319. package/openh264/res/test_cif_P_CABAC_slice.264 +0 -0
  320. package/openh264/res/test_qcif_cabac.264 +0 -0
  321. package/openh264/res/test_scalinglist_jm.264 +0 -0
  322. package/openh264/res/test_vd_1d.264 +0 -0
  323. package/openh264/res/test_vd_rc.264 +0 -0
  324. package/openh264/run_Test.sh +91 -0
  325. package/openh264/settings.gradle +4 -0
  326. package/openh264/subprojects/gtest.wrap +10 -0
  327. package/openh264/testbin/AutoBuild_Windows_VS2008.bat +59 -0
  328. package/openh264/testbin/CmdLineExample.sh +7 -0
  329. package/openh264/testbin/CmdLineReadMe +22 -0
  330. package/openh264/testbin/layer2.cfg +37 -0
  331. package/openh264/testbin/layer2_arbitrary_res.cfg +37 -0
  332. package/openh264/testbin/layer2_vd.cfg +38 -0
  333. package/openh264/testbin/layer2_vd_rc.cfg +38 -0
  334. package/openh264/testbin/welsenc.cfg +71 -0
  335. package/openh264/testbin/welsenc_arbitrary_res.cfg +70 -0
  336. package/openh264/testbin/welsenc_ios.cfg +71 -0
  337. package/openh264/testbin/welsenc_vd_1d.cfg +70 -0
  338. package/openh264/testbin/welsenc_vd_rc.cfg +69 -0
  339. package/openh264/ut.def +2 -0
  340. package/package.json +1 -1
@@ -0,0 +1,619 @@
1
+ from __future__ import print_function
2
+ import re, sys, os, time, glob, errno, tempfile, binascii, subprocess, shutil
3
+ from lxml import etree
4
+ from optparse import OptionParser
5
+ import textwrap
6
+ import string
7
+
8
+ VERSION = '0.1'
9
+ __all__ = ['DoxyGen2RST']
10
+ LINE_BREAKER = "\n"
11
+ MAX_COLUMN = 80
12
+
13
+ def is_valid_uuid(uuid_string):
14
+ uuid4hex = re.compile('[0-9a-f]{32}\Z', re.I)
15
+ return uuid4hex.match(uuid_string) != None
16
+
17
+ def get_page(refid):
18
+ fields = refid.split("_")
19
+ if(is_valid_uuid(fields[-1][-32:])):
20
+ return ["_".join(fields[0:-1]), fields[-1]]
21
+ return [refid, None]
22
+
23
+ def mkdir_p(path):
24
+ try:
25
+ os.makedirs(path)
26
+ except OSError as exc: # Python >2.5
27
+ if exc.errno == errno.EEXIST and os.path.isdir(path):
28
+ pass
29
+ else:
30
+ raise
31
+
32
+ def _glob(path, *exts):
33
+ path = os.path.join(path, "*") if os.path.isdir(path) else path + "*"
34
+ return [f for files in [glob.glob(path + ext) for ext in exts] for f in files]
35
+
36
+ class DoxyGen2RST(object):
37
+ """
38
+ Customize the Doxygen XML output into RST format, then it can
39
+ be translated into all formats with the unified user interface.
40
+ The Doxygen output itself is too verbose and not hard to be
41
+ organized for a good documentation.
42
+ """
43
+
44
+ def __init__(self,
45
+ src,
46
+ dst,
47
+ missing_filename = "missing.rst",
48
+ is_github = False,
49
+ enable_uml = True,
50
+ github_ext = ""):
51
+ self.doxy_output_dir = os.path.join(src, "_doxygen", "xml")
52
+ self.output_dir = dst
53
+ self.rst_dir = src
54
+ self.enable_uml = enable_uml
55
+ mkdir_p(dst)
56
+ self.is_github = is_github
57
+ if(is_github):
58
+ self.page_ext = github_ext
59
+ self.anchor_prefix = "wiki-"
60
+ else:
61
+ self.anchor_prefix = ""
62
+ self.page_ext = ".html"
63
+ self.filter = ["*.rst", "*.rest"]
64
+ self.re_doxy = "<doxygen2rst\s(\S*)=(\S*)>(.*?)</doxygen2rst>"
65
+ self.index_root = etree.parse(os.path.join(self.doxy_output_dir, "index.xml")).getroot()
66
+ self.references = {}
67
+ self.missed_types_structs = {}
68
+ self.name_refid_map = {}
69
+ self.build_references()
70
+ self.page_references = {}
71
+ self.missing_filename = missing_filename
72
+ self.temp_uml_path = os.path.join(tempfile.gettempdir(), "uml_" + binascii.b2a_hex(os.urandom(15)))
73
+ if os.path.exists(self.temp_uml_path):
74
+ shutil.rmtree(self.temp_uml_path)
75
+ os.mkdir(self.temp_uml_path)
76
+
77
+ def _find_ref_id(self, kind, name):
78
+ #print("_find_ref_id, %s - %s" %(kind, name))
79
+ if(kind == "function"):
80
+ for comp in self.index_root.iter("member"):
81
+ if(comp.attrib["kind"].lower() == kind.lower() and
82
+ comp.findtext("name").lower() == name.lower()):
83
+ return (comp.attrib["refid"])
84
+ pass
85
+ else:
86
+ for comp in self.index_root.iter("compound"):
87
+ if(comp.attrib["kind"].lower() == kind.lower() and
88
+ comp.findtext("name").lower() == name.lower()):
89
+ return comp.attrib["refid"]
90
+ return None
91
+
92
+ def strip_title_ref(self, text):
93
+ table = string.maketrans("","")
94
+ retstr = text.translate(table, string.punctuation)
95
+ words = retstr.split()
96
+ retstr = "-".join(words)
97
+ return retstr.lower()
98
+
99
+ def build_references(self):
100
+ for file in _glob(self.rst_dir, *self.filter):
101
+ filename = os.path.basename(file)
102
+ fin = open(file,'r')
103
+ content = fin.read()
104
+ it = re.finditer(self.re_doxy, content, re.DOTALL)
105
+ for m in it:
106
+ ref_id = self._find_ref_id(m.groups()[0], m.groups()[1])
107
+ if(ref_id is None):
108
+ #print("Reference is NOT found for: %s=%s" % (m.groups()[0], m.groups()[1]))
109
+ continue
110
+ page_name = os.path.splitext(filename)[0]
111
+ title_ref = self.strip_title_ref(m.groups()[2])
112
+ self.references[ref_id] = [m.groups()[0], m.groups()[1], page_name, filename, title_ref]
113
+ self.name_refid_map[m.groups()[1]] = ref_id
114
+ fin.close()
115
+ #print(self.references)
116
+
117
+ def call_plantuml(self):
118
+ if(not self.enable_uml):
119
+ return
120
+
121
+ java_bin = os.path.join(os.environ['JAVA_HOME'], "bin", "java")
122
+ output_path = os.path.abspath(os.path.join(self.output_dir, "images"))
123
+ cmds = ["\"" + java_bin + "\"", "-jar", "plantuml.jar", self.temp_uml_path + "/", "-o", output_path]
124
+ print(" ".join(cmds))
125
+ os.system(" ".join(cmds))
126
+ shutil.rmtree(self.temp_uml_path)
127
+
128
+ def _build_uml(self, uml_name, content):
129
+ uml_path = os.path.join(self.temp_uml_path, uml_name + ".txt")
130
+ fuml = open(uml_path, "w+")
131
+ fuml.write("@startuml\n")
132
+ fuml.write(content)
133
+ fuml.write("\n@enduml\n")
134
+ fuml.close()
135
+ return ".. image:: images/" + uml_name + ".png" + LINE_BREAKER
136
+
137
+ def _build(self, m):
138
+ retstr = ""
139
+ if(m.groups()[0] == "uml"):
140
+ retstr = self._build_uml(m.groups()[1], m.groups()[2])
141
+ elif(m.groups()[0] == "link"):
142
+ link = m.groups()[1] + self.page_ext
143
+ retstr = ("`%s <%s>`_" % (m.groups()[2], link))
144
+ else:
145
+ if(m.groups()[0] != "function"):
146
+ retstr += self._build_title(m.groups()[2])
147
+ retstr += self.convert_doxy(m.groups()[0], m.groups()[1])
148
+
149
+ return retstr
150
+
151
+ def generate(self):
152
+ for file in _glob(self.rst_dir, *self.filter):
153
+ filename = os.path.basename(file)
154
+ fin = open(file,'r')
155
+ input_txt = fin.read()
156
+ fin.close()
157
+
158
+ output_txt = re.sub(self.re_doxy, self._build, input_txt, 0, re.DOTALL)
159
+ output_txt += self._build_page_ref_notes()
160
+
161
+ fout = open(os.path.join(self.output_dir, filename), 'w+')
162
+ fout.write(output_txt)
163
+ fout.close()
164
+ #print("%s --- %s" %( file, os.path.join(self.output_dir, filename)))
165
+
166
+ self._build_missed_types_and_structs()
167
+ self.call_plantuml()
168
+
169
+ def make_para_title(self, title, indent = 4):
170
+ retstr = LINE_BREAKER
171
+ if(title):
172
+ retstr += "".ljust(indent, " ") + "| **" + title + "**" + LINE_BREAKER
173
+ return retstr
174
+
175
+ def _build_title(self, title, flag = '=', ref = None):
176
+ retstr = LINE_BREAKER
177
+ if(ref):
178
+ retstr += ".. _ref-" + ref + ":" + LINE_BREAKER + LINE_BREAKER
179
+ retstr += title + LINE_BREAKER
180
+ retstr += "".ljust(20, flag) + LINE_BREAKER
181
+ retstr += LINE_BREAKER
182
+ return retstr
183
+
184
+ def _build_ref(self, node):
185
+ text = node.text.strip()
186
+ retstr = ""
187
+ target = '`' + text + '`'
188
+ retstr += target + "_ "
189
+ if target in self.page_references:
190
+ reflink = self.page_references[target]
191
+ print("Link already added: %s == %s" % (reflink[0], node.attrib["refid"]))
192
+ assert(reflink[0] == node.attrib["refid"])
193
+ pass
194
+ else:
195
+ self.page_references[target] = (node.attrib["refid"], node.attrib["kindref"], text)
196
+
197
+ return retstr
198
+
199
+ def _build_code_block(self, node):
200
+ retstr = "::" + LINE_BREAKER + LINE_BREAKER
201
+ for codeline in node.iter("codeline"):
202
+ retstr += " "
203
+ for phrases in codeline.iter("highlight"):
204
+ if(phrases.text):
205
+ retstr += phrases.text.strip()
206
+ for child in phrases:
207
+ if(child.text):
208
+ retstr += child.text.strip()
209
+ if(child.tag == "sp"):
210
+ retstr += " "
211
+ if(child.tag == "ref" and child.text):
212
+ #escape the reference in the code block
213
+ retstr += "" # self._build_ref(child)
214
+ if(child.tail):
215
+ retstr += child.tail.strip()
216
+ retstr += LINE_BREAKER
217
+ return retstr
218
+
219
+ def _build_itemlist(self, node):
220
+ retstr = ""
221
+ for para in node:
222
+ if(para.tag != "para"):
223
+ continue
224
+ if(para.text):
225
+ retstr += para.text.strip()
226
+ for child in para:
227
+ if(child.tag == "ref" and child.text):
228
+ retstr += self._build_ref(child)
229
+ if(child.tail):
230
+ retstr += child.tail.strip()
231
+
232
+ return retstr
233
+
234
+ def _build_itemizedlist(self, node):
235
+ retstr = LINE_BREAKER
236
+ if(node == None):
237
+ return ""
238
+ for item in node:
239
+ if(item.tag != "listitem"):
240
+ continue
241
+ retstr += " - " + self._build_itemlist(item)
242
+ retstr += LINE_BREAKER
243
+ return retstr
244
+
245
+ def _build_verbatim(self, node):
246
+ retstr = LINE_BREAKER
247
+ if(node.text):
248
+ lines = node.text.splitlines()
249
+ print(lines[0])
250
+ m = re.search("{plantuml}\s(\S*)", lines[0])
251
+ if(m):
252
+ uml_name = "uml_" + m.groups()[0]
253
+ retstr += self._build_uml(uml_name, "\n".join(lines[1:]))
254
+ else:
255
+ retstr += "::" + LINE_BREAKER + LINE_BREAKER
256
+ retstr += node.text
257
+
258
+ return retstr
259
+
260
+ def _build_para(self, para):
261
+ retstr = ""
262
+ no_new_line = False
263
+ if(para.text):
264
+ retstr += textwrap.fill(para.text.strip(), MAX_COLUMN) + LINE_BREAKER + LINE_BREAKER
265
+ for child in para:
266
+ no_new_line = False
267
+ if(child.tag == "simplesect"):
268
+ for child_para in child:
269
+ if(child.attrib["kind"] == "return"):
270
+ return_str = self._build_para(child_para)
271
+ retstr += "".ljust(4, " ") + "| Return:" + LINE_BREAKER
272
+ for line in return_str.splitlines():
273
+ retstr += "".ljust(4, " ") + "| " + line + LINE_BREAKER
274
+ elif(child_para.tag == "title" and child_para.text):
275
+ lf.make_para_title(child_para.text.strip(), 4)
276
+ elif(child_para.tag == "para"): #for @see
277
+ retstr += self._build_para(child_para)
278
+ elif(child_para.text):
279
+ retstr += "".ljust(4, " ") + "| " + child_para.text.strip() + LINE_BREAKER
280
+ if(child.tag == "preformatted"):
281
+ retstr += "::" + LINE_BREAKER + LINE_BREAKER
282
+ if(child.text):
283
+ for line in child.text.splitlines():
284
+ retstr += " " + line + LINE_BREAKER
285
+ if(child.tag == "ref" and child.text):
286
+ retstr = retstr.rstrip('\n')
287
+ retstr += " " + self._build_ref(child)
288
+ no_new_line = True
289
+ if(child.tag == "programlisting"):
290
+ retstr += self._build_code_block(child)
291
+ if(child.tag == "itemizedlist"):
292
+ retstr += self._build_itemizedlist(child)
293
+ if(child.tag == "verbatim"):
294
+ retstr += self._build_verbatim(child)
295
+ if(not no_new_line):
296
+ retstr += LINE_BREAKER
297
+ if(child.tail):
298
+ retstr += textwrap.fill(child.tail.strip(), MAX_COLUMN) + LINE_BREAKER + LINE_BREAKER
299
+ return retstr
300
+
301
+ def get_text(self, node):
302
+ retstr = ""
303
+ if(node == None):
304
+ return ""
305
+ for para in node:
306
+ if(para.tag != "para"):
307
+ continue
308
+ retstr += self._build_para(para)
309
+
310
+ return retstr
311
+
312
+ def _find_text_ref(self, node):
313
+ retstr = ""
314
+ if(node.text):
315
+ retstr += node.text.strip()
316
+ for child in node:
317
+ if(child.tag == "ref"):
318
+ retstr += " " + self._build_ref(child) + " "
319
+ if(child.tail):
320
+ retstr += child.tail.strip()
321
+ return retstr
322
+
323
+ def _build_row_breaker(self, columns):
324
+ retstr = "+"
325
+ for column in columns:
326
+ retstr += "".ljust(column, "-") + "+"
327
+ return retstr + LINE_BREAKER
328
+
329
+ def _wrap_cell(self, text, length = 30):
330
+ newlines = []
331
+ for line in text.splitlines():
332
+ newlines.extend(textwrap.wrap(line, length))
333
+ return newlines
334
+
335
+ def _build_row(self, row, columns):
336
+ retstr = ""
337
+ row_lines = []
338
+ max_line = 0
339
+ for i in range(3):
340
+ row_lines.append(row[i].splitlines())
341
+ if(max_line < len(row_lines[i])):
342
+ max_line = len(row_lines[i])
343
+
344
+ for i in range(max_line):
345
+ for j in range(3):
346
+ retstr += "|"
347
+ if(len(row_lines[j]) > i):
348
+ retstr += row_lines[j][i]
349
+ retstr += "".ljust(columns[j] - len(row_lines[j][i]), " ")
350
+ else:
351
+ retstr += "".ljust(columns[j], " ")
352
+ retstr += "|" + LINE_BREAKER
353
+ return retstr
354
+
355
+ def _build_table(self, rows):
356
+ retstr = ""
357
+ columns = [0, 0, 0]
358
+ for row in rows:
359
+ for i in range(3):
360
+ for rowline in row[i].splitlines():
361
+ if(columns[i] < len(rowline) + 2):
362
+ columns[i] = len(rowline) + 2
363
+
364
+ #columns[0] = 40 if(columns[0] > 40) else columns[0]
365
+ #columns[1] = 40 if(columns[1] > 40) else columns[1]
366
+ #columns[2] = MAX_COLUMN - columns[0] - columns[1]
367
+
368
+ retstr += self._build_row_breaker(columns)
369
+ for row in rows:
370
+ retstr += self._build_row(row, columns)
371
+ retstr += self._build_row_breaker(columns)
372
+ return retstr;
373
+
374
+ def build_param_list(self, params, paramdescs):
375
+ retstr = ""
376
+ param_descriptions = []
377
+ for desc in paramdescs:
378
+ param_descriptions.append(desc)
379
+
380
+ rows = []
381
+ rows.append(("Name", "Type", "Descritpion"))
382
+ for param in params:
383
+ declname = param.findtext("declname")
384
+ paramdesc = None
385
+ for desc in param_descriptions:
386
+ paramname = desc.findtext("parameternamelist/parametername")
387
+ if(paramname.lower() == declname.lower()):
388
+ paramdesc = desc.find("parameterdescription")
389
+ break
390
+ decltype = self._find_text_ref(param.find("type"))
391
+ rows.append((declname, decltype, self.get_text(paramdesc)))
392
+
393
+ if(len(rows) > 1):
394
+ retstr += self._build_table(rows)
395
+ return retstr
396
+
397
+ def _build_enum(self, member):
398
+ enum_id = member.attrib["id"]
399
+ file, tag = get_page(enum_id)
400
+ retstr = self._build_title(member.findtext("name"), ref = tag)
401
+ detail_node = self.get_desc_node(member)
402
+ if(detail_node is not None):
403
+ retstr += LINE_BREAKER
404
+ retstr += self.get_text(detail_node)
405
+
406
+ rows = []
407
+ rows.append(("Name", "Initializer", "Descritpion"))
408
+ for enumvalue in member.iter("enumvalue"):
409
+ name = enumvalue.findtext("name")
410
+ initializer = enumvalue.findtext("initializer")
411
+ if(not initializer):
412
+ initializer = ""
413
+ desc = self.get_text(enumvalue.find("briefdescription"))
414
+ desc += self.get_text(enumvalue.find("detaileddescription"))
415
+ if(not desc):
416
+ desc = ""
417
+ rows.append((name, initializer, desc))
418
+
419
+ if(len(rows) > 1):
420
+ retstr += self._build_table(rows)
421
+ return retstr
422
+
423
+
424
+ def _build_struct(self, node):
425
+ retstr = ""
426
+ detail_node = self.get_desc_node(node)
427
+ if(detail_node is not None):
428
+ retstr += self.get_text(detail_node) + LINE_BREAKER
429
+ rows = []
430
+ rows.append(("Name", "Type", "Descritpion"))
431
+ for member in node.iter("memberdef"):
432
+ if(member.attrib["kind"] == "variable"):
433
+ name = member.findtext("name")
434
+ type = self._find_text_ref(member.find("type"))
435
+ desc = self.get_text(member.find("briefdescription"))
436
+ desc += self.get_text(member.find("detaileddescription"))
437
+ desc += self.get_text(member.find("inbodydescription"))
438
+ if(not desc):
439
+ desc = ""
440
+ rows.append((name, type, desc))
441
+
442
+ if(len(rows) > 1):
443
+ retstr += self._build_table(rows)
444
+ return retstr
445
+
446
+ def _build_class(self, node):
447
+ retstr = ""
448
+
449
+ for member in node.iter("memberdef"):
450
+ if(member.attrib["kind"] == "function"):
451
+ retstr += self.build_function(member)
452
+ return retstr
453
+
454
+ def get_desc_node(self, member):
455
+ detail_node = member.find("detaileddescription")
456
+ brief_node = member.find("briefdescription")
457
+ detail_txt = ""
458
+ if(detail_node == None and brief_node == None):
459
+ return None
460
+
461
+ if(detail_node is not None):
462
+ detail_txt = detail_node.findtext("para")
463
+
464
+ if(not detail_txt and brief_node != None):
465
+ detail_txt = brief_node.findtext("para")
466
+ detail_node = brief_node
467
+
468
+ return detail_node
469
+
470
+ def build_function(self, member):
471
+ retstr = ""
472
+
473
+ desc_node = self.get_desc_node(member)
474
+ if(desc_node is None):
475
+ return ""
476
+ detail_txt = desc_node.findtext("para")
477
+ if(not detail_txt or detail_txt.strip() == "{ignore}"):
478
+ return ""
479
+
480
+ func_id = member.attrib["id"]
481
+ page_id, ref_id = get_page(func_id)
482
+ retstr += self._build_title(member.findtext("name"), '-', ref = ref_id)
483
+ retstr += self.get_text(desc_node)
484
+ retstr += LINE_BREAKER
485
+ detail_node = member.find("detaileddescription")
486
+ if(desc_node != detail_node):
487
+ retstr += self.get_text(detail_node)
488
+ retstr += self.build_param_list(member.iter("param"), detail_node.iter("parameteritem"))
489
+ return retstr
490
+
491
+ def _build_missed_types_and_structs(self):
492
+ fout = open(os.path.join(self.output_dir, self.missing_filename), 'w+')
493
+ fout.write(".. contents:: " + LINE_BREAKER)
494
+ fout.write(" :local:" + LINE_BREAKER)
495
+ fout.write(" :depth: 2" + LINE_BREAKER + LINE_BREAKER)
496
+
497
+ footnote = ""
498
+ while (len(self.missed_types_structs) > 0):
499
+ for key, value in self.missed_types_structs.iteritems():
500
+ fout.write(self.covert_item(value[0], key, value[1]))
501
+ #print(value)
502
+ self.missed_types_structs = {}
503
+ footnote += self._build_page_ref_notes()
504
+
505
+ fout.write(footnote)
506
+
507
+ fout.close()
508
+
509
+ def _build_page_ref_notes(self):
510
+ retstr = LINE_BREAKER
511
+ #TODO
512
+ for key, value in self.page_references.iteritems():
513
+ page, tag = get_page(value[0])
514
+ m = re.search("_8h_", page)
515
+ if(m):
516
+ continue;
517
+
518
+ rstname = None
519
+ anchor = value[2].lower()
520
+ if not page in self.references:
521
+ self.missed_types_structs[value[0]] = (page, tag)
522
+ rstname = os.path.splitext(self.missing_filename)[0]
523
+ else:
524
+ rstname = self.references[page][2]
525
+ anchor = self.references[page][4]
526
+ #if(tag and not self.is_github):
527
+ # anchor = self.anchor_prefix + "ref-" + tag
528
+ retstr += ".. _" + key + ": " + rstname + self.page_ext + "#" + anchor
529
+ retstr += LINE_BREAKER + LINE_BREAKER
530
+ self.page_references = {}
531
+ return retstr
532
+
533
+ def _build_item_by_id(self, node, id):
534
+ retstr = ""
535
+ for member in node.iter("memberdef"):
536
+ if(member.attrib["id"] != id):
537
+ continue
538
+ if(member.attrib["kind"] == "enum"):
539
+ retstr += self._build_enum(member)
540
+ return retstr
541
+
542
+ def covert_item(self, compound, id, tag):
543
+ xml_path = os.path.join(self.doxy_output_dir, "%s.xml" % compound)
544
+ print("covert_item: id=%s, name=%s" % (id, xml_path))
545
+ obj_root = etree.parse(xml_path).getroot()
546
+ retstr = ""
547
+ compound = obj_root.find("compounddef")
548
+ compound_kind = compound.attrib["kind"]
549
+ if(not tag):
550
+ retstr += self._build_title(compound.findtext("compoundname"))
551
+ if(compound_kind == "class"):
552
+ retstr += self._build_class(compound)
553
+ elif(compound_kind == "struct"):
554
+ retstr += self._build_struct(compound)
555
+ else:
556
+ retstr += self._build_item_by_id(compound, id)
557
+
558
+ return retstr
559
+
560
+ def _build_page(self, compound):
561
+ retstr = ""
562
+ retstr += self.get_text(compound.find("detaileddescription"))
563
+ return retstr
564
+
565
+ def _build_file(self, compound, type, ref_id, name):
566
+ retstr = ""
567
+ for member in compound.iter("memberdef"):
568
+ if(member.attrib["kind"] == "function" and member.attrib["id"] == ref_id):
569
+ retstr += self.build_function(member)
570
+ return retstr
571
+
572
+ def convert_doxy(self, type, name):
573
+ #print(name)
574
+ file = ref_id = self.name_refid_map[name]
575
+ dst_kind = type
576
+ if(type == "function"):
577
+ file, tag = get_page(ref_id)
578
+ dst_kind = "file"
579
+ xml_path = os.path.join(self.doxy_output_dir, "%s.xml" % file)
580
+ print("convert_doxy: type=%s, name=%s" % (type, xml_path))
581
+ obj_root = etree.parse(xml_path).getroot()
582
+ compound = obj_root.find("compounddef")
583
+ compound_kind = compound.attrib["kind"]
584
+ assert(dst_kind == compound_kind)
585
+ retstr = ""
586
+ if(compound_kind == "class"):
587
+ retstr += self._build_class(compound)
588
+ elif(compound_kind == "struct"):
589
+ retstr += self._build_struct(compound)
590
+ elif(compound_kind == "page"):
591
+ retstr += self._build_page(compound)
592
+ elif(compound_kind == "group"):
593
+ retstr += self._build_page(compound)
594
+ elif(compound_kind == "file"):
595
+ retstr += self._build_file(compound, type, ref_id, name)
596
+ return retstr
597
+
598
+
599
+ if __name__ == '__main__':
600
+ import argparse
601
+ parser = argparse.ArgumentParser()
602
+ parser.add_argument("-g", "--github", action="store_true", help="Render the link in format of github wiki.")
603
+ parser.add_argument("-e", "--ext", default="", help="extension for github wiki")
604
+ parser.add_argument("-i", "--input", default="doxygen", help="Input file path of doxygen output and source rst file.")
605
+ parser.add_argument("-o", "--output", default="wikipage", help="Output converted restructured text files to path.")
606
+ parser.add_argument("-s", "--struct", default="TypesAndStructures.rest", help="Output of auto generated enum and structures.")
607
+ parser.add_argument("-u", "--uml", action="store_true", help="Enable UML, you need to download plantuml.jar from Plantuml and put it to here. http://plantuml.sourceforge.net/")
608
+
609
+ args = parser.parse_args()
610
+ ext = ""
611
+ if(len(args.ext) > 0):
612
+ ext = ("." + args.ext)
613
+ agent = DoxyGen2RST(args.input,
614
+ args.output,
615
+ args.struct,
616
+ is_github = True,
617
+ enable_uml = args.uml,
618
+ github_ext = ext)
619
+ agent.generate()
@@ -0,0 +1,4 @@
1
+ Name: gmpopenh264
2
+ Description: GMP Plugin for OpenH264.
3
+ Version: 2.6.0
4
+ APIs: encode-video[h264], decode-video[h264]