Statistics
| Branch: | Revision:

ffmpeg / libavformat / allformats.c @ 8a9572c2

History | View | Annotate | Download (7.42 KB)

1
/*
2
 * Register all the formats and protocols
3
 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4
 *
5
 * This file is part of FFmpeg.
6
 *
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.
11
 *
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.
16
 *
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
20
 */
21
#include "avformat.h"
22
#include "rtp_internal.h"
23
#include "rdt.h"
24

    
25
#define REGISTER_MUXER(X,x) { \
26
    extern AVOutputFormat x##_muxer; \
27
    if(ENABLE_##X##_MUXER) av_register_output_format(&x##_muxer); }
28

    
29
#define REGISTER_DEMUXER(X,x) { \
30
    extern AVInputFormat x##_demuxer; \
31
    if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
32

    
33
#define REGISTER_MUXDEMUX(X,x)  REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
34

    
35
#define REGISTER_PROTOCOL(X,x) { \
36
    extern URLProtocol x##_protocol; \
37
    if(ENABLE_##X##_PROTOCOL) register_protocol(&x##_protocol); }
38

    
39
/* If you do not call this function, then you can select exactly which
40
   formats you want to support */
41

    
42
/**
43
 * Initialize libavformat and register all the (de)muxers and protocols.
44
 */
45
void av_register_all(void)
46
{
47
    static int initialized;
48

    
49
    if (initialized)
50
        return;
51
    initialized = 1;
52

    
53
    avcodec_init();
54
    avcodec_register_all();
55

    
56
    /* (de)muxers */
57
    REGISTER_DEMUXER  (AAC, aac);
58
    REGISTER_MUXDEMUX (AC3, ac3);
59
    REGISTER_MUXER    (ADTS, adts);
60
    REGISTER_MUXDEMUX (AIFF, aiff);
61
    REGISTER_MUXDEMUX (AMR, amr);
62
    REGISTER_DEMUXER  (APC, apc);
63
    REGISTER_DEMUXER  (APE, ape);
64
    REGISTER_MUXDEMUX (ASF, asf);
65
    REGISTER_MUXDEMUX (ASS, ass);
66
    REGISTER_MUXER    (ASF_STREAM, asf_stream);
67
    REGISTER_MUXDEMUX (AU, au);
68
    REGISTER_MUXDEMUX (AVI, avi);
69
    REGISTER_DEMUXER  (AVISYNTH, avisynth);
70
    REGISTER_MUXER    (AVM2, avm2);
71
    REGISTER_DEMUXER  (AVS, avs);
72
    REGISTER_DEMUXER  (BETHSOFTVID, bethsoftvid);
73
    REGISTER_DEMUXER  (BFI, bfi);
74
    REGISTER_DEMUXER  (C93, c93);
75
    REGISTER_MUXER    (CRC, crc);
76
    REGISTER_MUXDEMUX (DAUD, daud);
77
    REGISTER_MUXDEMUX (DIRAC, dirac);
78
    REGISTER_MUXDEMUX (DNXHD, dnxhd);
79
    REGISTER_DEMUXER  (DSICIN, dsicin);
80
    REGISTER_MUXDEMUX (DTS, dts);
81
    REGISTER_MUXDEMUX (DV, dv);
82
    REGISTER_DEMUXER  (DXA, dxa);
83
    REGISTER_DEMUXER  (EA, ea);
84
    REGISTER_DEMUXER  (EA_CDATA, ea_cdata);
85
    REGISTER_MUXDEMUX (EAC3, eac3);
86
    REGISTER_MUXDEMUX (FFM, ffm);
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);
92
    REGISTER_MUXER    (GIF, gif);
93
    REGISTER_DEMUXER  (GSM, gsm);
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);
99
    REGISTER_DEMUXER  (IFF, iff);
100
    REGISTER_MUXDEMUX (IMAGE2, image2);
101
    REGISTER_MUXDEMUX (IMAGE2PIPE, image2pipe);
102
    REGISTER_DEMUXER  (INGENIENT, ingenient);
103
    REGISTER_DEMUXER  (IPMOVIE, ipmovie);
104
    REGISTER_MUXER    (IPOD, ipod);
105
    REGISTER_DEMUXER  (LMLM4, lmlm4);
106
    REGISTER_MUXDEMUX (M4V, m4v);
107
    REGISTER_MUXDEMUX (MATROSKA, matroska);
108
    REGISTER_MUXER    (MATROSKA_AUDIO, matroska_audio);
109
    REGISTER_MUXDEMUX (MJPEG, mjpeg);
110
    REGISTER_DEMUXER  (MLP, mlp);
111
    REGISTER_DEMUXER  (MM, mm);
112
    REGISTER_MUXDEMUX (MMF, mmf);
113
    REGISTER_MUXDEMUX (MOV, mov);
114
    REGISTER_MUXER    (MP2, mp2);
115
    REGISTER_MUXDEMUX (MP3, mp3);
116
    REGISTER_MUXER    (MP4, mp4);
117
    REGISTER_DEMUXER  (MPC, mpc);
118
    REGISTER_DEMUXER  (MPC8, mpc8);
119
    REGISTER_MUXER    (MPEG1SYSTEM, mpeg1system);
120
    REGISTER_MUXER    (MPEG1VCD, mpeg1vcd);
121
    REGISTER_MUXER    (MPEG1VIDEO, mpeg1video);
122
    REGISTER_MUXER    (MPEG2DVD, mpeg2dvd);
123
    REGISTER_MUXER    (MPEG2SVCD, mpeg2svcd);
124
    REGISTER_MUXER    (MPEG2VIDEO, mpeg2video);
125
    REGISTER_MUXER    (MPEG2VOB, mpeg2vob);
126
    REGISTER_DEMUXER  (MPEGPS, mpegps);
127
    REGISTER_MUXDEMUX (MPEGTS, mpegts);
128
    REGISTER_DEMUXER  (MPEGTSRAW, mpegtsraw);
129
    REGISTER_DEMUXER  (MPEGVIDEO, mpegvideo);
130
    REGISTER_MUXER    (MPJPEG, mpjpeg);
131
    REGISTER_DEMUXER  (MSNWC_TCP, msnwc_tcp);
132
    REGISTER_DEMUXER  (MTV, mtv);
133
    REGISTER_DEMUXER  (MVI, mvi);
134
    REGISTER_MUXDEMUX (MXF, mxf);
135
    REGISTER_DEMUXER  (NSV, nsv);
136
    REGISTER_MUXER    (NULL, null);
137
    REGISTER_MUXDEMUX (NUT, nut);
138
    REGISTER_DEMUXER  (NUV, nuv);
139
    REGISTER_MUXDEMUX (OGG, ogg);
140
    REGISTER_DEMUXER  (OMA, oma);
141
    REGISTER_MUXDEMUX (PCM_ALAW,  pcm_alaw);
142
    REGISTER_MUXDEMUX (PCM_MULAW, pcm_mulaw);
143
    REGISTER_MUXDEMUX (PCM_F64BE, pcm_f64be);
144
    REGISTER_MUXDEMUX (PCM_F64LE, pcm_f64le);
145
    REGISTER_MUXDEMUX (PCM_F32BE, pcm_f32be);
146
    REGISTER_MUXDEMUX (PCM_F32LE, pcm_f32le);
147
    REGISTER_MUXDEMUX (PCM_S32BE, pcm_s32be);
148
    REGISTER_MUXDEMUX (PCM_S32LE, pcm_s32le);
149
    REGISTER_MUXDEMUX (PCM_S24BE, pcm_s24be);
150
    REGISTER_MUXDEMUX (PCM_S24LE, pcm_s24le);
151
    REGISTER_MUXDEMUX (PCM_S16BE, pcm_s16be);
152
    REGISTER_MUXDEMUX (PCM_S16LE, pcm_s16le);
153
    REGISTER_MUXDEMUX (PCM_S8,    pcm_s8);
154
    REGISTER_MUXDEMUX (PCM_U32BE, pcm_u32be);
155
    REGISTER_MUXDEMUX (PCM_U32LE, pcm_u32le);
156
    REGISTER_MUXDEMUX (PCM_U24BE, pcm_u24be);
157
    REGISTER_MUXDEMUX (PCM_U24LE, pcm_u24le);
158
    REGISTER_MUXDEMUX (PCM_U16BE, pcm_u16be);
159
    REGISTER_MUXDEMUX (PCM_U16LE, pcm_u16le);
160
    REGISTER_MUXDEMUX (PCM_U8,    pcm_u8);
161
    REGISTER_MUXER    (PSP, psp);
162
    REGISTER_DEMUXER  (PVA, pva);
163
    REGISTER_MUXDEMUX (RAWVIDEO, rawvideo);
164
    REGISTER_DEMUXER  (REDIR, redir);
165
    REGISTER_DEMUXER  (RL2, rl2);
166
    REGISTER_MUXDEMUX (RM, rm);
167
    REGISTER_MUXDEMUX (ROQ, roq);
168
    REGISTER_DEMUXER  (RPL, rpl);
169
    REGISTER_MUXER    (RTP, rtp);
170
    REGISTER_DEMUXER  (RTSP, rtsp);
171
    REGISTER_DEMUXER  (SDP, sdp);
172
#ifdef CONFIG_SDP_DEMUXER
173
    av_register_rtp_dynamic_payload_handlers();
174
    av_register_rdt_dynamic_payload_handlers();
175
#endif
176
    REGISTER_DEMUXER  (SEGAFILM, segafilm);
177
    REGISTER_DEMUXER  (SHORTEN, shorten);
178
    REGISTER_DEMUXER  (SIFF, siff);
179
    REGISTER_DEMUXER  (SMACKER, smacker);
180
    REGISTER_DEMUXER  (SOL, sol);
181
    REGISTER_DEMUXER  (STR, str);
182
    REGISTER_MUXDEMUX (SWF, swf);
183
    REGISTER_MUXER    (TG2, tg2);
184
    REGISTER_MUXER    (TGP, tgp);
185
    REGISTER_DEMUXER  (THP, thp);
186
    REGISTER_DEMUXER  (TIERTEXSEQ, tiertexseq);
187
    REGISTER_DEMUXER  (TTA, tta);
188
    REGISTER_DEMUXER  (TXD, txd);
189
    REGISTER_DEMUXER  (VC1, vc1);
190
    REGISTER_MUXDEMUX (VC1T, vc1t);
191
    REGISTER_DEMUXER  (VMD, vmd);
192
    REGISTER_MUXDEMUX (VOC, voc);
193
    REGISTER_MUXDEMUX (WAV, wav);
194
    REGISTER_DEMUXER  (WC3, wc3);
195
    REGISTER_DEMUXER  (WSAUD, wsaud);
196
    REGISTER_DEMUXER  (WSVQA, wsvqa);
197
    REGISTER_DEMUXER  (WV, wv);
198
    REGISTER_DEMUXER  (XA, xa);
199
    REGISTER_MUXDEMUX (YUV4MPEGPIPE, yuv4mpegpipe);
200

    
201
    /* external libraries */
202
    REGISTER_MUXDEMUX (LIBNUT, libnut);
203

    
204
    /* protocols */
205
    REGISTER_PROTOCOL (FILE, file);
206
    REGISTER_PROTOCOL (HTTP, http);
207
    REGISTER_PROTOCOL (PIPE, pipe);
208
    REGISTER_PROTOCOL (RTP, rtp);
209
    REGISTER_PROTOCOL (TCP, tcp);
210
    REGISTER_PROTOCOL (UDP, udp);
211
}