allformats.c 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. /*
  2. * Register all the formats and protocols
  3. * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
  4. *
  5. * This file is part of FFmpeg.
  6. *
  7. * FFmpeg is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * FFmpeg is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with FFmpeg; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. #include "libavutil/thread.h"
  22. #include "libavformat/internal.h"
  23. #include "avformat.h"
  24. #include "rtp.h"
  25. #include "rdt.h"
  26. #include "url.h"
  27. #include "version.h"
  28. /* (de)muxers */
  29. extern AVOutputFormat ff_a64_muxer;
  30. extern AVInputFormat ff_aa_demuxer;
  31. extern AVInputFormat ff_aac_demuxer;
  32. extern AVInputFormat ff_ac3_demuxer;
  33. extern AVOutputFormat ff_ac3_muxer;
  34. extern AVInputFormat ff_acm_demuxer;
  35. extern AVInputFormat ff_act_demuxer;
  36. extern AVInputFormat ff_adf_demuxer;
  37. extern AVInputFormat ff_adp_demuxer;
  38. extern AVInputFormat ff_ads_demuxer;
  39. extern AVOutputFormat ff_adts_muxer;
  40. extern AVInputFormat ff_adx_demuxer;
  41. extern AVOutputFormat ff_adx_muxer;
  42. extern AVInputFormat ff_aea_demuxer;
  43. extern AVInputFormat ff_afc_demuxer;
  44. extern AVInputFormat ff_aiff_demuxer;
  45. extern AVOutputFormat ff_aiff_muxer;
  46. extern AVInputFormat ff_aix_demuxer;
  47. extern AVInputFormat ff_amr_demuxer;
  48. extern AVOutputFormat ff_amr_muxer;
  49. extern AVInputFormat ff_amrnb_demuxer;
  50. extern AVInputFormat ff_amrwb_demuxer;
  51. extern AVInputFormat ff_anm_demuxer;
  52. extern AVInputFormat ff_apc_demuxer;
  53. extern AVInputFormat ff_ape_demuxer;
  54. extern AVInputFormat ff_apng_demuxer;
  55. extern AVOutputFormat ff_apng_muxer;
  56. extern AVInputFormat ff_aptx_demuxer;
  57. extern AVOutputFormat ff_aptx_muxer;
  58. extern AVInputFormat ff_aptx_hd_demuxer;
  59. extern AVOutputFormat ff_aptx_hd_muxer;
  60. extern AVInputFormat ff_aqtitle_demuxer;
  61. extern AVInputFormat ff_asf_demuxer;
  62. extern AVOutputFormat ff_asf_muxer;
  63. extern AVInputFormat ff_asf_o_demuxer;
  64. extern AVInputFormat ff_ass_demuxer;
  65. extern AVOutputFormat ff_ass_muxer;
  66. extern AVInputFormat ff_ast_demuxer;
  67. extern AVOutputFormat ff_ast_muxer;
  68. extern AVOutputFormat ff_asf_stream_muxer;
  69. extern AVInputFormat ff_au_demuxer;
  70. extern AVOutputFormat ff_au_muxer;
  71. extern AVInputFormat ff_avi_demuxer;
  72. extern AVOutputFormat ff_avi_muxer;
  73. extern AVInputFormat ff_avisynth_demuxer;
  74. extern AVOutputFormat ff_avm2_muxer;
  75. extern AVInputFormat ff_avr_demuxer;
  76. extern AVInputFormat ff_avs_demuxer;
  77. extern AVInputFormat ff_avs2_demuxer;
  78. extern AVOutputFormat ff_avs2_muxer;
  79. extern AVInputFormat ff_bethsoftvid_demuxer;
  80. extern AVInputFormat ff_bfi_demuxer;
  81. extern AVInputFormat ff_bintext_demuxer;
  82. extern AVInputFormat ff_bink_demuxer;
  83. extern AVInputFormat ff_bit_demuxer;
  84. extern AVOutputFormat ff_bit_muxer;
  85. extern AVInputFormat ff_bmv_demuxer;
  86. extern AVInputFormat ff_bfstm_demuxer;
  87. extern AVInputFormat ff_brstm_demuxer;
  88. extern AVInputFormat ff_boa_demuxer;
  89. extern AVInputFormat ff_c93_demuxer;
  90. extern AVInputFormat ff_caf_demuxer;
  91. extern AVOutputFormat ff_caf_muxer;
  92. extern AVInputFormat ff_cavsvideo_demuxer;
  93. extern AVOutputFormat ff_cavsvideo_muxer;
  94. extern AVInputFormat ff_cdg_demuxer;
  95. extern AVInputFormat ff_cdxl_demuxer;
  96. extern AVInputFormat ff_cine_demuxer;
  97. extern AVInputFormat ff_codec2_demuxer;
  98. extern AVOutputFormat ff_codec2_muxer;
  99. extern AVInputFormat ff_codec2raw_demuxer;
  100. extern AVOutputFormat ff_codec2raw_muxer;
  101. extern AVInputFormat ff_concat_demuxer;
  102. extern AVOutputFormat ff_crc_muxer;
  103. extern AVInputFormat ff_dash_demuxer;
  104. extern AVOutputFormat ff_dash_muxer;
  105. extern AVInputFormat ff_data_demuxer;
  106. extern AVOutputFormat ff_data_muxer;
  107. extern AVInputFormat ff_daud_demuxer;
  108. extern AVOutputFormat ff_daud_muxer;
  109. extern AVInputFormat ff_dcstr_demuxer;
  110. extern AVInputFormat ff_dfa_demuxer;
  111. extern AVInputFormat ff_dirac_demuxer;
  112. extern AVOutputFormat ff_dirac_muxer;
  113. extern AVInputFormat ff_dnxhd_demuxer;
  114. extern AVOutputFormat ff_dnxhd_muxer;
  115. extern AVInputFormat ff_dsf_demuxer;
  116. extern AVInputFormat ff_dsicin_demuxer;
  117. extern AVInputFormat ff_dss_demuxer;
  118. extern AVInputFormat ff_dts_demuxer;
  119. extern AVOutputFormat ff_dts_muxer;
  120. extern AVInputFormat ff_dtshd_demuxer;
  121. extern AVInputFormat ff_dv_demuxer;
  122. extern AVOutputFormat ff_dv_muxer;
  123. extern AVInputFormat ff_dvbsub_demuxer;
  124. extern AVInputFormat ff_dvbtxt_demuxer;
  125. extern AVInputFormat ff_dxa_demuxer;
  126. extern AVInputFormat ff_ea_demuxer;
  127. extern AVInputFormat ff_ea_cdata_demuxer;
  128. extern AVInputFormat ff_eac3_demuxer;
  129. extern AVOutputFormat ff_eac3_muxer;
  130. extern AVInputFormat ff_epaf_demuxer;
  131. extern AVOutputFormat ff_f4v_muxer;
  132. extern AVInputFormat ff_ffmetadata_demuxer;
  133. extern AVOutputFormat ff_ffmetadata_muxer;
  134. extern AVOutputFormat ff_fifo_muxer;
  135. extern AVOutputFormat ff_fifo_test_muxer;
  136. extern AVInputFormat ff_filmstrip_demuxer;
  137. extern AVOutputFormat ff_filmstrip_muxer;
  138. extern AVInputFormat ff_fits_demuxer;
  139. extern AVOutputFormat ff_fits_muxer;
  140. extern AVInputFormat ff_flac_demuxer;
  141. extern AVOutputFormat ff_flac_muxer;
  142. extern AVInputFormat ff_flic_demuxer;
  143. extern AVInputFormat ff_flv_demuxer;
  144. extern AVOutputFormat ff_flv_muxer;
  145. extern AVInputFormat ff_live_flv_demuxer;
  146. extern AVInputFormat ff_fourxm_demuxer;
  147. extern AVOutputFormat ff_framecrc_muxer;
  148. extern AVOutputFormat ff_framehash_muxer;
  149. extern AVOutputFormat ff_framemd5_muxer;
  150. extern AVInputFormat ff_frm_demuxer;
  151. extern AVInputFormat ff_fsb_demuxer;
  152. extern AVInputFormat ff_g722_demuxer;
  153. extern AVOutputFormat ff_g722_muxer;
  154. extern AVInputFormat ff_g723_1_demuxer;
  155. extern AVOutputFormat ff_g723_1_muxer;
  156. extern AVInputFormat ff_g726_demuxer;
  157. extern AVOutputFormat ff_g726_muxer;
  158. extern AVInputFormat ff_g726le_demuxer;
  159. extern AVOutputFormat ff_g726le_muxer;
  160. extern AVInputFormat ff_g729_demuxer;
  161. extern AVInputFormat ff_gdv_demuxer;
  162. extern AVInputFormat ff_genh_demuxer;
  163. extern AVInputFormat ff_gif_demuxer;
  164. extern AVOutputFormat ff_gif_muxer;
  165. extern AVInputFormat ff_gsm_demuxer;
  166. extern AVOutputFormat ff_gsm_muxer;
  167. extern AVInputFormat ff_gxf_demuxer;
  168. extern AVOutputFormat ff_gxf_muxer;
  169. extern AVInputFormat ff_h261_demuxer;
  170. extern AVOutputFormat ff_h261_muxer;
  171. extern AVInputFormat ff_h263_demuxer;
  172. extern AVOutputFormat ff_h263_muxer;
  173. extern AVInputFormat ff_h264_demuxer;
  174. extern AVOutputFormat ff_h264_muxer;
  175. extern AVOutputFormat ff_hash_muxer;
  176. extern AVOutputFormat ff_hds_muxer;
  177. extern AVInputFormat ff_hevc_demuxer;
  178. extern AVOutputFormat ff_hevc_muxer;
  179. extern AVInputFormat ff_hls_demuxer;
  180. extern AVOutputFormat ff_hls_muxer;
  181. extern AVInputFormat ff_hnm_demuxer;
  182. extern AVInputFormat ff_ico_demuxer;
  183. extern AVOutputFormat ff_ico_muxer;
  184. extern AVInputFormat ff_idcin_demuxer;
  185. extern AVInputFormat ff_idf_demuxer;
  186. extern AVInputFormat ff_iff_demuxer;
  187. extern AVInputFormat ff_ilbc_demuxer;
  188. extern AVOutputFormat ff_ilbc_muxer;
  189. extern AVInputFormat ff_image2_demuxer;
  190. extern AVOutputFormat ff_image2_muxer;
  191. extern AVInputFormat ff_image2pipe_demuxer;
  192. extern AVOutputFormat ff_image2pipe_muxer;
  193. extern AVInputFormat ff_image2_alias_pix_demuxer;
  194. extern AVInputFormat ff_image2_brender_pix_demuxer;
  195. extern AVInputFormat ff_ingenient_demuxer;
  196. extern AVInputFormat ff_ipmovie_demuxer;
  197. extern AVOutputFormat ff_ipod_muxer;
  198. extern AVInputFormat ff_ircam_demuxer;
  199. extern AVOutputFormat ff_ircam_muxer;
  200. extern AVOutputFormat ff_ismv_muxer;
  201. extern AVInputFormat ff_iss_demuxer;
  202. extern AVInputFormat ff_iv8_demuxer;
  203. extern AVInputFormat ff_ivf_demuxer;
  204. extern AVOutputFormat ff_ivf_muxer;
  205. extern AVInputFormat ff_ivr_demuxer;
  206. extern AVInputFormat ff_jacosub_demuxer;
  207. extern AVOutputFormat ff_jacosub_muxer;
  208. extern AVInputFormat ff_jv_demuxer;
  209. extern AVOutputFormat ff_latm_muxer;
  210. extern AVInputFormat ff_lmlm4_demuxer;
  211. extern AVInputFormat ff_loas_demuxer;
  212. extern AVInputFormat ff_lrc_demuxer;
  213. extern AVOutputFormat ff_lrc_muxer;
  214. extern AVInputFormat ff_lvf_demuxer;
  215. extern AVInputFormat ff_lxf_demuxer;
  216. extern AVInputFormat ff_m4v_demuxer;
  217. extern AVOutputFormat ff_m4v_muxer;
  218. extern AVOutputFormat ff_md5_muxer;
  219. extern AVInputFormat ff_matroska_demuxer;
  220. extern AVOutputFormat ff_matroska_muxer;
  221. extern AVOutputFormat ff_matroska_audio_muxer;
  222. extern AVInputFormat ff_mgsts_demuxer;
  223. extern AVInputFormat ff_microdvd_demuxer;
  224. extern AVOutputFormat ff_microdvd_muxer;
  225. extern AVInputFormat ff_mjpeg_demuxer;
  226. extern AVOutputFormat ff_mjpeg_muxer;
  227. extern AVInputFormat ff_mjpeg_2000_demuxer;
  228. extern AVInputFormat ff_mlp_demuxer;
  229. extern AVOutputFormat ff_mlp_muxer;
  230. extern AVInputFormat ff_mlv_demuxer;
  231. extern AVInputFormat ff_mm_demuxer;
  232. extern AVInputFormat ff_mmf_demuxer;
  233. extern AVOutputFormat ff_mmf_muxer;
  234. extern AVInputFormat ff_mov_demuxer;
  235. extern AVOutputFormat ff_mov_muxer;
  236. extern AVOutputFormat ff_mp2_muxer;
  237. extern AVInputFormat ff_mp3_demuxer;
  238. extern AVOutputFormat ff_mp3_muxer;
  239. extern AVOutputFormat ff_mp4_muxer;
  240. extern AVInputFormat ff_mpc_demuxer;
  241. extern AVInputFormat ff_mpc8_demuxer;
  242. extern AVOutputFormat ff_mpeg1system_muxer;
  243. extern AVOutputFormat ff_mpeg1vcd_muxer;
  244. extern AVOutputFormat ff_mpeg1video_muxer;
  245. extern AVOutputFormat ff_mpeg2dvd_muxer;
  246. extern AVOutputFormat ff_mpeg2svcd_muxer;
  247. extern AVOutputFormat ff_mpeg2video_muxer;
  248. extern AVOutputFormat ff_mpeg2vob_muxer;
  249. extern AVInputFormat ff_mpegps_demuxer;
  250. extern AVInputFormat ff_mpegts_demuxer;
  251. extern AVOutputFormat ff_mpegts_muxer;
  252. extern AVInputFormat ff_mpegtsraw_demuxer;
  253. extern AVInputFormat ff_mpegvideo_demuxer;
  254. extern AVInputFormat ff_mpjpeg_demuxer;
  255. extern AVOutputFormat ff_mpjpeg_muxer;
  256. extern AVInputFormat ff_mpl2_demuxer;
  257. extern AVInputFormat ff_mpsub_demuxer;
  258. extern AVInputFormat ff_msf_demuxer;
  259. extern AVInputFormat ff_msnwc_tcp_demuxer;
  260. extern AVInputFormat ff_mtaf_demuxer;
  261. extern AVInputFormat ff_mtv_demuxer;
  262. extern AVInputFormat ff_musx_demuxer;
  263. extern AVInputFormat ff_mv_demuxer;
  264. extern AVInputFormat ff_mvi_demuxer;
  265. extern AVInputFormat ff_mxf_demuxer;
  266. extern AVOutputFormat ff_mxf_muxer;
  267. extern AVOutputFormat ff_mxf_d10_muxer;
  268. extern AVOutputFormat ff_mxf_opatom_muxer;
  269. extern AVInputFormat ff_mxg_demuxer;
  270. extern AVInputFormat ff_nc_demuxer;
  271. extern AVInputFormat ff_nistsphere_demuxer;
  272. extern AVInputFormat ff_nsp_demuxer;
  273. extern AVInputFormat ff_nsv_demuxer;
  274. extern AVOutputFormat ff_null_muxer;
  275. extern AVInputFormat ff_nut_demuxer;
  276. extern AVOutputFormat ff_nut_muxer;
  277. extern AVInputFormat ff_nuv_demuxer;
  278. extern AVOutputFormat ff_oga_muxer;
  279. extern AVInputFormat ff_ogg_demuxer;
  280. extern AVOutputFormat ff_ogg_muxer;
  281. extern AVOutputFormat ff_ogv_muxer;
  282. extern AVInputFormat ff_oma_demuxer;
  283. extern AVOutputFormat ff_oma_muxer;
  284. extern AVOutputFormat ff_opus_muxer;
  285. extern AVInputFormat ff_paf_demuxer;
  286. extern AVInputFormat ff_pcm_alaw_demuxer;
  287. extern AVOutputFormat ff_pcm_alaw_muxer;
  288. extern AVInputFormat ff_pcm_mulaw_demuxer;
  289. extern AVOutputFormat ff_pcm_mulaw_muxer;
  290. extern AVInputFormat ff_pcm_vidc_demuxer;
  291. extern AVOutputFormat ff_pcm_vidc_muxer;
  292. extern AVInputFormat ff_pcm_f64be_demuxer;
  293. extern AVOutputFormat ff_pcm_f64be_muxer;
  294. extern AVInputFormat ff_pcm_f64le_demuxer;
  295. extern AVOutputFormat ff_pcm_f64le_muxer;
  296. extern AVInputFormat ff_pcm_f32be_demuxer;
  297. extern AVOutputFormat ff_pcm_f32be_muxer;
  298. extern AVInputFormat ff_pcm_f32le_demuxer;
  299. extern AVOutputFormat ff_pcm_f32le_muxer;
  300. extern AVInputFormat ff_pcm_s32be_demuxer;
  301. extern AVOutputFormat ff_pcm_s32be_muxer;
  302. extern AVInputFormat ff_pcm_s32le_demuxer;
  303. extern AVOutputFormat ff_pcm_s32le_muxer;
  304. extern AVInputFormat ff_pcm_s24be_demuxer;
  305. extern AVOutputFormat ff_pcm_s24be_muxer;
  306. extern AVInputFormat ff_pcm_s24le_demuxer;
  307. extern AVOutputFormat ff_pcm_s24le_muxer;
  308. extern AVInputFormat ff_pcm_s16be_demuxer;
  309. extern AVOutputFormat ff_pcm_s16be_muxer;
  310. extern AVInputFormat ff_pcm_s16le_demuxer;
  311. extern AVOutputFormat ff_pcm_s16le_muxer;
  312. extern AVInputFormat ff_pcm_s8_demuxer;
  313. extern AVOutputFormat ff_pcm_s8_muxer;
  314. extern AVInputFormat ff_pcm_u32be_demuxer;
  315. extern AVOutputFormat ff_pcm_u32be_muxer;
  316. extern AVInputFormat ff_pcm_u32le_demuxer;
  317. extern AVOutputFormat ff_pcm_u32le_muxer;
  318. extern AVInputFormat ff_pcm_u24be_demuxer;
  319. extern AVOutputFormat ff_pcm_u24be_muxer;
  320. extern AVInputFormat ff_pcm_u24le_demuxer;
  321. extern AVOutputFormat ff_pcm_u24le_muxer;
  322. extern AVInputFormat ff_pcm_u16be_demuxer;
  323. extern AVOutputFormat ff_pcm_u16be_muxer;
  324. extern AVInputFormat ff_pcm_u16le_demuxer;
  325. extern AVOutputFormat ff_pcm_u16le_muxer;
  326. extern AVInputFormat ff_pcm_u8_demuxer;
  327. extern AVOutputFormat ff_pcm_u8_muxer;
  328. extern AVInputFormat ff_pjs_demuxer;
  329. extern AVInputFormat ff_pmp_demuxer;
  330. extern AVOutputFormat ff_psp_muxer;
  331. extern AVInputFormat ff_pva_demuxer;
  332. extern AVInputFormat ff_pvf_demuxer;
  333. extern AVInputFormat ff_qcp_demuxer;
  334. extern AVInputFormat ff_r3d_demuxer;
  335. extern AVInputFormat ff_rawvideo_demuxer;
  336. extern AVOutputFormat ff_rawvideo_muxer;
  337. extern AVInputFormat ff_realtext_demuxer;
  338. extern AVInputFormat ff_redspark_demuxer;
  339. extern AVInputFormat ff_rl2_demuxer;
  340. extern AVInputFormat ff_rm_demuxer;
  341. extern AVOutputFormat ff_rm_muxer;
  342. extern AVInputFormat ff_roq_demuxer;
  343. extern AVOutputFormat ff_roq_muxer;
  344. extern AVInputFormat ff_rpl_demuxer;
  345. extern AVInputFormat ff_rsd_demuxer;
  346. extern AVInputFormat ff_rso_demuxer;
  347. extern AVOutputFormat ff_rso_muxer;
  348. extern AVInputFormat ff_rtp_demuxer;
  349. extern AVOutputFormat ff_rtp_muxer;
  350. extern AVOutputFormat ff_rtp_mpegts_muxer;
  351. extern AVInputFormat ff_rtsp_demuxer;
  352. extern AVOutputFormat ff_rtsp_muxer;
  353. extern AVInputFormat ff_s337m_demuxer;
  354. extern AVInputFormat ff_sami_demuxer;
  355. extern AVInputFormat ff_sap_demuxer;
  356. extern AVOutputFormat ff_sap_muxer;
  357. extern AVInputFormat ff_sbc_demuxer;
  358. extern AVOutputFormat ff_sbc_muxer;
  359. extern AVInputFormat ff_sbg_demuxer;
  360. extern AVInputFormat ff_scc_demuxer;
  361. extern AVOutputFormat ff_scc_muxer;
  362. extern AVInputFormat ff_sdp_demuxer;
  363. extern AVInputFormat ff_sdr2_demuxer;
  364. extern AVInputFormat ff_sds_demuxer;
  365. extern AVInputFormat ff_sdx_demuxer;
  366. extern AVInputFormat ff_segafilm_demuxer;
  367. extern AVOutputFormat ff_segafilm_muxer;
  368. extern AVOutputFormat ff_segment_muxer;
  369. extern AVOutputFormat ff_stream_segment_muxer;
  370. extern AVInputFormat ff_ser_demuxer;
  371. extern AVInputFormat ff_shorten_demuxer;
  372. extern AVInputFormat ff_siff_demuxer;
  373. extern AVOutputFormat ff_singlejpeg_muxer;
  374. extern AVInputFormat ff_sln_demuxer;
  375. extern AVInputFormat ff_smacker_demuxer;
  376. extern AVInputFormat ff_smjpeg_demuxer;
  377. extern AVOutputFormat ff_smjpeg_muxer;
  378. extern AVOutputFormat ff_smoothstreaming_muxer;
  379. extern AVInputFormat ff_smush_demuxer;
  380. extern AVInputFormat ff_sol_demuxer;
  381. extern AVInputFormat ff_sox_demuxer;
  382. extern AVOutputFormat ff_sox_muxer;
  383. extern AVOutputFormat ff_spx_muxer;
  384. extern AVInputFormat ff_spdif_demuxer;
  385. extern AVOutputFormat ff_spdif_muxer;
  386. extern AVInputFormat ff_srt_demuxer;
  387. extern AVOutputFormat ff_srt_muxer;
  388. extern AVInputFormat ff_str_demuxer;
  389. extern AVInputFormat ff_stl_demuxer;
  390. extern AVInputFormat ff_subviewer1_demuxer;
  391. extern AVInputFormat ff_subviewer_demuxer;
  392. extern AVInputFormat ff_sup_demuxer;
  393. extern AVOutputFormat ff_sup_muxer;
  394. extern AVInputFormat ff_svag_demuxer;
  395. extern AVInputFormat ff_swf_demuxer;
  396. extern AVOutputFormat ff_swf_muxer;
  397. extern AVInputFormat ff_tak_demuxer;
  398. extern AVOutputFormat ff_tee_muxer;
  399. extern AVInputFormat ff_tedcaptions_demuxer;
  400. extern AVOutputFormat ff_tg2_muxer;
  401. extern AVOutputFormat ff_tgp_muxer;
  402. extern AVInputFormat ff_thp_demuxer;
  403. extern AVInputFormat ff_threedostr_demuxer;
  404. extern AVInputFormat ff_tiertexseq_demuxer;
  405. extern AVOutputFormat ff_mkvtimestamp_v2_muxer;
  406. extern AVInputFormat ff_tmv_demuxer;
  407. extern AVInputFormat ff_truehd_demuxer;
  408. extern AVOutputFormat ff_truehd_muxer;
  409. extern AVInputFormat ff_tta_demuxer;
  410. extern AVOutputFormat ff_tta_muxer;
  411. extern AVInputFormat ff_txd_demuxer;
  412. extern AVInputFormat ff_tty_demuxer;
  413. extern AVInputFormat ff_ty_demuxer;
  414. extern AVOutputFormat ff_uncodedframecrc_muxer;
  415. extern AVInputFormat ff_v210_demuxer;
  416. extern AVInputFormat ff_v210x_demuxer;
  417. extern AVInputFormat ff_vag_demuxer;
  418. extern AVInputFormat ff_vc1_demuxer;
  419. extern AVOutputFormat ff_vc1_muxer;
  420. extern AVInputFormat ff_vc1t_demuxer;
  421. extern AVOutputFormat ff_vc1t_muxer;
  422. extern AVInputFormat ff_vivo_demuxer;
  423. extern AVInputFormat ff_vmd_demuxer;
  424. extern AVInputFormat ff_vobsub_demuxer;
  425. extern AVInputFormat ff_voc_demuxer;
  426. extern AVOutputFormat ff_voc_muxer;
  427. extern AVInputFormat ff_vpk_demuxer;
  428. extern AVInputFormat ff_vplayer_demuxer;
  429. extern AVInputFormat ff_vqf_demuxer;
  430. extern AVInputFormat ff_w64_demuxer;
  431. extern AVOutputFormat ff_w64_muxer;
  432. extern AVInputFormat ff_wav_demuxer;
  433. extern AVOutputFormat ff_wav_muxer;
  434. extern AVInputFormat ff_wc3_demuxer;
  435. extern AVOutputFormat ff_webm_muxer;
  436. extern AVInputFormat ff_webm_dash_manifest_demuxer;
  437. extern AVOutputFormat ff_webm_dash_manifest_muxer;
  438. extern AVOutputFormat ff_webm_chunk_muxer;
  439. extern AVOutputFormat ff_webp_muxer;
  440. extern AVInputFormat ff_webvtt_demuxer;
  441. extern AVOutputFormat ff_webvtt_muxer;
  442. extern AVInputFormat ff_wsaud_demuxer;
  443. extern AVInputFormat ff_wsd_demuxer;
  444. extern AVInputFormat ff_wsvqa_demuxer;
  445. extern AVInputFormat ff_wtv_demuxer;
  446. extern AVOutputFormat ff_wtv_muxer;
  447. extern AVInputFormat ff_wve_demuxer;
  448. extern AVInputFormat ff_wv_demuxer;
  449. extern AVOutputFormat ff_wv_muxer;
  450. extern AVInputFormat ff_xa_demuxer;
  451. extern AVInputFormat ff_xbin_demuxer;
  452. extern AVInputFormat ff_xmv_demuxer;
  453. extern AVInputFormat ff_xvag_demuxer;
  454. extern AVInputFormat ff_xwma_demuxer;
  455. extern AVInputFormat ff_yop_demuxer;
  456. extern AVInputFormat ff_yuv4mpegpipe_demuxer;
  457. extern AVOutputFormat ff_yuv4mpegpipe_muxer;
  458. /* image demuxers */
  459. extern AVInputFormat ff_image_bmp_pipe_demuxer;
  460. extern AVInputFormat ff_image_dds_pipe_demuxer;
  461. extern AVInputFormat ff_image_dpx_pipe_demuxer;
  462. extern AVInputFormat ff_image_exr_pipe_demuxer;
  463. extern AVInputFormat ff_image_j2k_pipe_demuxer;
  464. extern AVInputFormat ff_image_jpeg_pipe_demuxer;
  465. extern AVInputFormat ff_image_jpegls_pipe_demuxer;
  466. extern AVInputFormat ff_image_pam_pipe_demuxer;
  467. extern AVInputFormat ff_image_pbm_pipe_demuxer;
  468. extern AVInputFormat ff_image_pcx_pipe_demuxer;
  469. extern AVInputFormat ff_image_pgmyuv_pipe_demuxer;
  470. extern AVInputFormat ff_image_pgm_pipe_demuxer;
  471. extern AVInputFormat ff_image_pictor_pipe_demuxer;
  472. extern AVInputFormat ff_image_png_pipe_demuxer;
  473. extern AVInputFormat ff_image_ppm_pipe_demuxer;
  474. extern AVInputFormat ff_image_psd_pipe_demuxer;
  475. extern AVInputFormat ff_image_qdraw_pipe_demuxer;
  476. extern AVInputFormat ff_image_sgi_pipe_demuxer;
  477. extern AVInputFormat ff_image_svg_pipe_demuxer;
  478. extern AVInputFormat ff_image_sunrast_pipe_demuxer;
  479. extern AVInputFormat ff_image_tiff_pipe_demuxer;
  480. extern AVInputFormat ff_image_webp_pipe_demuxer;
  481. extern AVInputFormat ff_image_xpm_pipe_demuxer;
  482. extern AVInputFormat ff_image_xwd_pipe_demuxer;
  483. /* external libraries */
  484. extern AVOutputFormat ff_chromaprint_muxer;
  485. extern AVInputFormat ff_libgme_demuxer;
  486. extern AVInputFormat ff_libmodplug_demuxer;
  487. extern AVInputFormat ff_libopenmpt_demuxer;
  488. extern AVInputFormat ff_vapoursynth_demuxer;
  489. #include "libavformat/muxer_list.c"
  490. #include "libavformat/demuxer_list.c"
  491. static const AVInputFormat * const *indev_list = NULL;
  492. static const AVOutputFormat * const *outdev_list = NULL;
  493. const AVOutputFormat *av_muxer_iterate(void **opaque)
  494. {
  495. static const uintptr_t size = sizeof(muxer_list)/sizeof(muxer_list[0]) - 1;
  496. uintptr_t i = (uintptr_t)*opaque;
  497. const AVOutputFormat *f = NULL;
  498. if (i < size) {
  499. f = muxer_list[i];
  500. } else if (indev_list) {
  501. f = outdev_list[i - size];
  502. }
  503. if (f)
  504. *opaque = (void*)(i + 1);
  505. return f;
  506. }
  507. const AVInputFormat *av_demuxer_iterate(void **opaque)
  508. {
  509. static const uintptr_t size = sizeof(demuxer_list)/sizeof(demuxer_list[0]) - 1;
  510. uintptr_t i = (uintptr_t)*opaque;
  511. const AVInputFormat *f = NULL;
  512. if (i < size) {
  513. f = demuxer_list[i];
  514. } else if (outdev_list) {
  515. f = indev_list[i - size];
  516. }
  517. if (f)
  518. *opaque = (void*)(i + 1);
  519. return f;
  520. }
  521. static AVMutex avpriv_register_devices_mutex = AV_MUTEX_INITIALIZER;
  522. #if FF_API_NEXT
  523. FF_DISABLE_DEPRECATION_WARNINGS
  524. static AVOnce av_format_next_init = AV_ONCE_INIT;
  525. static void av_format_init_next(void)
  526. {
  527. AVOutputFormat *prevout = NULL, *out;
  528. AVInputFormat *previn = NULL, *in;
  529. ff_mutex_lock(&avpriv_register_devices_mutex);
  530. for (int i = 0; (out = (AVOutputFormat*)muxer_list[i]); i++) {
  531. if (prevout)
  532. prevout->next = out;
  533. prevout = out;
  534. }
  535. if (outdev_list) {
  536. for (int i = 0; (out = (AVOutputFormat*)outdev_list[i]); i++) {
  537. if (prevout)
  538. prevout->next = out;
  539. prevout = out;
  540. }
  541. }
  542. for (int i = 0; (in = (AVInputFormat*)demuxer_list[i]); i++) {
  543. if (previn)
  544. previn->next = in;
  545. previn = in;
  546. }
  547. if (indev_list) {
  548. for (int i = 0; (in = (AVInputFormat*)indev_list[i]); i++) {
  549. if (previn)
  550. previn->next = in;
  551. previn = in;
  552. }
  553. }
  554. ff_mutex_unlock(&avpriv_register_devices_mutex);
  555. }
  556. AVInputFormat *av_iformat_next(const AVInputFormat *f)
  557. {
  558. ff_thread_once(&av_format_next_init, av_format_init_next);
  559. if (f)
  560. return f->next;
  561. else {
  562. void *opaque = NULL;
  563. return (AVInputFormat *)av_demuxer_iterate(&opaque);
  564. }
  565. }
  566. AVOutputFormat *av_oformat_next(const AVOutputFormat *f)
  567. {
  568. ff_thread_once(&av_format_next_init, av_format_init_next);
  569. if (f)
  570. return f->next;
  571. else {
  572. void *opaque = NULL;
  573. return (AVOutputFormat *)av_muxer_iterate(&opaque);
  574. }
  575. }
  576. void av_register_all(void)
  577. {
  578. ff_thread_once(&av_format_next_init, av_format_init_next);
  579. }
  580. void av_register_input_format(AVInputFormat *format)
  581. {
  582. ff_thread_once(&av_format_next_init, av_format_init_next);
  583. }
  584. void av_register_output_format(AVOutputFormat *format)
  585. {
  586. ff_thread_once(&av_format_next_init, av_format_init_next);
  587. }
  588. FF_ENABLE_DEPRECATION_WARNINGS
  589. #endif
  590. void avpriv_register_devices(const AVOutputFormat * const o[], const AVInputFormat * const i[])
  591. {
  592. ff_mutex_lock(&avpriv_register_devices_mutex);
  593. outdev_list = o;
  594. indev_list = i;
  595. ff_mutex_unlock(&avpriv_register_devices_mutex);
  596. #if FF_API_NEXT
  597. av_format_init_next();
  598. #endif
  599. }