RTMPTE protocol support
[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 *
2912e87a 5 * This file is part of Libav.
b78e7197 6 *
2912e87a 7 * Libav 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 *
2912e87a 12 * Libav 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
2912e87a 18 * License along with Libav; 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"
20631a9c 22#include "rtp.h"
ff13ba92 23#include "rdt.h"
8e76a19b 24#include "url.h"
8bdab32f 25#include "version.h"
4624540b 26
8a9572c2 27#define REGISTER_MUXER(X,x) { \
c6610a21
DEP
28 extern AVOutputFormat ff_##x##_muxer; \
29 if(CONFIG_##X##_MUXER) av_register_output_format(&ff_##x##_muxer); }
7f37f568 30
8a9572c2 31#define REGISTER_DEMUXER(X,x) { \
c6610a21
DEP
32 extern AVInputFormat ff_##x##_demuxer; \
33 if(CONFIG_##X##_DEMUXER) av_register_input_format(&ff_##x##_demuxer); }
7f37f568 34
5b9b3b68 35#define REGISTER_MUXDEMUX(X,x) REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
7f37f568 36
8a9572c2 37#define REGISTER_PROTOCOL(X,x) { \
c6610a21 38 extern URLProtocol ff_##x##_protocol; \
8e76a19b 39 if(CONFIG_##X##_PROTOCOL) ffurl_register_protocol(&ff_##x##_protocol, sizeof(ff_##x##_protocol)); }
5b9b3b68 40
4624540b
FB
41void av_register_all(void)
42{
5e534865 43 static int initialized;
115329f1 44
5e534865 45 if (initialized)
caaeefc5 46 return;
5e534865 47 initialized = 1;
caaeefc5 48
4624540b
FB
49 avcodec_register_all();
50
32583309 51 /* (de)muxers */
b7cf4e4f 52 REGISTER_MUXER (A64, a64);
e6488635
DB
53 REGISTER_DEMUXER (AAC, aac);
54 REGISTER_MUXDEMUX (AC3, ac3);
55 REGISTER_MUXER (ADTS, adts);
779ef255 56 REGISTER_MUXDEMUX (ADX, adx);
61dc238b 57 REGISTER_DEMUXER (AEA, aea);
e6488635
DB
58 REGISTER_MUXDEMUX (AIFF, aiff);
59 REGISTER_MUXDEMUX (AMR, amr);
e6565055 60 REGISTER_DEMUXER (ANM, anm);
e6488635 61 REGISTER_DEMUXER (APC, apc);
bf4a1f17 62 REGISTER_DEMUXER (APE, ape);
e6488635 63 REGISTER_MUXDEMUX (ASF, asf);
88caf345 64 REGISTER_MUXDEMUX (ASS, ass);
e6488635
DB
65 REGISTER_MUXER (ASF_STREAM, asf_stream);
66 REGISTER_MUXDEMUX (AU, au);
e6488635 67 REGISTER_MUXDEMUX (AVI, avi);
53b73365 68 REGISTER_DEMUXER (AVISYNTH, avisynth);
fa1ad97f 69 REGISTER_MUXER (AVM2, avm2);
e6488635
DB
70 REGISTER_DEMUXER (AVS, avs);
71 REGISTER_DEMUXER (BETHSOFTVID, bethsoftvid);
b64c096b 72 REGISTER_DEMUXER (BFI, bfi);
2e375df5 73 REGISTER_DEMUXER (BINK, bink);
f545e006 74 REGISTER_DEMUXER (BMV, bmv);
e6488635 75 REGISTER_DEMUXER (C93, c93);
5f14b565 76 REGISTER_DEMUXER (CAF, caf);
de295976 77 REGISTER_MUXDEMUX (CAVSVIDEO, cavsvideo);
a3d995c1 78 REGISTER_DEMUXER (CDG, cdg);
dc4e5748 79 REGISTER_DEMUXER (CDXL, cdxl);
e6488635 80 REGISTER_MUXER (CRC, crc);
51c3861e 81 REGISTER_MUXDEMUX (DAUD, daud);
42315dab 82 REGISTER_DEMUXER (DFA, dfa);
17ac9f1c 83 REGISTER_MUXDEMUX (DIRAC, dirac);
bd09e8a7 84 REGISTER_MUXDEMUX (DNXHD, dnxhd);
e6488635 85 REGISTER_DEMUXER (DSICIN, dsicin);
63d86443 86 REGISTER_MUXDEMUX (DTS, dts);
e6488635 87 REGISTER_MUXDEMUX (DV, dv);
e6488635
DB
88 REGISTER_DEMUXER (DXA, dxa);
89 REGISTER_DEMUXER (EA, ea);
9abf2433 90 REGISTER_DEMUXER (EA_CDATA, ea_cdata);
2988c93d 91 REGISTER_MUXDEMUX (EAC3, eac3);
e6488635 92 REGISTER_MUXDEMUX (FFM, ffm);
fd5b124d 93 REGISTER_MUXDEMUX (FFMETADATA, ffmetadata);
83ab7f18 94 REGISTER_MUXDEMUX (FILMSTRIP, filmstrip);
e6488635
DB
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);
0e765181 100 REGISTER_MUXER (FRAMEMD5, framemd5);
9013560f 101 REGISTER_MUXDEMUX (G722, g722);
55c3a4f6 102 REGISTER_DEMUXER (G723_1, g723_1);
0b54f3c0 103 REGISTER_MUXER (GIF, gif);
60711e95 104 REGISTER_DEMUXER (GSM, gsm);
e6488635
DB
105 REGISTER_MUXDEMUX (GXF, gxf);
106 REGISTER_MUXDEMUX (H261, h261);
107 REGISTER_MUXDEMUX (H263, h263);
108 REGISTER_MUXDEMUX (H264, h264);
2772258a 109 REGISTER_DEMUXER (HLS, hls);
e6488635 110 REGISTER_DEMUXER (IDCIN, idcin);
3a027f5e 111 REGISTER_DEMUXER (IFF, iff);
a2b251a0 112 REGISTER_MUXDEMUX (ILBC, ilbc);
e6488635
DB
113 REGISTER_MUXDEMUX (IMAGE2, image2);
114 REGISTER_MUXDEMUX (IMAGE2PIPE, image2pipe);
115 REGISTER_DEMUXER (INGENIENT, ingenient);
116 REGISTER_DEMUXER (IPMOVIE, ipmovie);
aa9f4208 117 REGISTER_MUXER (IPOD, ipod);
4ddd54da 118 REGISTER_MUXER (ISMV, ismv);
055dc116 119 REGISTER_DEMUXER (ISS, iss);
00b6fa40 120 REGISTER_DEMUXER (IV8, iv8);
54bc6403 121 REGISTER_MUXDEMUX (IVF, ivf);
bfaefd87 122 REGISTER_DEMUXER (JV, jv);
dcb9f6a2 123 REGISTER_MUXDEMUX (LATM, latm);
670c7847 124 REGISTER_DEMUXER (LMLM4, lmlm4);
8878e3b2 125 REGISTER_DEMUXER (LXF, lxf);
e6488635 126 REGISTER_MUXDEMUX (M4V, m4v);
944a1b6b 127 REGISTER_MUXER (MD5, md5);
e6488635
DB
128 REGISTER_MUXDEMUX (MATROSKA, matroska);
129 REGISTER_MUXER (MATROSKA_AUDIO, matroska_audio);
130 REGISTER_MUXDEMUX (MJPEG, mjpeg);
9145021d 131 REGISTER_MUXDEMUX (MLP, mlp);
e6488635
DB
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);
12877faf 139 REGISTER_DEMUXER (MPC8, mpc8);
e6488635
DB
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);
0f3444e1 152 REGISTER_DEMUXER (MSNWC_TCP, msnwc_tcp);
e6488635 153 REGISTER_DEMUXER (MTV, mtv);
5b8cc860 154 REGISTER_DEMUXER (MVI, mvi);
cedebde1 155 REGISTER_MUXDEMUX (MXF, mxf);
bd3f81f3 156 REGISTER_MUXER (MXF_D10, mxf_d10);
9d09ebf1 157 REGISTER_DEMUXER (MXG, mxg);
eaf5d011 158 REGISTER_DEMUXER (NC, nc);
e6488635
DB
159 REGISTER_DEMUXER (NSV, nsv);
160 REGISTER_MUXER (NULL, null);
161 REGISTER_MUXDEMUX (NUT, nut);
162 REGISTER_DEMUXER (NUV, nuv);
5118cae6 163 REGISTER_MUXDEMUX (OGG, ogg);
f40e7eb5 164 REGISTER_MUXDEMUX (OMA, oma);
e6488635
DB
165 REGISTER_MUXDEMUX (PCM_ALAW, pcm_alaw);
166 REGISTER_MUXDEMUX (PCM_MULAW, pcm_mulaw);
ee7948cb
PR
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);
e6488635
DB
175 REGISTER_MUXDEMUX (PCM_S16BE, pcm_s16be);
176 REGISTER_MUXDEMUX (PCM_S16LE, pcm_s16le);
177 REGISTER_MUXDEMUX (PCM_S8, pcm_s8);
ee7948cb
PR
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);
e6488635
DB
182 REGISTER_MUXDEMUX (PCM_U16BE, pcm_u16be);
183 REGISTER_MUXDEMUX (PCM_U16LE, pcm_u16le);
184 REGISTER_MUXDEMUX (PCM_U8, pcm_u8);
f28070a1 185 REGISTER_DEMUXER (PMP, pmp);
e6488635 186 REGISTER_MUXER (PSP, psp);
3feb44a9 187 REGISTER_DEMUXER (PVA, pva);
cdce0fb8 188 REGISTER_DEMUXER (QCP, qcp);
7eb68edb 189 REGISTER_DEMUXER (R3D, r3d);
e6488635 190 REGISTER_MUXDEMUX (RAWVIDEO, rawvideo);
cb96da49 191 REGISTER_DEMUXER (RL2, rl2);
e6488635
DB
192 REGISTER_MUXDEMUX (RM, rm);
193 REGISTER_MUXDEMUX (ROQ, roq);
4fd51ee3 194 REGISTER_DEMUXER (RPL, rpl);
e8723e24 195 REGISTER_MUXDEMUX (RSO, rso);
44594cc7 196 REGISTER_MUXDEMUX (RTP, rtp);
6f5a3d0a 197 REGISTER_MUXDEMUX (RTSP, rtsp);
01c8d258 198 REGISTER_MUXDEMUX (SAP, sap);
e6488635 199 REGISTER_DEMUXER (SDP, sdp);
44b70ce5 200#if CONFIG_RTPDEC
4934884a 201 av_register_rtp_dynamic_payload_handlers();
ff13ba92 202 av_register_rdt_dynamic_payload_handlers();
ff70e601 203#endif
e6488635 204 REGISTER_DEMUXER (SEGAFILM, segafilm);
02e8f032 205 REGISTER_MUXER (SEGMENT, segment);
e6488635 206 REGISTER_DEMUXER (SHORTEN, shorten);
66f7679c 207 REGISTER_DEMUXER (SIFF, siff);
e6488635 208 REGISTER_DEMUXER (SMACKER, smacker);
ffa0923e 209 REGISTER_MUXDEMUX (SMJPEG, smjpeg);
e6488635 210 REGISTER_DEMUXER (SOL, sol);
cbfe5bee 211 REGISTER_MUXDEMUX (SOX, sox);
3b39e273 212 REGISTER_MUXDEMUX (SPDIF, spdif);
ba2c508d 213 REGISTER_MUXDEMUX (SRT, srt);
e6488635
DB
214 REGISTER_DEMUXER (STR, str);
215 REGISTER_MUXDEMUX (SWF, swf);
216 REGISTER_MUXER (TG2, tg2);
217 REGISTER_MUXER (TGP, tgp);
218 REGISTER_DEMUXER (THP, thp);
219 REGISTER_DEMUXER (TIERTEXSEQ, tiertexseq);
7c7d3e09 220 REGISTER_DEMUXER (TMV, tmv);
23d9cc45 221 REGISTER_MUXDEMUX (TRUEHD, truehd);
e6488635
DB
222 REGISTER_DEMUXER (TTA, tta);
223 REGISTER_DEMUXER (TXD, txd);
5a717094 224 REGISTER_DEMUXER (TTY, tty);
e6488635 225 REGISTER_DEMUXER (VC1, vc1);
327ce5e6 226 REGISTER_MUXDEMUX (VC1T, vc1t);
e6488635
DB
227 REGISTER_DEMUXER (VMD, vmd);
228 REGISTER_MUXDEMUX (VOC, voc);
616e899c 229 REGISTER_DEMUXER (VQF, vqf);
740e89cf 230 REGISTER_DEMUXER (W64, w64);
e6488635
DB
231 REGISTER_MUXDEMUX (WAV, wav);
232 REGISTER_DEMUXER (WC3, wc3);
316d6c15 233 REGISTER_MUXER (WEBM, webm);
e6488635
DB
234 REGISTER_DEMUXER (WSAUD, wsaud);
235 REGISTER_DEMUXER (WSVQA, wsvqa);
82ca054a 236 REGISTER_DEMUXER (WTV, wtv);
e6488635 237 REGISTER_DEMUXER (WV, wv);
861c63a2 238 REGISTER_DEMUXER (XA, xa);
c6c6c1aa 239 REGISTER_DEMUXER (XMV, xmv);
ad4c5034 240 REGISTER_DEMUXER (XWMA, xwma);
148bcae9 241 REGISTER_DEMUXER (YOP, yop);
e6488635 242 REGISTER_MUXDEMUX (YUV4MPEGPIPE, yuv4mpegpipe);
f02be79d 243
32583309 244 /* protocols */
8bdab32f 245#if FF_API_APPLEHTTP_PROTO
f4f4e12c 246 REGISTER_PROTOCOL (APPLEHTTP, applehttp);
8bdab32f 247#endif
88ad2faf 248 REGISTER_PROTOCOL (CONCAT, concat);
6e4f70a8 249 REGISTER_PROTOCOL (CRYPTO, crypto);
acd554c1 250 REGISTER_PROTOCOL (FFRTMPCRYPT, ffrtmpcrypt);
775c4d36 251 REGISTER_PROTOCOL (FFRTMPHTTP, ffrtmphttp);
e6488635 252 REGISTER_PROTOCOL (FILE, file);
865780ae 253 REGISTER_PROTOCOL (GOPHER, gopher);
8bdab32f 254 REGISTER_PROTOCOL (HLS, hls);
e6488635 255 REGISTER_PROTOCOL (HTTP, http);
9f1dae94 256 REGISTER_PROTOCOL (HTTPPROXY, httpproxy);
183baead 257 REGISTER_PROTOCOL (HTTPS, https);
f5ea69b2 258 REGISTER_PROTOCOL (MMSH, mmsh);
a2403986 259 REGISTER_PROTOCOL (MMST, mmst);
a1db009e 260 REGISTER_PROTOCOL (MD5, md5);
e6488635 261 REGISTER_PROTOCOL (PIPE, pipe);
9fd6b843 262 REGISTER_PROTOCOL (RTMP, rtmp);
acd554c1 263 REGISTER_PROTOCOL (RTMPE, rtmpe);
6aedabc9 264 REGISTER_PROTOCOL (RTMPS, rtmps);
8e50c57d 265 REGISTER_PROTOCOL (RTMPT, rtmpt);
08cd95e8 266 REGISTER_PROTOCOL (RTMPTE, rtmpte);
86991ce2 267 REGISTER_PROTOCOL (RTMPTS, rtmpts);
e6488635 268 REGISTER_PROTOCOL (RTP, rtp);
5699884c 269 REGISTER_PROTOCOL (SCTP, sctp);
e6488635 270 REGISTER_PROTOCOL (TCP, tcp);
558d192d 271 REGISTER_PROTOCOL (TLS, tls);
e6488635 272 REGISTER_PROTOCOL (UDP, udp);
c3b57d6e
DB
273
274 /* external libraries */
c3b57d6e
DB
275 REGISTER_PROTOCOL (LIBRTMP, librtmp);
276 REGISTER_PROTOCOL (LIBRTMPE, librtmpe);
277 REGISTER_PROTOCOL (LIBRTMPS, librtmps);
278 REGISTER_PROTOCOL (LIBRTMPT, librtmpt);
279 REGISTER_PROTOCOL (LIBRTMPTE, librtmpte);
4624540b 280}