Replace 'typedef struct ustr_t' by 'struct ustr', _t is POSIX namespace.
[libav.git] / libavformat / allformats.c
CommitLineData
4624540b
FB
1/*
2 * Register all the formats and protocols
3 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4 *
b78e7197
DB
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
4624540b
FB
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
b78e7197 10 * version 2.1 of the License, or (at your option) any later version.
4624540b 11 *
b78e7197 12 * FFmpeg is distributed in the hope that it will be useful,
4624540b
FB
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
b78e7197 18 * License along with FFmpeg; if not, write to the Free Software
5509bffa 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
4624540b
FB
20 */
21#include "avformat.h"
7241a6bb 22#include "rtp_internal.h"
ff13ba92 23#include "rdt.h"
4624540b 24
d999cff5
AJ
25#define REGISTER_MUXER(X,x) { \
26 extern AVOutputFormat x##_muxer; \
27 if(ENABLE_##X##_MUXER) av_register_output_format(&x##_muxer); }
28#define REGISTER_DEMUXER(X,x) { \
29 extern AVInputFormat x##_demuxer; \
30 if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
5b9b3b68 31#define REGISTER_MUXDEMUX(X,x) REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
d999cff5
AJ
32#define REGISTER_PROTOCOL(X,x) { \
33 extern URLProtocol x##_protocol; \
34 if(ENABLE_##X##_PROTOCOL) register_protocol(&x##_protocol); }
5b9b3b68 35
4624540b
FB
36/* If you do not call this function, then you can select exactly which
37 formats you want to support */
38
39/**
fa1ab872 40 * Initialize libavformat and register all the (de)muxers and protocols.
4624540b
FB
41 */
42void av_register_all(void)
43{
5e534865 44 static int initialized;
115329f1 45
5e534865 46 if (initialized)
caaeefc5 47 return;
5e534865 48 initialized = 1;
caaeefc5 49
4624540b
FB
50 avcodec_init();
51 avcodec_register_all();
52
32583309 53 /* (de)muxers */
e6488635
DB
54 REGISTER_DEMUXER (AAC, aac);
55 REGISTER_MUXDEMUX (AC3, ac3);
56 REGISTER_MUXER (ADTS, adts);
57 REGISTER_MUXDEMUX (AIFF, aiff);
58 REGISTER_MUXDEMUX (AMR, amr);
59 REGISTER_DEMUXER (APC, apc);
bf4a1f17 60 REGISTER_DEMUXER (APE, ape);
e6488635 61 REGISTER_MUXDEMUX (ASF, asf);
88caf345 62 REGISTER_MUXDEMUX (ASS, ass);
e6488635
DB
63 REGISTER_MUXER (ASF_STREAM, asf_stream);
64 REGISTER_MUXDEMUX (AU, au);
e6488635 65 REGISTER_MUXDEMUX (AVI, avi);
53b73365 66 REGISTER_DEMUXER (AVISYNTH, avisynth);
fa1ad97f 67 REGISTER_MUXER (AVM2, avm2);
e6488635
DB
68 REGISTER_DEMUXER (AVS, avs);
69 REGISTER_DEMUXER (BETHSOFTVID, bethsoftvid);
b64c096b 70 REGISTER_DEMUXER (BFI, bfi);
e6488635
DB
71 REGISTER_DEMUXER (C93, c93);
72 REGISTER_MUXER (CRC, crc);
51c3861e 73 REGISTER_MUXDEMUX (DAUD, daud);
17ac9f1c 74 REGISTER_MUXDEMUX (DIRAC, dirac);
bd09e8a7 75 REGISTER_MUXDEMUX (DNXHD, dnxhd);
e6488635 76 REGISTER_DEMUXER (DSICIN, dsicin);
63d86443 77 REGISTER_MUXDEMUX (DTS, dts);
e6488635 78 REGISTER_MUXDEMUX (DV, dv);
e6488635
DB
79 REGISTER_DEMUXER (DXA, dxa);
80 REGISTER_DEMUXER (EA, ea);
9abf2433 81 REGISTER_DEMUXER (EA_CDATA, ea_cdata);
2988c93d 82 REGISTER_MUXDEMUX (EAC3, eac3);
e6488635
DB
83 REGISTER_MUXDEMUX (FFM, ffm);
84 REGISTER_MUXDEMUX (FLAC, flac);
85 REGISTER_DEMUXER (FLIC, flic);
86 REGISTER_MUXDEMUX (FLV, flv);
87 REGISTER_DEMUXER (FOURXM, fourxm);
88 REGISTER_MUXER (FRAMECRC, framecrc);
0b54f3c0 89 REGISTER_MUXER (GIF, gif);
60711e95 90 REGISTER_DEMUXER (GSM, gsm);
e6488635
DB
91 REGISTER_MUXDEMUX (GXF, gxf);
92 REGISTER_MUXDEMUX (H261, h261);
93 REGISTER_MUXDEMUX (H263, h263);
94 REGISTER_MUXDEMUX (H264, h264);
95 REGISTER_DEMUXER (IDCIN, idcin);
3a027f5e 96 REGISTER_DEMUXER (IFF, iff);
e6488635
DB
97 REGISTER_MUXDEMUX (IMAGE2, image2);
98 REGISTER_MUXDEMUX (IMAGE2PIPE, image2pipe);
99 REGISTER_DEMUXER (INGENIENT, ingenient);
100 REGISTER_DEMUXER (IPMOVIE, ipmovie);
aa9f4208 101 REGISTER_MUXER (IPOD, ipod);
670c7847 102 REGISTER_DEMUXER (LMLM4, lmlm4);
e6488635
DB
103 REGISTER_MUXDEMUX (M4V, m4v);
104 REGISTER_MUXDEMUX (MATROSKA, matroska);
105 REGISTER_MUXER (MATROSKA_AUDIO, matroska_audio);
106 REGISTER_MUXDEMUX (MJPEG, mjpeg);
16e861e3 107 REGISTER_DEMUXER (MLP, mlp);
e6488635
DB
108 REGISTER_DEMUXER (MM, mm);
109 REGISTER_MUXDEMUX (MMF, mmf);
110 REGISTER_MUXDEMUX (MOV, mov);
111 REGISTER_MUXER (MP2, mp2);
112 REGISTER_MUXDEMUX (MP3, mp3);
113 REGISTER_MUXER (MP4, mp4);
114 REGISTER_DEMUXER (MPC, mpc);
12877faf 115 REGISTER_DEMUXER (MPC8, mpc8);
e6488635
DB
116 REGISTER_MUXER (MPEG1SYSTEM, mpeg1system);
117 REGISTER_MUXER (MPEG1VCD, mpeg1vcd);
118 REGISTER_MUXER (MPEG1VIDEO, mpeg1video);
119 REGISTER_MUXER (MPEG2DVD, mpeg2dvd);
120 REGISTER_MUXER (MPEG2SVCD, mpeg2svcd);
121 REGISTER_MUXER (MPEG2VIDEO, mpeg2video);
122 REGISTER_MUXER (MPEG2VOB, mpeg2vob);
123 REGISTER_DEMUXER (MPEGPS, mpegps);
124 REGISTER_MUXDEMUX (MPEGTS, mpegts);
125 REGISTER_DEMUXER (MPEGTSRAW, mpegtsraw);
126 REGISTER_DEMUXER (MPEGVIDEO, mpegvideo);
127 REGISTER_MUXER (MPJPEG, mpjpeg);
0f3444e1 128 REGISTER_DEMUXER (MSNWC_TCP, msnwc_tcp);
e6488635 129 REGISTER_DEMUXER (MTV, mtv);
5b8cc860 130 REGISTER_DEMUXER (MVI, mvi);
cedebde1 131 REGISTER_MUXDEMUX (MXF, mxf);
e6488635
DB
132 REGISTER_DEMUXER (NSV, nsv);
133 REGISTER_MUXER (NULL, null);
134 REGISTER_MUXDEMUX (NUT, nut);
135 REGISTER_DEMUXER (NUV, nuv);
5118cae6 136 REGISTER_MUXDEMUX (OGG, ogg);
b339f0c6 137 REGISTER_DEMUXER (OMA, oma);
e6488635
DB
138 REGISTER_MUXDEMUX (PCM_ALAW, pcm_alaw);
139 REGISTER_MUXDEMUX (PCM_MULAW, pcm_mulaw);
ee7948cb
PR
140 REGISTER_MUXDEMUX (PCM_F64BE, pcm_f64be);
141 REGISTER_MUXDEMUX (PCM_F64LE, pcm_f64le);
142 REGISTER_MUXDEMUX (PCM_F32BE, pcm_f32be);
143 REGISTER_MUXDEMUX (PCM_F32LE, pcm_f32le);
144 REGISTER_MUXDEMUX (PCM_S32BE, pcm_s32be);
145 REGISTER_MUXDEMUX (PCM_S32LE, pcm_s32le);
146 REGISTER_MUXDEMUX (PCM_S24BE, pcm_s24be);
147 REGISTER_MUXDEMUX (PCM_S24LE, pcm_s24le);
e6488635
DB
148 REGISTER_MUXDEMUX (PCM_S16BE, pcm_s16be);
149 REGISTER_MUXDEMUX (PCM_S16LE, pcm_s16le);
150 REGISTER_MUXDEMUX (PCM_S8, pcm_s8);
ee7948cb
PR
151 REGISTER_MUXDEMUX (PCM_U32BE, pcm_u32be);
152 REGISTER_MUXDEMUX (PCM_U32LE, pcm_u32le);
153 REGISTER_MUXDEMUX (PCM_U24BE, pcm_u24be);
154 REGISTER_MUXDEMUX (PCM_U24LE, pcm_u24le);
e6488635
DB
155 REGISTER_MUXDEMUX (PCM_U16BE, pcm_u16be);
156 REGISTER_MUXDEMUX (PCM_U16LE, pcm_u16le);
157 REGISTER_MUXDEMUX (PCM_U8, pcm_u8);
158 REGISTER_MUXER (PSP, psp);
3feb44a9 159 REGISTER_DEMUXER (PVA, pva);
e6488635 160 REGISTER_MUXDEMUX (RAWVIDEO, rawvideo);
c023bfe9 161 REGISTER_DEMUXER (REDIR, redir);
cb96da49 162 REGISTER_DEMUXER (RL2, rl2);
e6488635
DB
163 REGISTER_MUXDEMUX (RM, rm);
164 REGISTER_MUXDEMUX (ROQ, roq);
4fd51ee3 165 REGISTER_DEMUXER (RPL, rpl);
e6488635
DB
166 REGISTER_MUXER (RTP, rtp);
167 REGISTER_DEMUXER (RTSP, rtsp);
168 REGISTER_DEMUXER (SDP, sdp);
95c21842 169#ifdef CONFIG_SDP_DEMUXER
4934884a 170 av_register_rtp_dynamic_payload_handlers();
ff13ba92 171 av_register_rdt_dynamic_payload_handlers();
ff70e601 172#endif
e6488635
DB
173 REGISTER_DEMUXER (SEGAFILM, segafilm);
174 REGISTER_DEMUXER (SHORTEN, shorten);
66f7679c 175 REGISTER_DEMUXER (SIFF, siff);
e6488635
DB
176 REGISTER_DEMUXER (SMACKER, smacker);
177 REGISTER_DEMUXER (SOL, sol);
178 REGISTER_DEMUXER (STR, str);
179 REGISTER_MUXDEMUX (SWF, swf);
180 REGISTER_MUXER (TG2, tg2);
181 REGISTER_MUXER (TGP, tgp);
182 REGISTER_DEMUXER (THP, thp);
183 REGISTER_DEMUXER (TIERTEXSEQ, tiertexseq);
184 REGISTER_DEMUXER (TTA, tta);
185 REGISTER_DEMUXER (TXD, txd);
e6488635 186 REGISTER_DEMUXER (VC1, vc1);
327ce5e6 187 REGISTER_MUXDEMUX (VC1T, vc1t);
e6488635
DB
188 REGISTER_DEMUXER (VMD, vmd);
189 REGISTER_MUXDEMUX (VOC, voc);
190 REGISTER_MUXDEMUX (WAV, wav);
191 REGISTER_DEMUXER (WC3, wc3);
192 REGISTER_DEMUXER (WSAUD, wsaud);
193 REGISTER_DEMUXER (WSVQA, wsvqa);
194 REGISTER_DEMUXER (WV, wv);
861c63a2 195 REGISTER_DEMUXER (XA, xa);
e6488635 196 REGISTER_MUXDEMUX (YUV4MPEGPIPE, yuv4mpegpipe);
f02be79d 197
a319c212 198 /* external libraries */
a319c212
DB
199 REGISTER_MUXDEMUX (LIBNUT, libnut);
200
32583309 201 /* protocols */
e6488635
DB
202 REGISTER_PROTOCOL (FILE, file);
203 REGISTER_PROTOCOL (HTTP, http);
204 REGISTER_PROTOCOL (PIPE, pipe);
205 REGISTER_PROTOCOL (RTP, rtp);
206 REGISTER_PROTOCOL (TCP, tcp);
207 REGISTER_PROTOCOL (UDP, udp);
4624540b 208}