Add an RTSP muxer
[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"
20631a9c 22#include "rtp.h"
ff13ba92 23#include "rdt.h"
4624540b 24
8a9572c2 25#define REGISTER_MUXER(X,x) { \
6d99b228 26 extern AVOutputFormat x##_muxer; \
49fb20cb 27 if(CONFIG_##X##_MUXER) av_register_output_format(&x##_muxer); }
7f37f568 28
8a9572c2 29#define REGISTER_DEMUXER(X,x) { \
6d99b228 30 extern AVInputFormat x##_demuxer; \
49fb20cb 31 if(CONFIG_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
7f37f568 32
5b9b3b68 33#define REGISTER_MUXDEMUX(X,x) REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
7f37f568 34
8a9572c2 35#define REGISTER_PROTOCOL(X,x) { \
6d99b228 36 extern URLProtocol x##_protocol; \
5d377501 37 if(CONFIG_##X##_PROTOCOL) av_register_protocol(&x##_protocol); }
5b9b3b68 38
4624540b
FB
39void av_register_all(void)
40{
5e534865 41 static int initialized;
115329f1 42
5e534865 43 if (initialized)
caaeefc5 44 return;
5e534865 45 initialized = 1;
caaeefc5 46
4624540b
FB
47 avcodec_register_all();
48
32583309 49 /* (de)muxers */
e6488635
DB
50 REGISTER_DEMUXER (AAC, aac);
51 REGISTER_MUXDEMUX (AC3, ac3);
52 REGISTER_MUXER (ADTS, adts);
61dc238b 53 REGISTER_DEMUXER (AEA, aea);
e6488635
DB
54 REGISTER_MUXDEMUX (AIFF, aiff);
55 REGISTER_MUXDEMUX (AMR, amr);
e6565055 56 REGISTER_DEMUXER (ANM, anm);
e6488635 57 REGISTER_DEMUXER (APC, apc);
bf4a1f17 58 REGISTER_DEMUXER (APE, ape);
e6488635 59 REGISTER_MUXDEMUX (ASF, asf);
88caf345 60 REGISTER_MUXDEMUX (ASS, ass);
e6488635
DB
61 REGISTER_MUXER (ASF_STREAM, asf_stream);
62 REGISTER_MUXDEMUX (AU, au);
e6488635 63 REGISTER_MUXDEMUX (AVI, avi);
53b73365 64 REGISTER_DEMUXER (AVISYNTH, avisynth);
fa1ad97f 65 REGISTER_MUXER (AVM2, avm2);
e6488635
DB
66 REGISTER_DEMUXER (AVS, avs);
67 REGISTER_DEMUXER (BETHSOFTVID, bethsoftvid);
b64c096b 68 REGISTER_DEMUXER (BFI, bfi);
2e375df5 69 REGISTER_DEMUXER (BINK, bink);
e6488635 70 REGISTER_DEMUXER (C93, c93);
5f14b565 71 REGISTER_DEMUXER (CAF, caf);
9f2fc126 72 REGISTER_DEMUXER (CAVSVIDEO, cavsvideo);
a3d995c1 73 REGISTER_DEMUXER (CDG, cdg);
e6488635 74 REGISTER_MUXER (CRC, crc);
51c3861e 75 REGISTER_MUXDEMUX (DAUD, daud);
17ac9f1c 76 REGISTER_MUXDEMUX (DIRAC, dirac);
bd09e8a7 77 REGISTER_MUXDEMUX (DNXHD, dnxhd);
e6488635 78 REGISTER_DEMUXER (DSICIN, dsicin);
63d86443 79 REGISTER_MUXDEMUX (DTS, dts);
e6488635 80 REGISTER_MUXDEMUX (DV, dv);
e6488635
DB
81 REGISTER_DEMUXER (DXA, dxa);
82 REGISTER_DEMUXER (EA, ea);
9abf2433 83 REGISTER_DEMUXER (EA_CDATA, ea_cdata);
2988c93d 84 REGISTER_MUXDEMUX (EAC3, eac3);
e6488635 85 REGISTER_MUXDEMUX (FFM, ffm);
83ab7f18 86 REGISTER_MUXDEMUX (FILMSTRIP, filmstrip);
e6488635
DB
87 REGISTER_MUXDEMUX (FLAC, flac);
88 REGISTER_DEMUXER (FLIC, flic);
89 REGISTER_MUXDEMUX (FLV, flv);
90 REGISTER_DEMUXER (FOURXM, fourxm);
91 REGISTER_MUXER (FRAMECRC, framecrc);
0b54f3c0 92 REGISTER_MUXER (GIF, gif);
60711e95 93 REGISTER_DEMUXER (GSM, gsm);
e6488635
DB
94 REGISTER_MUXDEMUX (GXF, gxf);
95 REGISTER_MUXDEMUX (H261, h261);
96 REGISTER_MUXDEMUX (H263, h263);
97 REGISTER_MUXDEMUX (H264, h264);
98 REGISTER_DEMUXER (IDCIN, idcin);
3a027f5e 99 REGISTER_DEMUXER (IFF, iff);
e6488635
DB
100 REGISTER_MUXDEMUX (IMAGE2, image2);
101 REGISTER_MUXDEMUX (IMAGE2PIPE, image2pipe);
102 REGISTER_DEMUXER (INGENIENT, ingenient);
103 REGISTER_DEMUXER (IPMOVIE, ipmovie);
aa9f4208 104 REGISTER_MUXER (IPOD, ipod);
055dc116 105 REGISTER_DEMUXER (ISS, iss);
00b6fa40 106 REGISTER_DEMUXER (IV8, iv8);
670c7847 107 REGISTER_DEMUXER (LMLM4, lmlm4);
e6488635
DB
108 REGISTER_MUXDEMUX (M4V, m4v);
109 REGISTER_MUXDEMUX (MATROSKA, matroska);
110 REGISTER_MUXER (MATROSKA_AUDIO, matroska_audio);
111 REGISTER_MUXDEMUX (MJPEG, mjpeg);
9145021d 112 REGISTER_MUXDEMUX (MLP, mlp);
e6488635
DB
113 REGISTER_DEMUXER (MM, mm);
114 REGISTER_MUXDEMUX (MMF, mmf);
115 REGISTER_MUXDEMUX (MOV, mov);
116 REGISTER_MUXER (MP2, mp2);
117 REGISTER_MUXDEMUX (MP3, mp3);
118 REGISTER_MUXER (MP4, mp4);
119 REGISTER_DEMUXER (MPC, mpc);
12877faf 120 REGISTER_DEMUXER (MPC8, mpc8);
e6488635
DB
121 REGISTER_MUXER (MPEG1SYSTEM, mpeg1system);
122 REGISTER_MUXER (MPEG1VCD, mpeg1vcd);
123 REGISTER_MUXER (MPEG1VIDEO, mpeg1video);
124 REGISTER_MUXER (MPEG2DVD, mpeg2dvd);
125 REGISTER_MUXER (MPEG2SVCD, mpeg2svcd);
126 REGISTER_MUXER (MPEG2VIDEO, mpeg2video);
127 REGISTER_MUXER (MPEG2VOB, mpeg2vob);
128 REGISTER_DEMUXER (MPEGPS, mpegps);
129 REGISTER_MUXDEMUX (MPEGTS, mpegts);
130 REGISTER_DEMUXER (MPEGTSRAW, mpegtsraw);
131 REGISTER_DEMUXER (MPEGVIDEO, mpegvideo);
132 REGISTER_MUXER (MPJPEG, mpjpeg);
0f3444e1 133 REGISTER_DEMUXER (MSNWC_TCP, msnwc_tcp);
e6488635 134 REGISTER_DEMUXER (MTV, mtv);
5b8cc860 135 REGISTER_DEMUXER (MVI, mvi);
cedebde1 136 REGISTER_MUXDEMUX (MXF, mxf);
bd3f81f3 137 REGISTER_MUXER (MXF_D10, mxf_d10);
eaf5d011 138 REGISTER_DEMUXER (NC, nc);
e6488635
DB
139 REGISTER_DEMUXER (NSV, nsv);
140 REGISTER_MUXER (NULL, null);
141 REGISTER_MUXDEMUX (NUT, nut);
142 REGISTER_DEMUXER (NUV, nuv);
5118cae6 143 REGISTER_MUXDEMUX (OGG, ogg);
b339f0c6 144 REGISTER_DEMUXER (OMA, oma);
e6488635
DB
145 REGISTER_MUXDEMUX (PCM_ALAW, pcm_alaw);
146 REGISTER_MUXDEMUX (PCM_MULAW, pcm_mulaw);
ee7948cb
PR
147 REGISTER_MUXDEMUX (PCM_F64BE, pcm_f64be);
148 REGISTER_MUXDEMUX (PCM_F64LE, pcm_f64le);
149 REGISTER_MUXDEMUX (PCM_F32BE, pcm_f32be);
150 REGISTER_MUXDEMUX (PCM_F32LE, pcm_f32le);
151 REGISTER_MUXDEMUX (PCM_S32BE, pcm_s32be);
152 REGISTER_MUXDEMUX (PCM_S32LE, pcm_s32le);
153 REGISTER_MUXDEMUX (PCM_S24BE, pcm_s24be);
154 REGISTER_MUXDEMUX (PCM_S24LE, pcm_s24le);
e6488635
DB
155 REGISTER_MUXDEMUX (PCM_S16BE, pcm_s16be);
156 REGISTER_MUXDEMUX (PCM_S16LE, pcm_s16le);
157 REGISTER_MUXDEMUX (PCM_S8, pcm_s8);
ee7948cb
PR
158 REGISTER_MUXDEMUX (PCM_U32BE, pcm_u32be);
159 REGISTER_MUXDEMUX (PCM_U32LE, pcm_u32le);
160 REGISTER_MUXDEMUX (PCM_U24BE, pcm_u24be);
161 REGISTER_MUXDEMUX (PCM_U24LE, pcm_u24le);
e6488635
DB
162 REGISTER_MUXDEMUX (PCM_U16BE, pcm_u16be);
163 REGISTER_MUXDEMUX (PCM_U16LE, pcm_u16le);
164 REGISTER_MUXDEMUX (PCM_U8, pcm_u8);
165 REGISTER_MUXER (PSP, psp);
3feb44a9 166 REGISTER_DEMUXER (PVA, pva);
cdce0fb8 167 REGISTER_DEMUXER (QCP, qcp);
7eb68edb 168 REGISTER_DEMUXER (R3D, r3d);
e6488635 169 REGISTER_MUXDEMUX (RAWVIDEO, rawvideo);
cb96da49 170 REGISTER_DEMUXER (RL2, rl2);
e6488635
DB
171 REGISTER_MUXDEMUX (RM, rm);
172 REGISTER_MUXDEMUX (ROQ, roq);
4fd51ee3 173 REGISTER_DEMUXER (RPL, rpl);
e6488635 174 REGISTER_MUXER (RTP, rtp);
6f5a3d0a 175 REGISTER_MUXDEMUX (RTSP, rtsp);
e6488635 176 REGISTER_DEMUXER (SDP, sdp);
b250f9c6 177#if CONFIG_SDP_DEMUXER
4934884a 178 av_register_rtp_dynamic_payload_handlers();
ff13ba92 179 av_register_rdt_dynamic_payload_handlers();
ff70e601 180#endif
e6488635
DB
181 REGISTER_DEMUXER (SEGAFILM, segafilm);
182 REGISTER_DEMUXER (SHORTEN, shorten);
66f7679c 183 REGISTER_DEMUXER (SIFF, siff);
e6488635
DB
184 REGISTER_DEMUXER (SMACKER, smacker);
185 REGISTER_DEMUXER (SOL, sol);
cbfe5bee 186 REGISTER_MUXDEMUX (SOX, sox);
ab1eff9c 187 REGISTER_MUXER (SPDIF, spdif);
e6488635
DB
188 REGISTER_DEMUXER (STR, str);
189 REGISTER_MUXDEMUX (SWF, swf);
190 REGISTER_MUXER (TG2, tg2);
191 REGISTER_MUXER (TGP, tgp);
192 REGISTER_DEMUXER (THP, thp);
193 REGISTER_DEMUXER (TIERTEXSEQ, tiertexseq);
7c7d3e09 194 REGISTER_DEMUXER (TMV, tmv);
23d9cc45 195 REGISTER_MUXDEMUX (TRUEHD, truehd);
e6488635
DB
196 REGISTER_DEMUXER (TTA, tta);
197 REGISTER_DEMUXER (TXD, txd);
e6488635 198 REGISTER_DEMUXER (VC1, vc1);
327ce5e6 199 REGISTER_MUXDEMUX (VC1T, vc1t);
e6488635
DB
200 REGISTER_DEMUXER (VMD, vmd);
201 REGISTER_MUXDEMUX (VOC, voc);
616e899c 202 REGISTER_DEMUXER (VQF, vqf);
740e89cf 203 REGISTER_DEMUXER (W64, w64);
e6488635
DB
204 REGISTER_MUXDEMUX (WAV, wav);
205 REGISTER_DEMUXER (WC3, wc3);
206 REGISTER_DEMUXER (WSAUD, wsaud);
207 REGISTER_DEMUXER (WSVQA, wsvqa);
208 REGISTER_DEMUXER (WV, wv);
861c63a2 209 REGISTER_DEMUXER (XA, xa);
e6488635 210 REGISTER_MUXDEMUX (YUV4MPEGPIPE, yuv4mpegpipe);
f02be79d 211
a319c212 212 /* external libraries */
a319c212
DB
213 REGISTER_MUXDEMUX (LIBNUT, libnut);
214
32583309 215 /* protocols */
e6488635 216 REGISTER_PROTOCOL (FILE, file);
865780ae 217 REGISTER_PROTOCOL (GOPHER, gopher);
e6488635
DB
218 REGISTER_PROTOCOL (HTTP, http);
219 REGISTER_PROTOCOL (PIPE, pipe);
9fd6b843 220 REGISTER_PROTOCOL (RTMP, rtmp);
e6488635
DB
221 REGISTER_PROTOCOL (RTP, rtp);
222 REGISTER_PROTOCOL (TCP, tcp);
223 REGISTER_PROTOCOL (UDP, udp);
084eb95f 224 REGISTER_PROTOCOL (CONCAT, concat);
4624540b 225}