Statistics
| Branch: | Revision:

ffmpeg / libavformat / allformats.c @ 54bc6403

History | View | Annotate | Download (8.82 KB)

1 4624540b Fabrice Bellard
/*
2
 * Register all the formats and protocols
3
 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4
 *
5 b78e7197 Diego Biurrun
 * This file is part of FFmpeg.
6
 *
7
 * FFmpeg is free software; you can redistribute it and/or
8 4624540b Fabrice Bellard
 * modify it under the terms of the GNU Lesser General Public
9
 * License as published by the Free Software Foundation; either
10 b78e7197 Diego Biurrun
 * version 2.1 of the License, or (at your option) any later version.
11 4624540b Fabrice Bellard
 *
12 b78e7197 Diego Biurrun
 * FFmpeg is distributed in the hope that it will be useful,
13 4624540b Fabrice Bellard
 * 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
18 b78e7197 Diego Biurrun
 * License along with FFmpeg; if not, write to the Free Software
19 5509bffa Diego Biurrun
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 4624540b Fabrice Bellard
 */
21
#include "avformat.h"
22 20631a9c Luca Abeni
#include "rtp.h"
23 ff13ba92 Ronald S. Bultje
#include "rdt.h"
24 4624540b Fabrice Bellard
25 8a9572c2 Diego Biurrun
#define REGISTER_MUXER(X,x) { \
26 6d99b228 Diego Biurrun
    extern AVOutputFormat x##_muxer; \
27 49fb20cb Aurelien Jacobs
    if(CONFIG_##X##_MUXER) av_register_output_format(&x##_muxer); }
28 7f37f568 Diego Biurrun
29 8a9572c2 Diego Biurrun
#define REGISTER_DEMUXER(X,x) { \
30 6d99b228 Diego Biurrun
    extern AVInputFormat x##_demuxer; \
31 49fb20cb Aurelien Jacobs
    if(CONFIG_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
32 7f37f568 Diego Biurrun
33 5b9b3b68 Aurelien Jacobs
#define REGISTER_MUXDEMUX(X,x)  REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
34 7f37f568 Diego Biurrun
35 8a9572c2 Diego Biurrun
#define REGISTER_PROTOCOL(X,x) { \
36 6d99b228 Diego Biurrun
    extern URLProtocol x##_protocol; \
37 9b07a2dc Martin Storsjö
    if(CONFIG_##X##_PROTOCOL) av_register_protocol2(&x##_protocol, sizeof(x##_protocol)); }
38 5b9b3b68 Aurelien Jacobs
39 4624540b Fabrice Bellard
void av_register_all(void)
40
{
41 5e534865 Diego Biurrun
    static int initialized;
42 115329f1 Diego Biurrun
43 5e534865 Diego Biurrun
    if (initialized)
44 caaeefc5 Michael Niedermayer
        return;
45 5e534865 Diego Biurrun
    initialized = 1;
46 caaeefc5 Michael Niedermayer
47 4624540b Fabrice Bellard
    avcodec_register_all();
48
49 32583309 Diego Biurrun
    /* (de)muxers */
50 b7cf4e4f Tobias Bindhammer
    REGISTER_MUXER    (A64, a64);
51 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (AAC, aac);
52
    REGISTER_MUXDEMUX (AC3, ac3);
53
    REGISTER_MUXER    (ADTS, adts);
54 61dc238b Benjamin Larsson
    REGISTER_DEMUXER  (AEA, aea);
55 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (AIFF, aiff);
56
    REGISTER_MUXDEMUX (AMR, amr);
57 e6565055 Peter Ross
    REGISTER_DEMUXER  (ANM, anm);
58 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (APC, apc);
59 bf4a1f17 Kostya Shishkov
    REGISTER_DEMUXER  (APE, ape);
60 cd223e0b Martin Storsjö
    REGISTER_DEMUXER  (APPLEHTTP, applehttp);
61 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (ASF, asf);
62 88caf345 Michael Niedermayer
    REGISTER_MUXDEMUX (ASS, ass);
63 e6488635 Diego Biurrun
    REGISTER_MUXER    (ASF_STREAM, asf_stream);
64
    REGISTER_MUXDEMUX (AU, au);
65
    REGISTER_MUXDEMUX (AVI, avi);
66 53b73365 Ramiro Polla
    REGISTER_DEMUXER  (AVISYNTH, avisynth);
67 fa1ad97f Baptiste Coudurier
    REGISTER_MUXER    (AVM2, avm2);
68 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (AVS, avs);
69
    REGISTER_DEMUXER  (BETHSOFTVID, bethsoftvid);
70 b64c096b Sisir Koppaka
    REGISTER_DEMUXER  (BFI, bfi);
71 2e375df5 Peter Ross
    REGISTER_DEMUXER  (BINK, bink);
72 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (C93, c93);
73 5f14b565 Peter Ross
    REGISTER_DEMUXER  (CAF, caf);
74 de295976 Stefan Gehrer
    REGISTER_MUXDEMUX (CAVSVIDEO, cavsvideo);
75 a3d995c1 Michael Tison
    REGISTER_DEMUXER  (CDG, cdg);
76 e6488635 Diego Biurrun
    REGISTER_MUXER    (CRC, crc);
77 51c3861e Peter Ross
    REGISTER_MUXDEMUX (DAUD, daud);
78 17ac9f1c Luca Barbato
    REGISTER_MUXDEMUX (DIRAC, dirac);
79 bd09e8a7 Baptiste Coudurier
    REGISTER_MUXDEMUX (DNXHD, dnxhd);
80 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (DSICIN, dsicin);
81 63d86443 Benjamin Larsson
    REGISTER_MUXDEMUX (DTS, dts);
82 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (DV, dv);
83
    REGISTER_DEMUXER  (DXA, dxa);
84
    REGISTER_DEMUXER  (EA, ea);
85 9abf2433 Aurelien Jacobs
    REGISTER_DEMUXER  (EA_CDATA, ea_cdata);
86 2988c93d Justin Ruggles
    REGISTER_MUXDEMUX (EAC3, eac3);
87 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (FFM, ffm);
88 fd5b124d Anton Khirnov
    REGISTER_MUXDEMUX (FFMETADATA, ffmetadata);
89 83ab7f18 Peter Ross
    REGISTER_MUXDEMUX (FILMSTRIP, filmstrip);
90 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (FLAC, flac);
91
    REGISTER_DEMUXER  (FLIC, flic);
92
    REGISTER_MUXDEMUX (FLV, flv);
93
    REGISTER_DEMUXER  (FOURXM, fourxm);
94
    REGISTER_MUXER    (FRAMECRC, framecrc);
95 0e765181 Reimar Döffinger
    REGISTER_MUXER    (FRAMEMD5, framemd5);
96 9013560f Martin Storsjö
    REGISTER_MUXDEMUX (G722, g722);
97 0b54f3c0 Michael Niedermayer
    REGISTER_MUXER    (GIF, gif);
98 60711e95 Michael Niedermayer
    REGISTER_DEMUXER  (GSM, gsm);
99 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (GXF, gxf);
100
    REGISTER_MUXDEMUX (H261, h261);
101
    REGISTER_MUXDEMUX (H263, h263);
102
    REGISTER_MUXDEMUX (H264, h264);
103
    REGISTER_DEMUXER  (IDCIN, idcin);
104 3a027f5e Jai Menon
    REGISTER_DEMUXER  (IFF, iff);
105 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (IMAGE2, image2);
106
    REGISTER_MUXDEMUX (IMAGE2PIPE, image2pipe);
107
    REGISTER_DEMUXER  (INGENIENT, ingenient);
108
    REGISTER_DEMUXER  (IPMOVIE, ipmovie);
109 aa9f4208 Baptiste Coudurier
    REGISTER_MUXER    (IPOD, ipod);
110 055dc116 Stefan Gehrer
    REGISTER_DEMUXER  (ISS, iss);
111 00b6fa40 Michael Niedermayer
    REGISTER_DEMUXER  (IV8, iv8);
112 54bc6403 Reimar Döffinger
    REGISTER_MUXDEMUX (IVF, ivf);
113 670c7847 Ivo van Poorten
    REGISTER_DEMUXER  (LMLM4, lmlm4);
114 8878e3b2 Tomas Härdin
    REGISTER_DEMUXER  (LXF, lxf);
115 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (M4V, m4v);
116 944a1b6b Reimar Döffinger
    REGISTER_MUXER    (MD5, md5);
117 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (MATROSKA, matroska);
118
    REGISTER_MUXER    (MATROSKA_AUDIO, matroska_audio);
119
    REGISTER_MUXDEMUX (MJPEG, mjpeg);
120 9145021d Ramiro Polla
    REGISTER_MUXDEMUX (MLP, mlp);
121 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (MM, mm);
122
    REGISTER_MUXDEMUX (MMF, mmf);
123
    REGISTER_MUXDEMUX (MOV, mov);
124
    REGISTER_MUXER    (MP2, mp2);
125
    REGISTER_MUXDEMUX (MP3, mp3);
126
    REGISTER_MUXER    (MP4, mp4);
127
    REGISTER_DEMUXER  (MPC, mpc);
128 12877faf Kostya Shishkov
    REGISTER_DEMUXER  (MPC8, mpc8);
129 e6488635 Diego Biurrun
    REGISTER_MUXER    (MPEG1SYSTEM, mpeg1system);
130
    REGISTER_MUXER    (MPEG1VCD, mpeg1vcd);
131
    REGISTER_MUXER    (MPEG1VIDEO, mpeg1video);
132
    REGISTER_MUXER    (MPEG2DVD, mpeg2dvd);
133
    REGISTER_MUXER    (MPEG2SVCD, mpeg2svcd);
134
    REGISTER_MUXER    (MPEG2VIDEO, mpeg2video);
135
    REGISTER_MUXER    (MPEG2VOB, mpeg2vob);
136
    REGISTER_DEMUXER  (MPEGPS, mpegps);
137
    REGISTER_MUXDEMUX (MPEGTS, mpegts);
138
    REGISTER_DEMUXER  (MPEGTSRAW, mpegtsraw);
139
    REGISTER_DEMUXER  (MPEGVIDEO, mpegvideo);
140
    REGISTER_MUXER    (MPJPEG, mpjpeg);
141 0f3444e1 Ramiro Polla
    REGISTER_DEMUXER  (MSNWC_TCP, msnwc_tcp);
142 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (MTV, mtv);
143 5b8cc860 Gregory Montoir
    REGISTER_DEMUXER  (MVI, mvi);
144 cedebde1 Carl Eugen Hoyos
    REGISTER_MUXDEMUX (MXF, mxf);
145 bd3f81f3 Baptiste Coudurier
    REGISTER_MUXER    (MXF_D10, mxf_d10);
146 9d09ebf1 Anatoly Nenashev
    REGISTER_DEMUXER  (MXG, mxg);
147 eaf5d011 Nicolas Martin
    REGISTER_DEMUXER  (NC, nc);
148 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (NSV, nsv);
149
    REGISTER_MUXER    (NULL, null);
150
    REGISTER_MUXDEMUX (NUT, nut);
151
    REGISTER_DEMUXER  (NUV, nuv);
152 5118cae6 Baptiste Coudurier
    REGISTER_MUXDEMUX (OGG, ogg);
153 b339f0c6 Benjamin Larsson
    REGISTER_DEMUXER  (OMA, oma);
154 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (PCM_ALAW,  pcm_alaw);
155
    REGISTER_MUXDEMUX (PCM_MULAW, pcm_mulaw);
156 ee7948cb Peter Ross
    REGISTER_MUXDEMUX (PCM_F64BE, pcm_f64be);
157
    REGISTER_MUXDEMUX (PCM_F64LE, pcm_f64le);
158
    REGISTER_MUXDEMUX (PCM_F32BE, pcm_f32be);
159
    REGISTER_MUXDEMUX (PCM_F32LE, pcm_f32le);
160
    REGISTER_MUXDEMUX (PCM_S32BE, pcm_s32be);
161
    REGISTER_MUXDEMUX (PCM_S32LE, pcm_s32le);
162
    REGISTER_MUXDEMUX (PCM_S24BE, pcm_s24be);
163
    REGISTER_MUXDEMUX (PCM_S24LE, pcm_s24le);
164 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (PCM_S16BE, pcm_s16be);
165
    REGISTER_MUXDEMUX (PCM_S16LE, pcm_s16le);
166
    REGISTER_MUXDEMUX (PCM_S8,    pcm_s8);
167 ee7948cb Peter Ross
    REGISTER_MUXDEMUX (PCM_U32BE, pcm_u32be);
168
    REGISTER_MUXDEMUX (PCM_U32LE, pcm_u32le);
169
    REGISTER_MUXDEMUX (PCM_U24BE, pcm_u24be);
170
    REGISTER_MUXDEMUX (PCM_U24LE, pcm_u24le);
171 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (PCM_U16BE, pcm_u16be);
172
    REGISTER_MUXDEMUX (PCM_U16LE, pcm_u16le);
173
    REGISTER_MUXDEMUX (PCM_U8,    pcm_u8);
174
    REGISTER_MUXER    (PSP, psp);
175 3feb44a9 Ivo van Poorten
    REGISTER_DEMUXER  (PVA, pva);
176 cdce0fb8 Kenan Gillet
    REGISTER_DEMUXER  (QCP, qcp);
177 7eb68edb Baptiste Coudurier
    REGISTER_DEMUXER  (R3D, r3d);
178 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (RAWVIDEO, rawvideo);
179 cb96da49 Sascha Sommer
    REGISTER_DEMUXER  (RL2, rl2);
180 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (RM, rm);
181
    REGISTER_MUXDEMUX (ROQ, roq);
182 4fd51ee3 Eli Friedman
    REGISTER_DEMUXER  (RPL, rpl);
183 e8723e24 Rafaël Carré
    REGISTER_MUXDEMUX (RSO, rso);
184 44594cc7 Martin Storsjö
    REGISTER_MUXDEMUX (RTP, rtp);
185 6f5a3d0a Martin Storsjö
    REGISTER_MUXDEMUX (RTSP, rtsp);
186 01c8d258 Martin Storsjö
    REGISTER_MUXDEMUX (SAP, sap);
187 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (SDP, sdp);
188 44b70ce5 Martin Storsjö
#if CONFIG_RTPDEC
189 4934884a Ryan Martell
    av_register_rtp_dynamic_payload_handlers();
190 ff13ba92 Ronald S. Bultje
    av_register_rdt_dynamic_payload_handlers();
191 ff70e601 Måns Rullgård
#endif
192 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (SEGAFILM, segafilm);
193
    REGISTER_DEMUXER  (SHORTEN, shorten);
194 66f7679c Kostya Shishkov
    REGISTER_DEMUXER  (SIFF, siff);
195 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (SMACKER, smacker);
196
    REGISTER_DEMUXER  (SOL, sol);
197 cbfe5bee Daniel Verkamp
    REGISTER_MUXDEMUX (SOX, sox);
198 3b39e273 Anssi Hannula
    REGISTER_MUXDEMUX (SPDIF, spdif);
199 ba2c508d Aurelien Jacobs
    REGISTER_MUXDEMUX (SRT, srt);
200 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (STR, str);
201
    REGISTER_MUXDEMUX (SWF, swf);
202
    REGISTER_MUXER    (TG2, tg2);
203
    REGISTER_MUXER    (TGP, tgp);
204
    REGISTER_DEMUXER  (THP, thp);
205
    REGISTER_DEMUXER  (TIERTEXSEQ, tiertexseq);
206 7c7d3e09 Daniel Verkamp
    REGISTER_DEMUXER  (TMV, tmv);
207 23d9cc45 Ramiro Polla
    REGISTER_MUXDEMUX (TRUEHD, truehd);
208 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (TTA, tta);
209
    REGISTER_DEMUXER  (TXD, txd);
210 5a717094 Peter Ross
    REGISTER_DEMUXER  (TTY, tty);
211 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (VC1, vc1);
212 327ce5e6 Kostya Shishkov
    REGISTER_MUXDEMUX (VC1T, vc1t);
213 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (VMD, vmd);
214
    REGISTER_MUXDEMUX (VOC, voc);
215 616e899c Vitor Sessak
    REGISTER_DEMUXER  (VQF, vqf);
216 740e89cf Daniel Verkamp
    REGISTER_DEMUXER  (W64, w64);
217 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (WAV, wav);
218
    REGISTER_DEMUXER  (WC3, wc3);
219 316d6c15 James Zern
    REGISTER_MUXER    (WEBM, webm);
220 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (WSAUD, wsaud);
221
    REGISTER_DEMUXER  (WSVQA, wsvqa);
222 82ca054a Peter Ross
    REGISTER_DEMUXER  (WTV, wtv);
223 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (WV, wv);
224 861c63a2 Robert Marston
    REGISTER_DEMUXER  (XA, xa);
225 148bcae9 Mohamed Naufal
    REGISTER_DEMUXER  (YOP, yop);
226 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (YUV4MPEGPIPE, yuv4mpegpipe);
227 f02be79d Roman Shaposhnik
228 a319c212 Diego Biurrun
    /* external libraries */
229
    REGISTER_MUXDEMUX (LIBNUT, libnut);
230
231 32583309 Diego Biurrun
    /* protocols */
232 88ad2faf Stefano Sabatini
    REGISTER_PROTOCOL (CONCAT, concat);
233 e6488635 Diego Biurrun
    REGISTER_PROTOCOL (FILE, file);
234 865780ae Toshimitsu Kimura
    REGISTER_PROTOCOL (GOPHER, gopher);
235 e6488635 Diego Biurrun
    REGISTER_PROTOCOL (HTTP, http);
236 f5ea69b2 Ronald S. Bultje
    REGISTER_PROTOCOL (MMSH, mmsh);
237 a2403986 Zhentan Feng
    REGISTER_PROTOCOL (MMST, mmst);
238 a1db009e Måns Rullgård
    REGISTER_PROTOCOL (MD5,  md5);
239 e6488635 Diego Biurrun
    REGISTER_PROTOCOL (PIPE, pipe);
240 9fd6b843 Kostya Shishkov
    REGISTER_PROTOCOL (RTMP, rtmp);
241 0f943ce6 Howard Chu
#if CONFIG_LIBRTMP
242
    REGISTER_PROTOCOL (RTMP, rtmpt);
243
    REGISTER_PROTOCOL (RTMP, rtmpe);
244
    REGISTER_PROTOCOL (RTMP, rtmpte);
245
    REGISTER_PROTOCOL (RTMP, rtmps);
246
#endif
247 e6488635 Diego Biurrun
    REGISTER_PROTOCOL (RTP, rtp);
248
    REGISTER_PROTOCOL (TCP, tcp);
249
    REGISTER_PROTOCOL (UDP, udp);
250 4624540b Fabrice Bellard
}