2 * Register all the formats and protocols
3 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
5 * This file is part of FFmpeg.
7 * FFmpeg 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.
12 * FFmpeg 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.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 #include "allformats.h"
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 #define REGISTER_PROTOCOL(X,x) \
30 if(ENABLE_##X##_PROTOCOL) register_protocol(&x##_protocol)
32 /* If you do not call this function, then you can select exactly which
33 formats you want to support */
36 * Initialize libavformat and register all the (de)muxers and protocols.
38 void av_register_all(void)
40 static int inited = 0;
47 avcodec_register_all();
49 REGISTER_DEMUXER (AAC, aac);
50 REGISTER_MUXDEMUX(AC3, ac3);
51 REGISTER_MUXER (ADTS, adts);
52 REGISTER_MUXDEMUX(AIFF, aiff);
53 REGISTER_MUXDEMUX(AMR, amr);
54 REGISTER_DEMUXER (APC, apc);
55 REGISTER_MUXDEMUX(ASF, asf);
56 REGISTER_MUXER (ASF_STREAM, asf_stream);
57 REGISTER_MUXDEMUX(AU, au);
58 REGISTER_MUXDEMUX(AUDIO, audio);
59 REGISTER_MUXDEMUX(AVI, avi);
60 #ifdef CONFIG_AVISYNTH
61 av_register_input_format(&avisynth_demuxer);
63 REGISTER_DEMUXER (AVS, avs);
64 REGISTER_DEMUXER (BETHSOFTVID, bethsoftvid);
65 REGISTER_DEMUXER (C93, c93);
66 REGISTER_MUXER (CRC, crc);
67 REGISTER_DEMUXER (DAUD, daud);
68 REGISTER_DEMUXER (DSICIN, dsicin);
69 REGISTER_DEMUXER (DTS, dts);
70 REGISTER_MUXDEMUX(DV, dv);
71 REGISTER_DEMUXER (DV1394, dv1394);
72 REGISTER_DEMUXER (DXA, dxa);
73 REGISTER_DEMUXER (EA, ea);
74 REGISTER_MUXDEMUX(FFM, ffm);
75 REGISTER_MUXDEMUX(FLAC, flac);
76 REGISTER_DEMUXER (FLIC, flic);
77 REGISTER_MUXDEMUX(FLV, flv);
78 REGISTER_DEMUXER (FOURXM, fourxm);
79 REGISTER_MUXER (FRAMECRC, framecrc);
80 REGISTER_MUXDEMUX(GIF, gif);
81 REGISTER_MUXDEMUX(GXF, gxf);
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);
90 REGISTER_DEMUXER (LIBDC1394, libdc1394);
91 if (!ENABLE_NUT_DEMUXER) REGISTER_DEMUXER (LIBNUT, libnut);
92 if (!ENABLE_NUT_MUXER) REGISTER_MUXER (LIBNUT, libnut);
93 REGISTER_MUXDEMUX(M4V, m4v);
94 REGISTER_DEMUXER (MATROSKA, matroska);
95 REGISTER_MUXDEMUX(MJPEG, mjpeg);
96 REGISTER_DEMUXER (MM, mm);
97 REGISTER_MUXDEMUX(MMF, mmf);
98 REGISTER_MUXDEMUX(MOV, mov);
99 REGISTER_MUXER (MP2, mp2);
100 REGISTER_MUXDEMUX(MP3, mp3);
101 REGISTER_MUXER (MP4, mp4);
102 REGISTER_DEMUXER (MPC, mpc);
103 REGISTER_MUXER (MPEG1SYSTEM, mpeg1system);
104 REGISTER_MUXER (MPEG1VCD, mpeg1vcd);
105 REGISTER_MUXER (MPEG1VIDEO, mpeg1video);
106 REGISTER_MUXER (MPEG2DVD, mpeg2dvd);
107 REGISTER_MUXER (MPEG2SVCD, mpeg2svcd);
108 REGISTER_MUXER (MPEG2VIDEO, mpeg2video);
109 REGISTER_MUXER (MPEG2VOB, mpeg2vob);
110 REGISTER_DEMUXER (MPEGPS, mpegps);
111 REGISTER_MUXDEMUX(MPEGTS, mpegts);
112 REGISTER_DEMUXER (MPEGTSRAW, mpegtsraw);
113 REGISTER_DEMUXER (MPEGVIDEO, mpegvideo);
114 REGISTER_MUXER (MPJPEG, mpjpeg);
115 REGISTER_DEMUXER (MTV, mtv);
116 REGISTER_DEMUXER (MXF, mxf);
117 REGISTER_DEMUXER (NSV, nsv);
118 REGISTER_MUXER (NULL, null);
119 REGISTER_MUXDEMUX(NUT, nut);
120 REGISTER_DEMUXER (NUV, nuv);
121 REGISTER_MUXDEMUX(OGG, ogg);
122 REGISTER_MUXDEMUX(PCM_ALAW, pcm_alaw);
123 REGISTER_MUXDEMUX(PCM_MULAW, pcm_mulaw);
124 REGISTER_MUXDEMUX(PCM_S16BE, pcm_s16be);
125 REGISTER_MUXDEMUX(PCM_S16LE, pcm_s16le);
126 REGISTER_MUXDEMUX(PCM_S8, pcm_s8);
127 REGISTER_MUXDEMUX(PCM_U16BE, pcm_u16be);
128 REGISTER_MUXDEMUX(PCM_U16LE, pcm_u16le);
129 REGISTER_MUXDEMUX(PCM_U8, pcm_u8);
130 REGISTER_MUXER (PSP, psp);
131 REGISTER_MUXDEMUX(RAWVIDEO, rawvideo);
132 REGISTER_MUXDEMUX(RM, rm);
133 REGISTER_MUXDEMUX(ROQ, roq);
134 REGISTER_DEMUXER (REDIR, redir);
135 REGISTER_MUXER (RTP, rtp);
136 REGISTER_DEMUXER (RTSP, rtsp);
137 REGISTER_DEMUXER (SDP, sdp);
138 #ifdef CONFIG_RTP_MUXER
139 av_register_rtp_dynamic_payload_handlers();
141 REGISTER_DEMUXER (SEGAFILM, segafilm);
142 REGISTER_DEMUXER (SHORTEN, shorten);
143 REGISTER_DEMUXER (SMACKER, smacker);
144 REGISTER_DEMUXER (SOL, sol);
145 REGISTER_DEMUXER (STR, str);
146 REGISTER_MUXDEMUX(SWF, swf);
147 REGISTER_MUXER (TG2, tg2);
148 REGISTER_MUXER (TGP, tgp);
149 REGISTER_DEMUXER (THP, thp);
150 REGISTER_DEMUXER (TIERTEXSEQ, tiertexseq);
151 REGISTER_DEMUXER (TTA, tta);
152 REGISTER_DEMUXER (TXD, txd);
153 REGISTER_DEMUXER (V4L2, v4l2);
154 REGISTER_DEMUXER (VC1, vc1);
155 REGISTER_DEMUXER (VIDEO_GRAB_BKTR, video_grab_bktr);
156 REGISTER_DEMUXER (VIDEO_GRAB_V4L, video_grab_v4l);
157 REGISTER_DEMUXER (VMD, vmd);
158 REGISTER_MUXDEMUX(VOC, voc);
159 REGISTER_MUXDEMUX(WAV, wav);
160 REGISTER_DEMUXER (WC3, wc3);
161 REGISTER_DEMUXER (WSAUD, wsaud);
162 REGISTER_DEMUXER (WSVQA, wsvqa);
163 REGISTER_DEMUXER (WV, wv);
164 REGISTER_DEMUXER (X11_GRAB_DEVICE, x11_grab_device);
165 REGISTER_MUXDEMUX(YUV4MPEGPIPE, yuv4mpegpipe);
167 REGISTER_PROTOCOL(FILE, file);
168 REGISTER_PROTOCOL(HTTP, http);
169 REGISTER_PROTOCOL(PIPE, pipe);
170 REGISTER_PROTOCOL(RTP, rtp);
171 REGISTER_PROTOCOL(TCP, tcp);
172 REGISTER_PROTOCOL(UDP, udp);