avformat: Remove non-compiling and/or silly commented-out printf/av_log statements
[libav.git] / libavformat / allformats.c
1 /*
2 * Register all the formats and protocols
3 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4 *
5 * This file is part of Libav.
6 *
7 * Libav 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 * Libav 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 Libav; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21 #include "avformat.h"
22 #include "rtp.h"
23 #include "rdt.h"
24 #include "url.h"
25 #include "version.h"
26
27 #define REGISTER_MUXER(X,x) { \
28 extern AVOutputFormat ff_##x##_muxer; \
29 if(CONFIG_##X##_MUXER) av_register_output_format(&ff_##x##_muxer); }
30
31 #define REGISTER_DEMUXER(X,x) { \
32 extern AVInputFormat ff_##x##_demuxer; \
33 if(CONFIG_##X##_DEMUXER) av_register_input_format(&ff_##x##_demuxer); }
34
35 #define REGISTER_MUXDEMUX(X,x) REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
36
37 #define REGISTER_PROTOCOL(X,x) { \
38 extern URLProtocol ff_##x##_protocol; \
39 if(CONFIG_##X##_PROTOCOL) ffurl_register_protocol(&ff_##x##_protocol, sizeof(ff_##x##_protocol)); }
40
41 void av_register_all(void)
42 {
43 static int initialized;
44
45 if (initialized)
46 return;
47 initialized = 1;
48
49 avcodec_register_all();
50
51 /* (de)muxers */
52 REGISTER_MUXER (A64, a64);
53 REGISTER_DEMUXER (AAC, aac);
54 REGISTER_MUXDEMUX (AC3, ac3);
55 REGISTER_MUXER (ADTS, adts);
56 REGISTER_MUXDEMUX (ADX, adx);
57 REGISTER_DEMUXER (AEA, aea);
58 REGISTER_MUXDEMUX (AIFF, aiff);
59 REGISTER_MUXDEMUX (AMR, amr);
60 REGISTER_DEMUXER (ANM, anm);
61 REGISTER_DEMUXER (APC, apc);
62 REGISTER_DEMUXER (APE, ape);
63 REGISTER_MUXDEMUX (ASF, asf);
64 REGISTER_MUXDEMUX (ASS, ass);
65 REGISTER_MUXER (ASF_STREAM, asf_stream);
66 REGISTER_MUXDEMUX (AU, au);
67 REGISTER_MUXDEMUX (AVI, avi);
68 REGISTER_DEMUXER (AVISYNTH, avisynth);
69 REGISTER_MUXER (AVM2, avm2);
70 REGISTER_DEMUXER (AVS, avs);
71 REGISTER_DEMUXER (BETHSOFTVID, bethsoftvid);
72 REGISTER_DEMUXER (BFI, bfi);
73 REGISTER_DEMUXER (BINK, bink);
74 REGISTER_DEMUXER (BMV, bmv);
75 REGISTER_DEMUXER (C93, c93);
76 REGISTER_DEMUXER (CAF, caf);
77 REGISTER_MUXDEMUX (CAVSVIDEO, cavsvideo);
78 REGISTER_DEMUXER (CDG, cdg);
79 REGISTER_DEMUXER (CDXL, cdxl);
80 REGISTER_MUXER (CRC, crc);
81 REGISTER_MUXDEMUX (DAUD, daud);
82 REGISTER_DEMUXER (DFA, dfa);
83 REGISTER_MUXDEMUX (DIRAC, dirac);
84 REGISTER_MUXDEMUX (DNXHD, dnxhd);
85 REGISTER_DEMUXER (DSICIN, dsicin);
86 REGISTER_MUXDEMUX (DTS, dts);
87 REGISTER_MUXDEMUX (DV, dv);
88 REGISTER_DEMUXER (DXA, dxa);
89 REGISTER_DEMUXER (EA, ea);
90 REGISTER_DEMUXER (EA_CDATA, ea_cdata);
91 REGISTER_MUXDEMUX (EAC3, eac3);
92 REGISTER_MUXDEMUX (FFM, ffm);
93 REGISTER_MUXDEMUX (FFMETADATA, ffmetadata);
94 REGISTER_MUXDEMUX (FILMSTRIP, filmstrip);
95 REGISTER_MUXDEMUX (FLAC, flac);
96 REGISTER_DEMUXER (FLIC, flic);
97 REGISTER_MUXDEMUX (FLV, flv);
98 REGISTER_DEMUXER (FOURXM, fourxm);
99 REGISTER_MUXER (FRAMECRC, framecrc);
100 REGISTER_MUXER (FRAMEMD5, framemd5);
101 REGISTER_MUXDEMUX (G722, g722);
102 REGISTER_DEMUXER (G723_1, g723_1);
103 REGISTER_MUXER (GIF, gif);
104 REGISTER_DEMUXER (GSM, gsm);
105 REGISTER_MUXDEMUX (GXF, gxf);
106 REGISTER_MUXDEMUX (H261, h261);
107 REGISTER_MUXDEMUX (H263, h263);
108 REGISTER_MUXDEMUX (H264, h264);
109 REGISTER_DEMUXER (HLS, hls);
110 REGISTER_DEMUXER (IDCIN, idcin);
111 REGISTER_DEMUXER (IFF, iff);
112 REGISTER_MUXDEMUX (ILBC, ilbc);
113 REGISTER_MUXDEMUX (IMAGE2, image2);
114 REGISTER_MUXDEMUX (IMAGE2PIPE, image2pipe);
115 REGISTER_DEMUXER (INGENIENT, ingenient);
116 REGISTER_DEMUXER (IPMOVIE, ipmovie);
117 REGISTER_MUXER (IPOD, ipod);
118 REGISTER_MUXER (ISMV, ismv);
119 REGISTER_DEMUXER (ISS, iss);
120 REGISTER_DEMUXER (IV8, iv8);
121 REGISTER_MUXDEMUX (IVF, ivf);
122 REGISTER_DEMUXER (JV, jv);
123 REGISTER_MUXDEMUX (LATM, latm);
124 REGISTER_DEMUXER (LMLM4, lmlm4);
125 REGISTER_DEMUXER (LXF, lxf);
126 REGISTER_MUXDEMUX (M4V, m4v);
127 REGISTER_MUXER (MD5, md5);
128 REGISTER_MUXDEMUX (MATROSKA, matroska);
129 REGISTER_MUXER (MATROSKA_AUDIO, matroska_audio);
130 REGISTER_MUXDEMUX (MJPEG, mjpeg);
131 REGISTER_MUXDEMUX (MLP, mlp);
132 REGISTER_DEMUXER (MM, mm);
133 REGISTER_MUXDEMUX (MMF, mmf);
134 REGISTER_MUXDEMUX (MOV, mov);
135 REGISTER_MUXER (MP2, mp2);
136 REGISTER_MUXDEMUX (MP3, mp3);
137 REGISTER_MUXER (MP4, mp4);
138 REGISTER_DEMUXER (MPC, mpc);
139 REGISTER_DEMUXER (MPC8, mpc8);
140 REGISTER_MUXER (MPEG1SYSTEM, mpeg1system);
141 REGISTER_MUXER (MPEG1VCD, mpeg1vcd);
142 REGISTER_MUXER (MPEG1VIDEO, mpeg1video);
143 REGISTER_MUXER (MPEG2DVD, mpeg2dvd);
144 REGISTER_MUXER (MPEG2SVCD, mpeg2svcd);
145 REGISTER_MUXER (MPEG2VIDEO, mpeg2video);
146 REGISTER_MUXER (MPEG2VOB, mpeg2vob);
147 REGISTER_DEMUXER (MPEGPS, mpegps);
148 REGISTER_MUXDEMUX (MPEGTS, mpegts);
149 REGISTER_DEMUXER (MPEGTSRAW, mpegtsraw);
150 REGISTER_DEMUXER (MPEGVIDEO, mpegvideo);
151 REGISTER_MUXER (MPJPEG, mpjpeg);
152 REGISTER_DEMUXER (MSNWC_TCP, msnwc_tcp);
153 REGISTER_DEMUXER (MTV, mtv);
154 REGISTER_DEMUXER (MVI, mvi);
155 REGISTER_MUXDEMUX (MXF, mxf);
156 REGISTER_MUXER (MXF_D10, mxf_d10);
157 REGISTER_DEMUXER (MXG, mxg);
158 REGISTER_DEMUXER (NC, nc);
159 REGISTER_DEMUXER (NSV, nsv);
160 REGISTER_MUXER (NULL, null);
161 REGISTER_MUXDEMUX (NUT, nut);
162 REGISTER_DEMUXER (NUV, nuv);
163 REGISTER_MUXDEMUX (OGG, ogg);
164 REGISTER_MUXDEMUX (OMA, oma);
165 REGISTER_MUXDEMUX (PCM_ALAW, pcm_alaw);
166 REGISTER_MUXDEMUX (PCM_MULAW, pcm_mulaw);
167 REGISTER_MUXDEMUX (PCM_F64BE, pcm_f64be);
168 REGISTER_MUXDEMUX (PCM_F64LE, pcm_f64le);
169 REGISTER_MUXDEMUX (PCM_F32BE, pcm_f32be);
170 REGISTER_MUXDEMUX (PCM_F32LE, pcm_f32le);
171 REGISTER_MUXDEMUX (PCM_S32BE, pcm_s32be);
172 REGISTER_MUXDEMUX (PCM_S32LE, pcm_s32le);
173 REGISTER_MUXDEMUX (PCM_S24BE, pcm_s24be);
174 REGISTER_MUXDEMUX (PCM_S24LE, pcm_s24le);
175 REGISTER_MUXDEMUX (PCM_S16BE, pcm_s16be);
176 REGISTER_MUXDEMUX (PCM_S16LE, pcm_s16le);
177 REGISTER_MUXDEMUX (PCM_S8, pcm_s8);
178 REGISTER_MUXDEMUX (PCM_U32BE, pcm_u32be);
179 REGISTER_MUXDEMUX (PCM_U32LE, pcm_u32le);
180 REGISTER_MUXDEMUX (PCM_U24BE, pcm_u24be);
181 REGISTER_MUXDEMUX (PCM_U24LE, pcm_u24le);
182 REGISTER_MUXDEMUX (PCM_U16BE, pcm_u16be);
183 REGISTER_MUXDEMUX (PCM_U16LE, pcm_u16le);
184 REGISTER_MUXDEMUX (PCM_U8, pcm_u8);
185 REGISTER_DEMUXER (PMP, pmp);
186 REGISTER_MUXER (PSP, psp);
187 REGISTER_DEMUXER (PVA, pva);
188 REGISTER_DEMUXER (QCP, qcp);
189 REGISTER_DEMUXER (R3D, r3d);
190 REGISTER_MUXDEMUX (RAWVIDEO, rawvideo);
191 REGISTER_DEMUXER (RL2, rl2);
192 REGISTER_MUXDEMUX (RM, rm);
193 REGISTER_MUXDEMUX (ROQ, roq);
194 REGISTER_DEMUXER (RPL, rpl);
195 REGISTER_MUXDEMUX (RSO, rso);
196 REGISTER_MUXDEMUX (RTP, rtp);
197 REGISTER_MUXDEMUX (RTSP, rtsp);
198 REGISTER_MUXDEMUX (SAP, sap);
199 REGISTER_DEMUXER (SDP, sdp);
200 #if CONFIG_RTPDEC
201 av_register_rtp_dynamic_payload_handlers();
202 av_register_rdt_dynamic_payload_handlers();
203 #endif
204 REGISTER_DEMUXER (SEGAFILM, segafilm);
205 REGISTER_MUXER (SEGMENT, segment);
206 REGISTER_DEMUXER (SHORTEN, shorten);
207 REGISTER_DEMUXER (SIFF, siff);
208 REGISTER_DEMUXER (SMACKER, smacker);
209 REGISTER_MUXDEMUX (SMJPEG, smjpeg);
210 REGISTER_MUXER (SMOOTHSTREAMING, smoothstreaming);
211 REGISTER_DEMUXER (SOL, sol);
212 REGISTER_MUXDEMUX (SOX, sox);
213 REGISTER_MUXDEMUX (SPDIF, spdif);
214 REGISTER_MUXDEMUX (SRT, srt);
215 REGISTER_DEMUXER (STR, str);
216 REGISTER_MUXDEMUX (SWF, swf);
217 REGISTER_MUXER (TG2, tg2);
218 REGISTER_MUXER (TGP, tgp);
219 REGISTER_DEMUXER (THP, thp);
220 REGISTER_DEMUXER (TIERTEXSEQ, tiertexseq);
221 REGISTER_DEMUXER (TMV, tmv);
222 REGISTER_MUXDEMUX (TRUEHD, truehd);
223 REGISTER_DEMUXER (TTA, tta);
224 REGISTER_DEMUXER (TXD, txd);
225 REGISTER_DEMUXER (TTY, tty);
226 REGISTER_DEMUXER (VC1, vc1);
227 REGISTER_MUXDEMUX (VC1T, vc1t);
228 REGISTER_DEMUXER (VMD, vmd);
229 REGISTER_MUXDEMUX (VOC, voc);
230 REGISTER_DEMUXER (VQF, vqf);
231 REGISTER_DEMUXER (W64, w64);
232 REGISTER_MUXDEMUX (WAV, wav);
233 REGISTER_DEMUXER (WC3, wc3);
234 REGISTER_MUXER (WEBM, webm);
235 REGISTER_DEMUXER (WSAUD, wsaud);
236 REGISTER_DEMUXER (WSVQA, wsvqa);
237 REGISTER_DEMUXER (WTV, wtv);
238 REGISTER_DEMUXER (WV, wv);
239 REGISTER_DEMUXER (XA, xa);
240 REGISTER_DEMUXER (XMV, xmv);
241 REGISTER_DEMUXER (XWMA, xwma);
242 REGISTER_DEMUXER (YOP, yop);
243 REGISTER_MUXDEMUX (YUV4MPEGPIPE, yuv4mpegpipe);
244
245 /* protocols */
246 #if FF_API_APPLEHTTP_PROTO
247 REGISTER_PROTOCOL (APPLEHTTP, applehttp);
248 #endif
249 REGISTER_PROTOCOL (CONCAT, concat);
250 REGISTER_PROTOCOL (CRYPTO, crypto);
251 REGISTER_PROTOCOL (FFRTMPCRYPT, ffrtmpcrypt);
252 REGISTER_PROTOCOL (FFRTMPHTTP, ffrtmphttp);
253 REGISTER_PROTOCOL (FILE, file);
254 REGISTER_PROTOCOL (GOPHER, gopher);
255 REGISTER_PROTOCOL (HLS, hls);
256 REGISTER_PROTOCOL (HTTP, http);
257 REGISTER_PROTOCOL (HTTPPROXY, httpproxy);
258 REGISTER_PROTOCOL (HTTPS, https);
259 REGISTER_PROTOCOL (MMSH, mmsh);
260 REGISTER_PROTOCOL (MMST, mmst);
261 REGISTER_PROTOCOL (MD5, md5);
262 REGISTER_PROTOCOL (PIPE, pipe);
263 REGISTER_PROTOCOL (RTMP, rtmp);
264 REGISTER_PROTOCOL (RTMPE, rtmpe);
265 REGISTER_PROTOCOL (RTMPS, rtmps);
266 REGISTER_PROTOCOL (RTMPT, rtmpt);
267 REGISTER_PROTOCOL (RTMPTE, rtmpte);
268 REGISTER_PROTOCOL (RTMPTS, rtmpts);
269 REGISTER_PROTOCOL (RTP, rtp);
270 REGISTER_PROTOCOL (SCTP, sctp);
271 REGISTER_PROTOCOL (TCP, tcp);
272 REGISTER_PROTOCOL (TLS, tls);
273 REGISTER_PROTOCOL (UDP, udp);
274
275 /* external libraries */
276 REGISTER_PROTOCOL (LIBRTMP, librtmp);
277 REGISTER_PROTOCOL (LIBRTMPE, librtmpe);
278 REGISTER_PROTOCOL (LIBRTMPS, librtmps);
279 REGISTER_PROTOCOL (LIBRTMPT, librtmpt);
280 REGISTER_PROTOCOL (LIBRTMPTE, librtmpte);
281 }