Add support for files that begin with a dash.
[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
FB
23
24/* If you do not call this function, then you can select exactly which
25 formats you want to support */
26
27/**
28 * Initialize libavcodec and register all the codecs and formats.
29 */
30void av_register_all(void)
31{
caaeefc5 32 static int inited = 0;
115329f1 33
caaeefc5
MN
34 if (inited != 0)
35 return;
36 inited = 1;
37
4624540b
FB
38 avcodec_init();
39 avcodec_register_all();
40
ff70e601
MR
41#ifdef CONFIG_FOURXM_DEMUXER
42 av_register_input_format(&fourxm_demuxer);
bc634f6f 43#endif
ff70e601
MR
44#ifdef CONFIG_ADTS_MUXER
45 av_register_output_format(&adts_muxer);
81e0d0b4 46#endif
ff70e601
MR
47#ifdef CONFIG_AIFF_DEMUXER
48 av_register_input_format(&aiff_demuxer);
0a7b514f 49#endif
ff70e601
MR
50#ifdef CONFIG_AIFF_MUXER
51 av_register_output_format(&aiff_muxer);
52#endif
53#ifdef CONFIG_AMR_DEMUXER
54 av_register_input_format(&amr_demuxer);
55#endif
56#ifdef CONFIG_AMR_MUXER
57 av_register_output_format(&amr_muxer);
58#endif
59#ifdef CONFIG_ASF_DEMUXER
60 av_register_input_format(&asf_demuxer);
61#endif
62#ifdef CONFIG_ASF_MUXER
63 av_register_output_format(&asf_muxer);
64#endif
65#ifdef CONFIG_ASF_STREAM_MUXER
66 av_register_output_format(&asf_stream_muxer);
67#endif
68#ifdef CONFIG_AU_DEMUXER
69 av_register_input_format(&au_demuxer);
70#endif
71#ifdef CONFIG_AU_MUXER
72 av_register_output_format(&au_muxer);
4624540b 73#endif
dfdfa47c 74#if defined(CONFIG_AUDIO_OSS) || defined(CONFIG_AUDIO_BEOS)
ff70e601
MR
75#ifdef CONFIG_AUDIO_DEMUXER
76 av_register_input_format(&audio_demuxer);
4624540b 77#endif
ff70e601
MR
78#ifdef CONFIG_AUDIO_MUXER
79 av_register_output_format(&audio_muxer);
80#endif
81#endif /* CONFIG_AUDIO_OSS || CONFIG_AUDIO_BEOS */
82#ifdef CONFIG_AVI_DEMUXER
83 av_register_input_format(&avi_demuxer);
84#endif
85#ifdef CONFIG_AVI_MUXER
86 av_register_output_format(&avi_muxer);
87#endif
8ac17293
SH
88#ifdef CONFIG_AVISYNTH
89 av_register_input_format(&avisynth_demuxer);
90#endif
ff70e601
MR
91#ifdef CONFIG_AVS_DEMUXER
92 av_register_input_format(&avs_demuxer);
93#endif
94#ifdef CONFIG_CRC_MUXER
95 av_register_output_format(&crc_muxer);
96#endif
97#ifdef CONFIG_FRAMECRC_MUXER
98 av_register_output_format(&framecrc_muxer);
99#endif
100#ifdef CONFIG_DAUD_DEMUXER
101 av_register_input_format(&daud_demuxer);
8aa3ee32 102#endif
f02be79d 103#ifdef CONFIG_DC1394
ff70e601
MR
104#ifdef CONFIG_DC1394_DEMUXER
105 av_register_input_format(&dc1394_demuxer);
106#endif
107#endif /* CONFIG_DC1394 */
72450e50
BC
108#ifdef CONFIG_DSICIN_DEMUXER
109 av_register_input_format(&dsicin_demuxer);
110#endif
ff70e601
MR
111#ifdef CONFIG_DV1394
112#ifdef CONFIG_DV1394_DEMUXER
113 av_register_input_format(&dv1394_demuxer);
114#endif
115#endif /* CONFIG_DV1394 */
116#ifdef CONFIG_DV_DEMUXER
117 av_register_input_format(&dv_demuxer);
118#endif
119#ifdef CONFIG_DV_MUXER
120 av_register_output_format(&dv_muxer);
121#endif
122#ifdef CONFIG_EA_DEMUXER
123 av_register_input_format(&ea_demuxer);
124#endif
125#ifdef CONFIG_FFM_DEMUXER
126 av_register_input_format(&ffm_demuxer);
127#endif
128#ifdef CONFIG_FFM_MUXER
129 av_register_output_format(&ffm_muxer);
130#endif
131#ifdef CONFIG_FLIC_DEMUXER
132 av_register_input_format(&flic_demuxer);
133#endif
134#ifdef CONFIG_FLV_DEMUXER
135 av_register_input_format(&flv_demuxer);
136#endif
137#ifdef CONFIG_FLV_MUXER
138 av_register_output_format(&flv_muxer);
139#endif
140#ifdef CONFIG_GIF_MUXER
141 av_register_output_format(&gif_muxer);
142#endif
143#ifdef CONFIG_GIF_DEMUXER
144 av_register_input_format(&gif_demuxer);
145#endif
146#ifdef CONFIG_GXF_DEMUXER
147 av_register_input_format(&gxf_demuxer);
148#endif
86329cce
BC
149#if defined(CONFIG_GXF_MUXER) && defined(CONFIG_GPL)
150 av_register_output_format(&gxf_muxer);
151#endif
ff70e601
MR
152#ifdef CONFIG_IDCIN_DEMUXER
153 av_register_input_format(&idcin_demuxer);
154#endif
155#ifdef CONFIG_ROQ_DEMUXER
156 av_register_input_format(&roq_demuxer);
157#endif
158#ifdef CONFIG_IMAGE2_DEMUXER
159 av_register_input_format(&image2_demuxer);
160#endif
161#ifdef CONFIG_IMAGE2PIPE_DEMUXER
162 av_register_input_format(&image2pipe_demuxer);
163#endif
164#ifdef CONFIG_IMAGE2_MUXER
165 av_register_output_format(&image2_muxer);
166#endif
167#ifdef CONFIG_IMAGE2PIPE_MUXER
168 av_register_output_format(&image2pipe_muxer);
169#endif
ff70e601
MR
170#ifdef CONFIG_IPMOVIE_DEMUXER
171 av_register_input_format(&ipmovie_demuxer);
172#endif
173#ifdef CONFIG_MATROSKA_DEMUXER
174 av_register_input_format(&matroska_demuxer);
175#endif
176#ifdef CONFIG_MM_DEMUXER
177 av_register_input_format(&mm_demuxer);
178#endif
179#ifdef CONFIG_MMF_DEMUXER
180 av_register_input_format(&mmf_demuxer);
181#endif
182#ifdef CONFIG_MMF_MUXER
183 av_register_output_format(&mmf_muxer);
184#endif
185#ifdef CONFIG_MOV_DEMUXER
186 av_register_input_format(&mov_demuxer);
187#endif
188#ifdef CONFIG_MOV_MUXER
189 av_register_output_format(&mov_muxer);
190#endif
28146a8c
RVP
191#ifdef CONFIG_MTV_DEMUXER
192 av_register_input_format(&mtv_demuxer);
193#endif
ff70e601
MR
194#ifdef CONFIG_TGP_MUXER
195 av_register_output_format(&tgp_muxer);
196#endif
197#ifdef CONFIG_MP4_MUXER
198 av_register_output_format(&mp4_muxer);
199#endif
200#ifdef CONFIG_PSP_MUXER
201 av_register_output_format(&psp_muxer);
202#endif
203#ifdef CONFIG_TG2_MUXER
204 av_register_output_format(&tg2_muxer);
205#endif
206#ifdef CONFIG_MP3_DEMUXER
207 av_register_input_format(&mp3_demuxer);
208#endif
209#ifdef CONFIG_MP2_MUXER
210 av_register_output_format(&mp2_muxer);
211#endif
212#ifdef CONFIG_MP3_MUXER
213 av_register_output_format(&mp3_muxer);
214#endif
215#ifdef CONFIG_MPEG1SYSTEM_MUXER
216 av_register_output_format(&mpeg1system_muxer);
217#endif
218#ifdef CONFIG_MPEG1VCD_MUXER
219 av_register_output_format(&mpeg1vcd_muxer);
220#endif
221#ifdef CONFIG_MPEG2VOB_MUXER
222 av_register_output_format(&mpeg2vob_muxer);
223#endif
224#ifdef CONFIG_MPEG2SVCD_MUXER
225 av_register_output_format(&mpeg2svcd_muxer);
226#endif
227#ifdef CONFIG_MPEG2DVD_MUXER
228 av_register_output_format(&mpeg2dvd_muxer);
229#endif
230#ifdef CONFIG_MPEGPS_DEMUXER
231 av_register_input_format(&mpegps_demuxer);
232#endif
233#ifdef CONFIG_MPEGTS_DEMUXER
234 av_register_input_format(&mpegts_demuxer);
235#endif
236#ifdef CONFIG_MPEGTS_MUXER
237 av_register_output_format(&mpegts_muxer);
238#endif
239#ifdef CONFIG_MPJPEG_MUXER
240 av_register_output_format(&mpjpeg_muxer);
241#endif
07bf2af8
BC
242#ifdef CONFIG_MXF_DEMUXER
243 av_register_input_format(&mxf_demuxer);
244#endif
ff70e601
MR
245#ifdef CONFIG_NSV_DEMUXER
246 av_register_input_format(&nsv_demuxer);
247#endif
248#ifdef CONFIG_NUT_DEMUXER
249 av_register_input_format(&nut_demuxer);
250#endif
251#ifdef CONFIG_NUT_MUXER
6dd2cdf4
OS
252#ifdef CONFIG_LIBNUT
253 av_register_output_format(&nut_muxer);
254#endif
ff70e601
MR
255#endif
256#ifdef CONFIG_NUV_DEMUXER
257 av_register_input_format(&nuv_demuxer);
258#endif
259#ifdef CONFIG_OGG_DEMUXER
260 av_register_input_format(&ogg_demuxer);
261#endif
262#ifdef CONFIG_LIBOGG
263#ifdef CONFIG_OGG_MUXER
264 av_register_output_format(&ogg_muxer);
265#endif
266#endif /* CONFIG_LIBOGG */
267#ifdef CONFIG_STR_DEMUXER
268 av_register_input_format(&str_demuxer);
269#endif
270#ifdef CONFIG_SHORTEN_DEMUXER
271 av_register_input_format(&shorten_demuxer);
272#endif
273#ifdef CONFIG_FLAC_DEMUXER
274 av_register_input_format(&flac_demuxer);
275#endif
276#ifdef CONFIG_FLAC_MUXER
277 av_register_output_format(&flac_muxer);
278#endif
279#ifdef CONFIG_AC3_DEMUXER
280 av_register_input_format(&ac3_demuxer);
281#endif
282#ifdef CONFIG_AC3_MUXER
283 av_register_output_format(&ac3_muxer);
284#endif
285#ifdef CONFIG_DTS_DEMUXER
286 av_register_input_format(&dts_demuxer);
287#endif
288#ifdef CONFIG_AAC_DEMUXER
289 av_register_input_format(&aac_demuxer);
290#endif
291#ifdef CONFIG_H261_DEMUXER
292 av_register_input_format(&h261_demuxer);
293#endif
294#ifdef CONFIG_H261_MUXER
295 av_register_output_format(&h261_muxer);
296#endif
297#ifdef CONFIG_H263_DEMUXER
298 av_register_input_format(&h263_demuxer);
299#endif
300#ifdef CONFIG_H263_MUXER
301 av_register_output_format(&h263_muxer);
302#endif
303#ifdef CONFIG_M4V_DEMUXER
304 av_register_input_format(&m4v_demuxer);
305#endif
306#ifdef CONFIG_M4V_MUXER
307 av_register_output_format(&m4v_muxer);
308#endif
309#ifdef CONFIG_H264_DEMUXER
310 av_register_input_format(&h264_demuxer);
311#endif
312#ifdef CONFIG_H264_MUXER
313 av_register_output_format(&h264_muxer);
314#endif
315#ifdef CONFIG_MPEGVIDEO_DEMUXER
316 av_register_input_format(&mpegvideo_demuxer);
317#endif
318#ifdef CONFIG_MPEG1VIDEO_MUXER
319 av_register_output_format(&mpeg1video_muxer);
320#endif
321#ifdef CONFIG_MPEG2VIDEO_MUXER
322 av_register_output_format(&mpeg2video_muxer);
323#endif
324#ifdef CONFIG_MJPEG_DEMUXER
325 av_register_input_format(&mjpeg_demuxer);
326#endif
327#ifdef CONFIG_INGENIENT_DEMUXER
328 av_register_input_format(&ingenient_demuxer);
329#endif
330#ifdef CONFIG_MJPEG_MUXER
331 av_register_output_format(&mjpeg_muxer);
332#endif
ebd7617b
MR
333#ifdef CONFIG_PCM_S16LE_DEMUXER
334 av_register_input_format(&pcm_s16le_demuxer);
335#endif
336#ifdef CONFIG_PCM_S16LE_MUXER
337 av_register_output_format(&pcm_s16le_muxer);
338#endif
339#ifdef CONFIG_PCM_S16BE_DEMUXER
340 av_register_input_format(&pcm_s16be_demuxer);
341#endif
342#ifdef CONFIG_PCM_S16BE_MUXER
343 av_register_output_format(&pcm_s16be_muxer);
344#endif
345#ifdef CONFIG_PCM_U16LE_DEMUXER
346 av_register_input_format(&pcm_u16le_demuxer);
347#endif
348#ifdef CONFIG_PCM_U16LE_MUXER
349 av_register_output_format(&pcm_u16le_muxer);
350#endif
351#ifdef CONFIG_PCM_U16BE_DEMUXER
352 av_register_input_format(&pcm_u16be_demuxer);
353#endif
354#ifdef CONFIG_PCM_U16BE_MUXER
355 av_register_output_format(&pcm_u16be_muxer);
356#endif
357#ifdef CONFIG_PCM_S8_DEMUXER
358 av_register_input_format(&pcm_s8_demuxer);
359#endif
360#ifdef CONFIG_PCM_S8_MUXER
361 av_register_output_format(&pcm_s8_muxer);
362#endif
363#ifdef CONFIG_PCM_U8_DEMUXER
364 av_register_input_format(&pcm_u8_demuxer);
365#endif
366#ifdef CONFIG_PCM_U8_MUXER
367 av_register_output_format(&pcm_u8_muxer);
368#endif
369#ifdef CONFIG_PCM_MULAW_DEMUXER
370 av_register_input_format(&pcm_mulaw_demuxer);
371#endif
372#ifdef CONFIG_PCM_MULAW_MUXER
373 av_register_output_format(&pcm_mulaw_muxer);
374#endif
375#ifdef CONFIG_PCM_ALAW_DEMUXER
376 av_register_input_format(&pcm_alaw_demuxer);
377#endif
378#ifdef CONFIG_PCM_ALAW_MUXER
379 av_register_output_format(&pcm_alaw_muxer);
380#endif
ff70e601
MR
381#ifdef CONFIG_RAWVIDEO_DEMUXER
382 av_register_input_format(&rawvideo_demuxer);
383#endif
384#ifdef CONFIG_RAWVIDEO_MUXER
385 av_register_output_format(&rawvideo_muxer);
386#endif
387#ifdef CONFIG_NULL_MUXER
388 av_register_output_format(&null_muxer);
389#endif
390#ifdef CONFIG_RM_DEMUXER
391 av_register_input_format(&rm_demuxer);
392#endif
393#ifdef CONFIG_RM_MUXER
394 av_register_output_format(&rm_muxer);
395#endif
396#ifdef CONFIG_NETWORK
397#ifdef CONFIG_RTP_MUXER
398 av_register_output_format(&rtp_muxer);
399#endif
400#ifdef CONFIG_RTSP_DEMUXER
401 av_register_input_format(&rtsp_demuxer);
402#endif
403#ifdef CONFIG_SDP_DEMUXER
404 av_register_input_format(&sdp_demuxer);
405#endif
406#ifdef CONFIG_REDIR_DEMUXER
407 av_register_input_format(&redir_demuxer);
408#endif
4934884a 409 av_register_rtp_dynamic_payload_handlers();
ff70e601
MR
410#endif /* CONFIG_NETWORK */
411#ifdef CONFIG_SEGAFILM_DEMUXER
412 av_register_input_format(&segafilm_demuxer);
413#endif
414#ifdef CONFIG_VMD_DEMUXER
415 av_register_input_format(&vmd_demuxer);
416#endif
417#ifdef CONFIG_SMACKER_DEMUXER
418 av_register_input_format(&smacker_demuxer);
419#endif
420#ifdef CONFIG_SOL_DEMUXER
421 av_register_input_format(&sol_demuxer);
422#endif
423#ifdef CONFIG_SWF_DEMUXER
424 av_register_input_format(&swf_demuxer);
425#endif
426#ifdef CONFIG_SWF_MUXER
427 av_register_output_format(&swf_muxer);
428#endif
429#ifdef CONFIG_TTA_DEMUXER
430 av_register_input_format(&tta_demuxer);
431#endif
432#ifdef CONFIG_VIDEO4LINUX2
433#ifdef CONFIG_V4L2_DEMUXER
434 av_register_input_format(&v4l2_demuxer);
435#endif
436#endif /* CONFIG_VIDEO4LINUX2 */
437#if defined(CONFIG_VIDEO4LINUX) || defined(CONFIG_BKTR)
438#ifdef CONFIG_VIDEO_GRAB_DEVICE_DEMUXER
439 av_register_input_format(&video_grab_device_demuxer);
440#endif
441#endif /* CONFIG_VIDEO4LINUX || CONFIG_BKTR */
442#ifdef CONFIG_VOC_DEMUXER
443 av_register_input_format(&voc_demuxer);
444#endif
445#ifdef CONFIG_VOC_MUXER
446 av_register_output_format(&voc_muxer);
447#endif
448#ifdef CONFIG_WAV_DEMUXER
449 av_register_input_format(&wav_demuxer);
450#endif
451#ifdef CONFIG_WAV_MUXER
452 av_register_output_format(&wav_muxer);
453#endif
454#ifdef CONFIG_WC3_DEMUXER
455 av_register_input_format(&wc3_demuxer);
456#endif
457#ifdef CONFIG_WSAUD_DEMUXER
458 av_register_input_format(&wsaud_demuxer);
459#endif
460#ifdef CONFIG_WSVQA_DEMUXER
461 av_register_input_format(&wsvqa_demuxer);
462#endif
730581f3
KS
463#ifdef CONFIG_WV_DEMUXER
464 av_register_input_format(&wv_demuxer);
465#endif
ff70e601
MR
466#ifdef CONFIG_YUV4MPEGPIPE_MUXER
467 av_register_output_format(&yuv4mpegpipe_muxer);
468#endif
469#ifdef CONFIG_YUV4MPEGPIPE_DEMUXER
470 av_register_input_format(&yuv4mpegpipe_demuxer);
f02be79d 471#endif
29f86228
BC
472#ifdef CONFIG_TIERTEXSEQ_DEMUXER
473 av_register_input_format(&tiertexseq_demuxer);
474#endif
f02be79d 475
04f46ced 476#ifdef CONFIG_PROTOCOLS
4624540b
FB
477 /* file protocols */
478 register_protocol(&file_protocol);
479 register_protocol(&pipe_protocol);
480#ifdef CONFIG_NETWORK
4624540b
FB
481 register_protocol(&udp_protocol);
482 register_protocol(&rtp_protocol);
483 register_protocol(&tcp_protocol);
484 register_protocol(&http_protocol);
485#endif
04f46ced 486#endif
4624540b 487}