FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
allformats.c
Go to the documentation of this file.
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 "avformat.h"
23 #include "rtp.h"
24 #include "rdt.h"
25 #include "url.h"
26 #include "version.h"
27 
28 #define REGISTER_MUXER(X, x) \
29  { \
30  extern AVOutputFormat ff_##x##_muxer; \
31  if (CONFIG_##X##_MUXER) \
32  av_register_output_format(&ff_##x##_muxer); \
33  }
34 
35 #define REGISTER_DEMUXER(X, x) \
36  { \
37  extern AVInputFormat ff_##x##_demuxer; \
38  if (CONFIG_##X##_DEMUXER) \
39  av_register_input_format(&ff_##x##_demuxer); \
40  }
41 
42 #define REGISTER_MUXDEMUX(X, x) REGISTER_MUXER(X, x); REGISTER_DEMUXER(X, x)
43 
44 void av_register_all(void)
45 {
46  static int initialized;
47 
48  if (initialized)
49  return;
50  initialized = 1;
51 
53 
54  /* (de)muxers */
55  REGISTER_MUXER (A64, a64);
56  REGISTER_DEMUXER (AA, aa);
57  REGISTER_DEMUXER (AAC, aac);
58  REGISTER_MUXDEMUX(AC3, ac3);
59  REGISTER_DEMUXER (ACM, acm);
60  REGISTER_DEMUXER (ACT, act);
61  REGISTER_DEMUXER (ADF, adf);
62  REGISTER_DEMUXER (ADP, adp);
63  REGISTER_DEMUXER (ADS, ads);
64  REGISTER_MUXER (ADTS, adts);
65  REGISTER_MUXDEMUX(ADX, adx);
66  REGISTER_DEMUXER (AEA, aea);
67  REGISTER_DEMUXER (AFC, afc);
68  REGISTER_MUXDEMUX(AIFF, aiff);
69  REGISTER_DEMUXER (AIX, aix);
70  REGISTER_MUXDEMUX(AMR, amr);
71  REGISTER_DEMUXER (ANM, anm);
72  REGISTER_DEMUXER (APC, apc);
73  REGISTER_DEMUXER (APE, ape);
74  REGISTER_MUXDEMUX(APNG, apng);
75  REGISTER_DEMUXER (AQTITLE, aqtitle);
76  REGISTER_MUXDEMUX(ASF, asf);
77  REGISTER_DEMUXER (ASF_O, asf_o);
78  REGISTER_MUXDEMUX(ASS, ass);
79  REGISTER_MUXDEMUX(AST, ast);
80  REGISTER_MUXER (ASF_STREAM, asf_stream);
81  REGISTER_MUXDEMUX(AU, au);
82  REGISTER_MUXDEMUX(AVI, avi);
83  REGISTER_DEMUXER (AVISYNTH, avisynth);
84  REGISTER_MUXER (AVM2, avm2);
85  REGISTER_DEMUXER (AVR, avr);
86  REGISTER_DEMUXER (AVS, avs);
87  REGISTER_DEMUXER (BETHSOFTVID, bethsoftvid);
88  REGISTER_DEMUXER (BFI, bfi);
89  REGISTER_DEMUXER (BINTEXT, bintext);
90  REGISTER_DEMUXER (BINK, bink);
91  REGISTER_MUXDEMUX(BIT, bit);
92  REGISTER_DEMUXER (BMV, bmv);
93  REGISTER_DEMUXER (BFSTM, bfstm);
94  REGISTER_DEMUXER (BRSTM, brstm);
95  REGISTER_DEMUXER (BOA, boa);
96  REGISTER_DEMUXER (C93, c93);
97  REGISTER_MUXDEMUX(CAF, caf);
98  REGISTER_MUXDEMUX(CAVSVIDEO, cavsvideo);
99  REGISTER_DEMUXER (CDG, cdg);
100  REGISTER_DEMUXER (CDXL, cdxl);
101  REGISTER_DEMUXER (CINE, cine);
102  REGISTER_DEMUXER (CONCAT, concat);
103  REGISTER_MUXER (CRC, crc);
104  REGISTER_MUXER (DASH, dash);
105  REGISTER_MUXDEMUX(DATA, data);
106  REGISTER_MUXDEMUX(DAUD, daud);
107  REGISTER_DEMUXER (DCSTR, dcstr);
108  REGISTER_DEMUXER (DFA, dfa);
109  REGISTER_MUXDEMUX(DIRAC, dirac);
110  REGISTER_MUXDEMUX(DNXHD, dnxhd);
111  REGISTER_DEMUXER (DSF, dsf);
112  REGISTER_DEMUXER (DSICIN, dsicin);
113  REGISTER_DEMUXER (DSS, dss);
114  REGISTER_MUXDEMUX(DTS, dts);
115  REGISTER_DEMUXER (DTSHD, dtshd);
116  REGISTER_MUXDEMUX(DV, dv);
117  REGISTER_DEMUXER (DVBSUB, dvbsub);
118  REGISTER_DEMUXER (DVBTXT, dvbtxt);
119  REGISTER_DEMUXER (DXA, dxa);
120  REGISTER_DEMUXER (EA, ea);
121  REGISTER_DEMUXER (EA_CDATA, ea_cdata);
122  REGISTER_MUXDEMUX(EAC3, eac3);
123  REGISTER_DEMUXER (EPAF, epaf);
124  REGISTER_MUXER (F4V, f4v);
125  REGISTER_MUXDEMUX(FFM, ffm);
126  REGISTER_MUXDEMUX(FFMETADATA, ffmetadata);
127  REGISTER_MUXDEMUX(FILMSTRIP, filmstrip);
128  REGISTER_MUXDEMUX(FLAC, flac);
129  REGISTER_DEMUXER (FLIC, flic);
130  REGISTER_MUXDEMUX(FLV, flv);
131  REGISTER_DEMUXER (LIVE_FLV, live_flv);
132  REGISTER_DEMUXER (FOURXM, fourxm);
133  REGISTER_MUXER (FRAMECRC, framecrc);
134  REGISTER_MUXER (FRAMEHASH, framehash);
135  REGISTER_MUXER (FRAMEMD5, framemd5);
136  REGISTER_DEMUXER (FRM, frm);
137  REGISTER_DEMUXER (FSB, fsb);
138  REGISTER_MUXDEMUX(G722, g722);
139  REGISTER_MUXDEMUX(G723_1, g723_1);
140  REGISTER_DEMUXER (G729, g729);
141  REGISTER_DEMUXER (GENH, genh);
142  REGISTER_MUXDEMUX(GIF, gif);
143  REGISTER_MUXDEMUX(GSM, gsm);
144  REGISTER_MUXDEMUX(GXF, gxf);
145  REGISTER_MUXDEMUX(H261, h261);
146  REGISTER_MUXDEMUX(H263, h263);
147  REGISTER_MUXDEMUX(H264, h264);
149  REGISTER_MUXER (HDS, hds);
150  REGISTER_MUXDEMUX(HEVC, hevc);
151  REGISTER_MUXDEMUX(HLS, hls);
152  REGISTER_DEMUXER (HNM, hnm);
153  REGISTER_MUXDEMUX(ICO, ico);
154  REGISTER_DEMUXER (IDCIN, idcin);
155  REGISTER_DEMUXER (IDF, idf);
156  REGISTER_DEMUXER (IFF, iff);
157  REGISTER_MUXDEMUX(ILBC, ilbc);
158  REGISTER_MUXDEMUX(IMAGE2, image2);
159  REGISTER_MUXDEMUX(IMAGE2PIPE, image2pipe);
160  REGISTER_DEMUXER (IMAGE2_ALIAS_PIX, image2_alias_pix);
161  REGISTER_DEMUXER (IMAGE2_BRENDER_PIX, image2_brender_pix);
162  REGISTER_DEMUXER (INGENIENT, ingenient);
163  REGISTER_DEMUXER (IPMOVIE, ipmovie);
164  REGISTER_MUXER (IPOD, ipod);
165  REGISTER_MUXDEMUX(IRCAM, ircam);
166  REGISTER_MUXER (ISMV, ismv);
167  REGISTER_DEMUXER (ISS, iss);
168  REGISTER_DEMUXER (IV8, iv8);
169  REGISTER_MUXDEMUX(IVF, ivf);
170  REGISTER_DEMUXER (IVR, ivr);
171  REGISTER_MUXDEMUX(JACOSUB, jacosub);
172  REGISTER_DEMUXER (JV, jv);
173  REGISTER_MUXER (LATM, latm);
174  REGISTER_DEMUXER (LMLM4, lmlm4);
175  REGISTER_DEMUXER (LOAS, loas);
176  REGISTER_MUXDEMUX(LRC, lrc);
177  REGISTER_DEMUXER (LVF, lvf);
178  REGISTER_DEMUXER (LXF, lxf);
179  REGISTER_MUXDEMUX(M4V, m4v);
181  REGISTER_MUXDEMUX(MATROSKA, matroska);
182  REGISTER_MUXER (MATROSKA_AUDIO, matroska_audio);
183  REGISTER_DEMUXER (MGSTS, mgsts);
184  REGISTER_MUXDEMUX(MICRODVD, microdvd);
185  REGISTER_MUXDEMUX(MJPEG, mjpeg);
186  REGISTER_MUXDEMUX(MLP, mlp);
187  REGISTER_DEMUXER (MLV, mlv);
188  REGISTER_DEMUXER (MM, mm);
189  REGISTER_MUXDEMUX(MMF, mmf);
190  REGISTER_MUXDEMUX(MOV, mov);
191  REGISTER_MUXER (MP2, mp2);
192  REGISTER_MUXDEMUX(MP3, mp3);
193  REGISTER_MUXER (MP4, mp4);
194  REGISTER_DEMUXER (MPC, mpc);
195  REGISTER_DEMUXER (MPC8, mpc8);
196  REGISTER_MUXER (MPEG1SYSTEM, mpeg1system);
197  REGISTER_MUXER (MPEG1VCD, mpeg1vcd);
198  REGISTER_MUXER (MPEG1VIDEO, mpeg1video);
199  REGISTER_MUXER (MPEG2DVD, mpeg2dvd);
200  REGISTER_MUXER (MPEG2SVCD, mpeg2svcd);
201  REGISTER_MUXER (MPEG2VIDEO, mpeg2video);
202  REGISTER_MUXER (MPEG2VOB, mpeg2vob);
203  REGISTER_DEMUXER (MPEGPS, mpegps);
204  REGISTER_MUXDEMUX(MPEGTS, mpegts);
205  REGISTER_DEMUXER (MPEGTSRAW, mpegtsraw);
206  REGISTER_DEMUXER (MPEGVIDEO, mpegvideo);
207  REGISTER_MUXDEMUX(MPJPEG, mpjpeg);
208  REGISTER_DEMUXER (MPL2, mpl2);
209  REGISTER_DEMUXER (MPSUB, mpsub);
210  REGISTER_DEMUXER (MSF, msf);
211  REGISTER_DEMUXER (MSNWC_TCP, msnwc_tcp);
212  REGISTER_DEMUXER (MTAF, mtaf);
213  REGISTER_DEMUXER (MTV, mtv);
214  REGISTER_DEMUXER (MUSX, musx);
215  REGISTER_DEMUXER (MV, mv);
216  REGISTER_DEMUXER (MVI, mvi);
217  REGISTER_MUXDEMUX(MXF, mxf);
218  REGISTER_MUXER (MXF_D10, mxf_d10);
219  REGISTER_MUXER (MXF_OPATOM, mxf_opatom);
220  REGISTER_DEMUXER (MXG, mxg);
221  REGISTER_DEMUXER (NC, nc);
222  REGISTER_DEMUXER (NISTSPHERE, nistsphere);
223  REGISTER_DEMUXER (NSV, nsv);
224  REGISTER_MUXER (NULL, null);
225  REGISTER_MUXDEMUX(NUT, nut);
226  REGISTER_DEMUXER (NUV, nuv);
227  REGISTER_MUXER (OGA, oga);
228  REGISTER_MUXDEMUX(OGG, ogg);
229  REGISTER_MUXDEMUX(OMA, oma);
230  REGISTER_MUXER (OPUS, opus);
231  REGISTER_DEMUXER (PAF, paf);
232  REGISTER_MUXDEMUX(PCM_ALAW, pcm_alaw);
233  REGISTER_MUXDEMUX(PCM_MULAW, pcm_mulaw);
234  REGISTER_MUXDEMUX(PCM_F64BE, pcm_f64be);
235  REGISTER_MUXDEMUX(PCM_F64LE, pcm_f64le);
236  REGISTER_MUXDEMUX(PCM_F32BE, pcm_f32be);
237  REGISTER_MUXDEMUX(PCM_F32LE, pcm_f32le);
238  REGISTER_MUXDEMUX(PCM_S32BE, pcm_s32be);
239  REGISTER_MUXDEMUX(PCM_S32LE, pcm_s32le);
240  REGISTER_MUXDEMUX(PCM_S24BE, pcm_s24be);
241  REGISTER_MUXDEMUX(PCM_S24LE, pcm_s24le);
242  REGISTER_MUXDEMUX(PCM_S16BE, pcm_s16be);
243  REGISTER_MUXDEMUX(PCM_S16LE, pcm_s16le);
244  REGISTER_MUXDEMUX(PCM_S8, pcm_s8);
245  REGISTER_MUXDEMUX(PCM_U32BE, pcm_u32be);
246  REGISTER_MUXDEMUX(PCM_U32LE, pcm_u32le);
247  REGISTER_MUXDEMUX(PCM_U24BE, pcm_u24be);
248  REGISTER_MUXDEMUX(PCM_U24LE, pcm_u24le);
249  REGISTER_MUXDEMUX(PCM_U16BE, pcm_u16be);
250  REGISTER_MUXDEMUX(PCM_U16LE, pcm_u16le);
251  REGISTER_MUXDEMUX(PCM_U8, pcm_u8);
252  REGISTER_DEMUXER (PJS, pjs);
253  REGISTER_DEMUXER (PMP, pmp);
254  REGISTER_MUXER (PSP, psp);
255  REGISTER_DEMUXER (PVA, pva);
256  REGISTER_DEMUXER (PVF, pvf);
257  REGISTER_DEMUXER (QCP, qcp);
258  REGISTER_DEMUXER (R3D, r3d);
259  REGISTER_MUXDEMUX(RAWVIDEO, rawvideo);
260  REGISTER_DEMUXER (REALTEXT, realtext);
261  REGISTER_DEMUXER (REDSPARK, redspark);
262  REGISTER_DEMUXER (RL2, rl2);
263  REGISTER_MUXDEMUX(RM, rm);
264  REGISTER_MUXDEMUX(ROQ, roq);
265  REGISTER_DEMUXER (RPL, rpl);
266  REGISTER_DEMUXER (RSD, rsd);
267  REGISTER_MUXDEMUX(RSO, rso);
268  REGISTER_MUXDEMUX(RTP, rtp);
269  REGISTER_MUXER (RTP_MPEGTS, rtp_mpegts);
270  REGISTER_MUXDEMUX(RTSP, rtsp);
271  REGISTER_DEMUXER (SAMI, sami);
272  REGISTER_MUXDEMUX(SAP, sap);
273  REGISTER_DEMUXER (SBG, sbg);
274  REGISTER_DEMUXER (SDP, sdp);
275  REGISTER_DEMUXER (SDR2, sdr2);
276 #if CONFIG_RTPDEC
279 #endif
280  REGISTER_DEMUXER (SEGAFILM, segafilm);
281  REGISTER_MUXER (SEGMENT, segment);
282  REGISTER_MUXER (SEGMENT, stream_segment);
283  REGISTER_DEMUXER (SHORTEN, shorten);
284  REGISTER_DEMUXER (SIFF, siff);
285  REGISTER_MUXER (SINGLEJPEG, singlejpeg);
286  REGISTER_DEMUXER (SLN, sln);
287  REGISTER_DEMUXER (SMACKER, smacker);
288  REGISTER_MUXDEMUX(SMJPEG, smjpeg);
289  REGISTER_MUXER (SMOOTHSTREAMING, smoothstreaming);
290  REGISTER_DEMUXER (SMUSH, smush);
291  REGISTER_DEMUXER (SOL, sol);
292  REGISTER_MUXDEMUX(SOX, sox);
293  REGISTER_MUXER (SPX, spx);
294  REGISTER_MUXDEMUX(SPDIF, spdif);
295  REGISTER_MUXDEMUX(SRT, srt);
296  REGISTER_DEMUXER (STR, str);
297  REGISTER_DEMUXER (STL, stl);
298  REGISTER_DEMUXER (SUBVIEWER1, subviewer1);
299  REGISTER_DEMUXER (SUBVIEWER, subviewer);
300  REGISTER_DEMUXER (SUP, sup);
301  REGISTER_DEMUXER (SVAG, svag);
302  REGISTER_MUXDEMUX(SWF, swf);
303  REGISTER_DEMUXER (TAK, tak);
304  REGISTER_MUXER (TEE, tee);
305  REGISTER_DEMUXER (TEDCAPTIONS, tedcaptions);
306  REGISTER_MUXER (TG2, tg2);
307  REGISTER_MUXER (TGP, tgp);
308  REGISTER_DEMUXER (THP, thp);
309  REGISTER_DEMUXER (THREEDOSTR, threedostr);
310  REGISTER_DEMUXER (TIERTEXSEQ, tiertexseq);
311  REGISTER_MUXER (MKVTIMESTAMP_V2, mkvtimestamp_v2);
312  REGISTER_DEMUXER (TMV, tmv);
313  REGISTER_MUXDEMUX(TRUEHD, truehd);
314  REGISTER_DEMUXER (TTA, tta);
315  REGISTER_DEMUXER (TXD, txd);
316  REGISTER_DEMUXER (TTY, tty);
317  REGISTER_MUXER (UNCODEDFRAMECRC, uncodedframecrc);
318  REGISTER_DEMUXER (V210, v210);
319  REGISTER_DEMUXER (V210X, v210x);
320  REGISTER_DEMUXER (VAG, vag);
321  REGISTER_MUXDEMUX(VC1, vc1);
322  REGISTER_MUXDEMUX(VC1T, vc1t);
323  REGISTER_DEMUXER (VIVO, vivo);
324  REGISTER_DEMUXER (VMD, vmd);
325  REGISTER_DEMUXER (VOBSUB, vobsub);
326  REGISTER_MUXDEMUX(VOC, voc);
327  REGISTER_DEMUXER (VPK, vpk);
328  REGISTER_DEMUXER (VPLAYER, vplayer);
329  REGISTER_DEMUXER (VQF, vqf);
330  REGISTER_MUXDEMUX(W64, w64);
331  REGISTER_MUXDEMUX(WAV, wav);
332  REGISTER_DEMUXER (WC3, wc3);
333  REGISTER_MUXER (WEBM, webm);
334  REGISTER_MUXDEMUX(WEBM_DASH_MANIFEST, webm_dash_manifest);
335  REGISTER_MUXER (WEBM_CHUNK, webm_chunk);
336  REGISTER_MUXER (WEBP, webp);
337  REGISTER_MUXDEMUX(WEBVTT, webvtt);
338  REGISTER_DEMUXER (WSAUD, wsaud);
339  REGISTER_DEMUXER (WSD, wsd);
340  REGISTER_DEMUXER (WSVQA, wsvqa);
341  REGISTER_MUXDEMUX(WTV, wtv);
342  REGISTER_DEMUXER (WVE, wve);
343  REGISTER_MUXDEMUX(WV, wv);
344  REGISTER_DEMUXER (XA, xa);
345  REGISTER_DEMUXER (XBIN, xbin);
346  REGISTER_DEMUXER (XMV, xmv);
347  REGISTER_DEMUXER (XVAG, xvag);
348  REGISTER_DEMUXER (XWMA, xwma);
349  REGISTER_DEMUXER (YOP, yop);
350  REGISTER_MUXDEMUX(YUV4MPEGPIPE, yuv4mpegpipe);
351 
352  /* image demuxers */
353  REGISTER_DEMUXER (IMAGE_BMP_PIPE, image_bmp_pipe);
354  REGISTER_DEMUXER (IMAGE_DDS_PIPE, image_dds_pipe);
355  REGISTER_DEMUXER (IMAGE_DPX_PIPE, image_dpx_pipe);
356  REGISTER_DEMUXER (IMAGE_EXR_PIPE, image_exr_pipe);
357  REGISTER_DEMUXER (IMAGE_J2K_PIPE, image_j2k_pipe);
358  REGISTER_DEMUXER (IMAGE_JPEG_PIPE, image_jpeg_pipe);
359  REGISTER_DEMUXER (IMAGE_JPEGLS_PIPE, image_jpegls_pipe);
360  REGISTER_DEMUXER (IMAGE_PCX_PIPE, image_pcx_pipe);
361  REGISTER_DEMUXER (IMAGE_PICTOR_PIPE, image_pictor_pipe);
362  REGISTER_DEMUXER (IMAGE_PNG_PIPE, image_png_pipe);
363  REGISTER_DEMUXER (IMAGE_QDRAW_PIPE, image_qdraw_pipe);
364  REGISTER_DEMUXER (IMAGE_SGI_PIPE, image_sgi_pipe);
365  REGISTER_DEMUXER (IMAGE_SUNRAST_PIPE, image_sunrast_pipe);
366  REGISTER_DEMUXER (IMAGE_TIFF_PIPE, image_tiff_pipe);
367  REGISTER_DEMUXER (IMAGE_WEBP_PIPE, image_webp_pipe);
368 
369  /* external libraries */
370  REGISTER_MUXER (CHROMAPRINT, chromaprint);
371  REGISTER_DEMUXER (LIBGME, libgme);
372  REGISTER_DEMUXER (LIBMODPLUG, libmodplug);
373  REGISTER_MUXDEMUX(LIBNUT, libnut);
374 }
#define NULL
Definition: coverity.c:32
#define STR(s)
ptrdiff_t const GLvoid * data
Definition: opengl_enc.c:101
structure containing the whole split ASS data
Definition: ass_split.h:90
void avcodec_register_all(void)
Register all the codecs, parsers and bitstream filters which were enabled at configuration time...
Definition: allcodecs.c:61
Definition: hash.c:38
void ff_register_rtp_dynamic_payload_handlers(void)
Definition: rtpdec.c:73
void ff_register_rdt_dynamic_payload_handlers(void)
Register RDT-related dynamic payload handlers with our cache.
Definition: rdt.c:573
#define MM
uint8_t hash[HASH_SIZE]
Definition: movenc-test.c:57
#define REGISTER_MUXDEMUX(X, x)
Definition: allformats.c:42
Definition: hls.c:67
#define stl(l, p)
Definition: asm.h:76
Libavformat version macros.
static const int8_t mv[256][2]
Definition: 4xm.c:77
AVS_VideoFrame ** pvf
Definition: avisynth_c.h:674
Main libavformat public API header.
struct AVMD5 * md5
Definition: movenc-test.c:56
#define AIFF
Definition: aiffdec.c:33
Definition: oggdec.h:101
#define REGISTER_MUXER(X, x)
Definition: allformats.c:28
unbuffered private I/O API
#define AA(j)
void av_register_all(void)
Initialize libavformat and register all the muxers, demuxers and protocols.
Definition: allformats.c:44
#define HASH(fx, fy, bx, by)
#define REGISTER_DEMUXER(X, x)
Definition: allformats.c:35