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