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