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