Don't compile RTSP_DEMUXER if not requested
[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"
e006c307 22#include "allformats.h"
4624540b 23
5b9b3b68
AJ
24#define REGISTER_MUXER(X,x) \
25 if(ENABLE_##X##_MUXER) av_register_output_format(&x##_muxer)
26#define REGISTER_DEMUXER(X,x) \
27 if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer)
28#define REGISTER_MUXDEMUX(X,x) REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
29
4624540b
FB
30/* If you do not call this function, then you can select exactly which
31 formats you want to support */
32
33/**
fa1ab872 34 * Initialize libavformat and register all the (de)muxers and protocols.
4624540b
FB
35 */
36void av_register_all(void)
37{
caaeefc5 38 static int inited = 0;
115329f1 39
caaeefc5
MN
40 if (inited != 0)
41 return;
42 inited = 1;
43
4624540b
FB
44 avcodec_init();
45 avcodec_register_all();
46
5b9b3b68
AJ
47 REGISTER_DEMUXER (AAC, aac);
48 REGISTER_MUXDEMUX(AC3, ac3);
49 REGISTER_MUXER (ADTS, adts);
50 REGISTER_MUXDEMUX(AIFF, aiff);
51 REGISTER_MUXDEMUX(AMR, amr);
8e952e4d 52 REGISTER_DEMUXER (APC, apc);
5b9b3b68
AJ
53 REGISTER_MUXDEMUX(ASF, asf);
54 REGISTER_MUXER (ASF_STREAM, asf_stream);
55 REGISTER_MUXDEMUX(AU, au);
5b9b3b68 56 REGISTER_MUXDEMUX(AUDIO, audio);
5b9b3b68 57 REGISTER_MUXDEMUX(AVI, avi);
8ac17293
SH
58#ifdef CONFIG_AVISYNTH
59 av_register_input_format(&avisynth_demuxer);
60#endif
5b9b3b68 61 REGISTER_DEMUXER (AVS, avs);
1e6c6759 62 REGISTER_DEMUXER (BETHSOFTVID, bethsoftvid);
9a0ddd09 63 REGISTER_DEMUXER (C93, c93);
5b9b3b68
AJ
64 REGISTER_MUXER (CRC, crc);
65 REGISTER_DEMUXER (DAUD, daud);
5b9b3b68 66 REGISTER_DEMUXER (DC1394, dc1394);
5b9b3b68
AJ
67 REGISTER_DEMUXER (DSICIN, dsicin);
68 REGISTER_DEMUXER (DTS, dts);
69 REGISTER_MUXDEMUX(DV, dv);
5b9b3b68 70 REGISTER_DEMUXER (DV1394, dv1394);
33a0dd37 71 REGISTER_DEMUXER (DXA, dxa);
5b9b3b68
AJ
72 REGISTER_DEMUXER (EA, ea);
73 REGISTER_MUXDEMUX(FFM, ffm);
74 REGISTER_MUXDEMUX(FLAC, flac);
75 REGISTER_DEMUXER (FLIC, flic);
76 REGISTER_MUXDEMUX(FLV, flv);
77 REGISTER_DEMUXER (FOURXM, fourxm);
78 REGISTER_MUXER (FRAMECRC, framecrc);
79 REGISTER_MUXDEMUX(GIF, gif);
80 REGISTER_DEMUXER (GXF, gxf);
5b9b3b68 81 REGISTER_MUXER (GXF, gxf);
5b9b3b68
AJ
82 REGISTER_MUXDEMUX(H261, h261);
83 REGISTER_MUXDEMUX(H263, h263);
84 REGISTER_MUXDEMUX(H264, h264);
85 REGISTER_DEMUXER (IDCIN, idcin);
86 REGISTER_MUXDEMUX(IMAGE2, image2);
87 REGISTER_MUXDEMUX(IMAGE2PIPE, image2pipe);
88 REGISTER_DEMUXER (INGENIENT, ingenient);
89 REGISTER_DEMUXER (IPMOVIE, ipmovie);
d7c59247
DB
90 if (!ENABLE_NUT_DEMUXER) REGISTER_DEMUXER (LIBNUT, libnut);
91 REGISTER_MUXER (LIBNUT, libnut);
5b9b3b68
AJ
92 REGISTER_MUXDEMUX(M4V, m4v);
93 REGISTER_DEMUXER (MATROSKA, matroska);
94 REGISTER_MUXDEMUX(MJPEG, mjpeg);
95 REGISTER_DEMUXER (MM, mm);
96 REGISTER_MUXDEMUX(MMF, mmf);
97 REGISTER_MUXDEMUX(MOV, mov);
98 REGISTER_MUXER (MP2, mp2);
99 REGISTER_MUXDEMUX(MP3, mp3);
100 REGISTER_MUXER (MP4, mp4);
185c7b6b 101 REGISTER_DEMUXER (MPC, mpc);
5b9b3b68
AJ
102 REGISTER_MUXER (MPEG1SYSTEM, mpeg1system);
103 REGISTER_MUXER (MPEG1VCD, mpeg1vcd);
104 REGISTER_MUXER (MPEG1VIDEO, mpeg1video);
105 REGISTER_MUXER (MPEG2DVD, mpeg2dvd);
106 REGISTER_MUXER (MPEG2SVCD, mpeg2svcd);
107 REGISTER_MUXER (MPEG2VIDEO, mpeg2video);
108 REGISTER_MUXER (MPEG2VOB, mpeg2vob);
109 REGISTER_DEMUXER (MPEGPS, mpegps);
110 REGISTER_MUXDEMUX(MPEGTS, mpegts);
111 REGISTER_DEMUXER (MPEGVIDEO, mpegvideo);
112 REGISTER_MUXER (MPJPEG, mpjpeg);
113 REGISTER_DEMUXER (MTV, mtv);
114 REGISTER_DEMUXER (MXF, mxf);
115 REGISTER_DEMUXER (NSV, nsv);
116 REGISTER_MUXER (NULL, null);
117 REGISTER_DEMUXER (NUT, nut);
5b9b3b68
AJ
118 REGISTER_DEMUXER (NUV, nuv);
119 REGISTER_DEMUXER (OGG, ogg);
5b9b3b68 120 REGISTER_MUXER (OGG, ogg);
5b9b3b68
AJ
121 REGISTER_MUXDEMUX(PCM_ALAW, pcm_alaw);
122 REGISTER_MUXDEMUX(PCM_MULAW, pcm_mulaw);
123 REGISTER_MUXDEMUX(PCM_S16BE, pcm_s16be);
124 REGISTER_MUXDEMUX(PCM_S16LE, pcm_s16le);
125 REGISTER_MUXDEMUX(PCM_S8, pcm_s8);
126 REGISTER_MUXDEMUX(PCM_U16BE, pcm_u16be);
127 REGISTER_MUXDEMUX(PCM_U16LE, pcm_u16le);
128 REGISTER_MUXDEMUX(PCM_U8, pcm_u8);
129 REGISTER_MUXER (PSP, psp);
130 REGISTER_MUXDEMUX(RAWVIDEO, rawvideo);
131 REGISTER_MUXDEMUX(RM, rm);
132 REGISTER_DEMUXER (ROQ, roq);
5b9b3b68
AJ
133 REGISTER_DEMUXER (REDIR, redir);
134 REGISTER_MUXER (RTP, rtp);
135 REGISTER_DEMUXER (RTSP, rtsp);
136 REGISTER_DEMUXER (SDP, sdp);
eba70fa4 137#ifdef CONFIG_NETWORK
4934884a 138 av_register_rtp_dynamic_payload_handlers();
ff70e601 139#endif
5b9b3b68
AJ
140 REGISTER_DEMUXER (SEGAFILM, segafilm);
141 REGISTER_DEMUXER (SHORTEN, shorten);
142 REGISTER_DEMUXER (SMACKER, smacker);
143 REGISTER_DEMUXER (SOL, sol);
144 REGISTER_DEMUXER (STR, str);
145 REGISTER_MUXDEMUX(SWF, swf);
146 REGISTER_MUXER (TG2, tg2);
147 REGISTER_MUXER (TGP, tgp);
efb0c399 148 REGISTER_DEMUXER (THP, thp);
5b9b3b68
AJ
149 REGISTER_DEMUXER (TIERTEXSEQ, tiertexseq);
150 REGISTER_DEMUXER (TTA, tta);
5b9b3b68 151 REGISTER_DEMUXER (V4L2, v4l2);
7bb5c2a6 152 REGISTER_DEMUXER (VC1, vc1);
3af6d5cf
DB
153 REGISTER_DEMUXER (VIDEO_GRAB_BKTR, video_grab_bktr);
154 REGISTER_DEMUXER (VIDEO_GRAB_V4L, video_grab_v4l);
5b9b3b68
AJ
155 REGISTER_DEMUXER (VMD, vmd);
156 REGISTER_MUXDEMUX(VOC, voc);
157 REGISTER_MUXDEMUX(WAV, wav);
158 REGISTER_DEMUXER (WC3, wc3);
159 REGISTER_DEMUXER (WSAUD, wsaud);
160 REGISTER_DEMUXER (WSVQA, wsvqa);
161 REGISTER_DEMUXER (WV, wv);
f58f4ce1 162 REGISTER_DEMUXER (X11_GRAB_DEVICE, x11_grab_device);
5b9b3b68 163 REGISTER_MUXDEMUX(YUV4MPEGPIPE, yuv4mpegpipe);
f02be79d 164
04f46ced 165#ifdef CONFIG_PROTOCOLS
4624540b
FB
166 /* file protocols */
167 register_protocol(&file_protocol);
168 register_protocol(&pipe_protocol);
169#ifdef CONFIG_NETWORK
4624540b
FB
170 register_protocol(&udp_protocol);
171 register_protocol(&rtp_protocol);
172 register_protocol(&tcp_protocol);
173 register_protocol(&http_protocol);
174#endif
04f46ced 175#endif
4624540b 176}