Statistics
| Branch: | Revision:

ffmpeg / libavformat / allformats.c @ 5f8e0227

History | View | Annotate | Download (6.74 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 7241a6bb Aurelien Jacobs
#include "rtp_internal.h"
23 4624540b Fabrice Bellard
24 d999cff5 Aurelien Jacobs
#define REGISTER_MUXER(X,x) { \
25
          extern AVOutputFormat x##_muxer; \
26
          if(ENABLE_##X##_MUXER)   av_register_output_format(&x##_muxer); }
27
#define REGISTER_DEMUXER(X,x) { \
28
          extern AVInputFormat x##_demuxer; \
29
          if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
30 5b9b3b68 Aurelien Jacobs
#define REGISTER_MUXDEMUX(X,x)  REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
31 d999cff5 Aurelien Jacobs
#define REGISTER_PROTOCOL(X,x) { \
32
          extern URLProtocol x##_protocol; \
33
          if(ENABLE_##X##_PROTOCOL) register_protocol(&x##_protocol); }
34 5b9b3b68 Aurelien Jacobs
35 4624540b Fabrice Bellard
/* If you do not call this function, then you can select exactly which
36
   formats you want to support */
37
38
/**
39 fa1ab872 Diego Biurrun
 * Initialize libavformat and register all the (de)muxers and protocols.
40 4624540b Fabrice Bellard
 */
41
void av_register_all(void)
42
{
43 5e534865 Diego Biurrun
    static int initialized;
44 115329f1 Diego Biurrun
45 5e534865 Diego Biurrun
    if (initialized)
46 caaeefc5 Michael Niedermayer
        return;
47 5e534865 Diego Biurrun
    initialized = 1;
48 caaeefc5 Michael Niedermayer
49 4624540b Fabrice Bellard
    avcodec_init();
50
    avcodec_register_all();
51
52 32583309 Diego Biurrun
    /* (de)muxers */
53 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (AAC, aac);
54
    REGISTER_MUXDEMUX (AC3, ac3);
55
    REGISTER_MUXER    (ADTS, adts);
56
    REGISTER_MUXDEMUX (AIFF, aiff);
57
    REGISTER_MUXDEMUX (AMR, amr);
58
    REGISTER_DEMUXER  (APC, apc);
59 bf4a1f17 Kostya Shishkov
    REGISTER_DEMUXER  (APE, ape);
60 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (ASF, asf);
61
    REGISTER_MUXER    (ASF_STREAM, asf_stream);
62
    REGISTER_MUXDEMUX (AU, au);
63
    REGISTER_MUXDEMUX (AVI, avi);
64 53b73365 Ramiro Polla
    REGISTER_DEMUXER  (AVISYNTH, avisynth);
65 fa1ad97f Baptiste Coudurier
    REGISTER_MUXER    (AVM2, avm2);
66 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (AVS, avs);
67
    REGISTER_DEMUXER  (BETHSOFTVID, bethsoftvid);
68 b64c096b Sisir Koppaka
    REGISTER_DEMUXER  (BFI, bfi);
69 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (C93, c93);
70
    REGISTER_MUXER    (CRC, crc);
71 51c3861e Peter Ross
    REGISTER_MUXDEMUX (DAUD, daud);
72 17ac9f1c Luca Barbato
    REGISTER_MUXDEMUX (DIRAC, dirac);
73 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (DSICIN, dsicin);
74 63d86443 Benjamin Larsson
    REGISTER_MUXDEMUX (DTS, dts);
75 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (DV, dv);
76
    REGISTER_DEMUXER  (DXA, dxa);
77
    REGISTER_DEMUXER  (EA, ea);
78 9abf2433 Aurelien Jacobs
    REGISTER_DEMUXER  (EA_CDATA, ea_cdata);
79 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (FFM, ffm);
80
    REGISTER_MUXDEMUX (FLAC, flac);
81
    REGISTER_DEMUXER  (FLIC, flic);
82
    REGISTER_MUXDEMUX (FLV, flv);
83
    REGISTER_DEMUXER  (FOURXM, fourxm);
84
    REGISTER_MUXER    (FRAMECRC, framecrc);
85 0b54f3c0 Michael Niedermayer
    REGISTER_MUXER    (GIF, gif);
86 60711e95 Michael Niedermayer
    REGISTER_DEMUXER  (GSM, gsm);
87 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (GXF, gxf);
88
    REGISTER_MUXDEMUX (H261, h261);
89
    REGISTER_MUXDEMUX (H263, h263);
90
    REGISTER_MUXDEMUX (H264, h264);
91
    REGISTER_DEMUXER  (IDCIN, idcin);
92 3a027f5e Jai Menon
    REGISTER_DEMUXER  (IFF, iff);
93 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (IMAGE2, image2);
94
    REGISTER_MUXDEMUX (IMAGE2PIPE, image2pipe);
95
    REGISTER_DEMUXER  (INGENIENT, ingenient);
96
    REGISTER_DEMUXER  (IPMOVIE, ipmovie);
97 aa9f4208 Baptiste Coudurier
    REGISTER_MUXER    (IPOD, ipod);
98 670c7847 Ivo van Poorten
    REGISTER_DEMUXER  (LMLM4, lmlm4);
99 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (M4V, m4v);
100
    REGISTER_MUXDEMUX (MATROSKA, matroska);
101
    REGISTER_MUXER    (MATROSKA_AUDIO, matroska_audio);
102
    REGISTER_MUXDEMUX (MJPEG, mjpeg);
103 16e861e3 Ramiro Polla
    REGISTER_DEMUXER  (MLP, mlp);
104 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (MM, mm);
105
    REGISTER_MUXDEMUX (MMF, mmf);
106
    REGISTER_MUXDEMUX (MOV, mov);
107
    REGISTER_MUXER    (MP2, mp2);
108
    REGISTER_MUXDEMUX (MP3, mp3);
109
    REGISTER_MUXER    (MP4, mp4);
110
    REGISTER_DEMUXER  (MPC, mpc);
111 12877faf Kostya Shishkov
    REGISTER_DEMUXER  (MPC8, mpc8);
112 e6488635 Diego Biurrun
    REGISTER_MUXER    (MPEG1SYSTEM, mpeg1system);
113
    REGISTER_MUXER    (MPEG1VCD, mpeg1vcd);
114
    REGISTER_MUXER    (MPEG1VIDEO, mpeg1video);
115
    REGISTER_MUXER    (MPEG2DVD, mpeg2dvd);
116
    REGISTER_MUXER    (MPEG2SVCD, mpeg2svcd);
117
    REGISTER_MUXER    (MPEG2VIDEO, mpeg2video);
118
    REGISTER_MUXER    (MPEG2VOB, mpeg2vob);
119
    REGISTER_DEMUXER  (MPEGPS, mpegps);
120
    REGISTER_MUXDEMUX (MPEGTS, mpegts);
121
    REGISTER_DEMUXER  (MPEGTSRAW, mpegtsraw);
122
    REGISTER_DEMUXER  (MPEGVIDEO, mpegvideo);
123
    REGISTER_MUXER    (MPJPEG, mpjpeg);
124 0f3444e1 Ramiro Polla
    REGISTER_DEMUXER  (MSNWC_TCP, msnwc_tcp);
125 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (MTV, mtv);
126 5b8cc860 Gregory Montoir
    REGISTER_DEMUXER  (MVI, mvi);
127 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (MXF, mxf);
128
    REGISTER_DEMUXER  (NSV, nsv);
129
    REGISTER_MUXER    (NULL, null);
130
    REGISTER_MUXDEMUX (NUT, nut);
131
    REGISTER_DEMUXER  (NUV, nuv);
132 5118cae6 Baptiste Coudurier
    REGISTER_MUXDEMUX (OGG, ogg);
133 b339f0c6 Benjamin Larsson
    REGISTER_DEMUXER  (OMA, oma);
134 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (PCM_ALAW,  pcm_alaw);
135
    REGISTER_MUXDEMUX (PCM_MULAW, pcm_mulaw);
136
    REGISTER_MUXDEMUX (PCM_S16BE, pcm_s16be);
137
    REGISTER_MUXDEMUX (PCM_S16LE, pcm_s16le);
138
    REGISTER_MUXDEMUX (PCM_S8,    pcm_s8);
139
    REGISTER_MUXDEMUX (PCM_U16BE, pcm_u16be);
140
    REGISTER_MUXDEMUX (PCM_U16LE, pcm_u16le);
141
    REGISTER_MUXDEMUX (PCM_U8,    pcm_u8);
142
    REGISTER_MUXER    (PSP, psp);
143 3feb44a9 Ivo van Poorten
    REGISTER_DEMUXER  (PVA, pva);
144 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (RAWVIDEO, rawvideo);
145 c023bfe9 Diego Biurrun
    REGISTER_DEMUXER  (REDIR, redir);
146 cb96da49 Sascha Sommer
    REGISTER_DEMUXER  (RL2, rl2);
147 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (RM, rm);
148
    REGISTER_MUXDEMUX (ROQ, roq);
149 4fd51ee3 Eli Friedman
    REGISTER_DEMUXER  (RPL, rpl);
150 e6488635 Diego Biurrun
    REGISTER_MUXER    (RTP, rtp);
151
    REGISTER_DEMUXER  (RTSP, rtsp);
152
    REGISTER_DEMUXER  (SDP, sdp);
153 95c21842 Luca Abeni
#ifdef CONFIG_SDP_DEMUXER
154 4934884a Ryan Martell
    av_register_rtp_dynamic_payload_handlers();
155 ff70e601 Måns Rullgård
#endif
156 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (SEGAFILM, segafilm);
157
    REGISTER_DEMUXER  (SHORTEN, shorten);
158 66f7679c Kostya Shishkov
    REGISTER_DEMUXER  (SIFF, siff);
159 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (SMACKER, smacker);
160
    REGISTER_DEMUXER  (SOL, sol);
161
    REGISTER_DEMUXER  (STR, str);
162
    REGISTER_MUXDEMUX (SWF, swf);
163
    REGISTER_MUXER    (TG2, tg2);
164
    REGISTER_MUXER    (TGP, tgp);
165
    REGISTER_DEMUXER  (THP, thp);
166
    REGISTER_DEMUXER  (TIERTEXSEQ, tiertexseq);
167
    REGISTER_DEMUXER  (TTA, tta);
168
    REGISTER_DEMUXER  (TXD, txd);
169
    REGISTER_DEMUXER  (VC1, vc1);
170 327ce5e6 Kostya Shishkov
    REGISTER_MUXDEMUX (VC1T, vc1t);
171 e6488635 Diego Biurrun
    REGISTER_DEMUXER  (VMD, vmd);
172
    REGISTER_MUXDEMUX (VOC, voc);
173
    REGISTER_MUXDEMUX (WAV, wav);
174
    REGISTER_DEMUXER  (WC3, wc3);
175
    REGISTER_DEMUXER  (WSAUD, wsaud);
176
    REGISTER_DEMUXER  (WSVQA, wsvqa);
177
    REGISTER_DEMUXER  (WV, wv);
178 861c63a2 Robert Marston
    REGISTER_DEMUXER  (XA, xa);
179 e6488635 Diego Biurrun
    REGISTER_MUXDEMUX (YUV4MPEGPIPE, yuv4mpegpipe);
180 f02be79d Roman Shaposhnik
181 a319c212 Diego Biurrun
    /* external libraries */
182
    REGISTER_MUXDEMUX (LIBNUT, libnut);
183
184 32583309 Diego Biurrun
    /* protocols */
185 e6488635 Diego Biurrun
    REGISTER_PROTOCOL (FILE, file);
186
    REGISTER_PROTOCOL (HTTP, http);
187
    REGISTER_PROTOCOL (PIPE, pipe);
188
    REGISTER_PROTOCOL (RTP, rtp);
189
    REGISTER_PROTOCOL (TCP, tcp);
190
    REGISTER_PROTOCOL (UDP, udp);
191 4624540b Fabrice Bellard
}