add lost raw pcm input/output formats
[ffmpeg.git] / libavformat / allformats.c
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
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 #include "avformat.h"
20 #include "allformats.h"
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  */
28 void av_register_all(void)
29 {
30     static int inited = 0;
31
32     if (inited != 0)
33         return;
34     inited = 1;
35
36     avcodec_init();
37     avcodec_register_all();
38
39 #ifdef CONFIG_FOURXM_DEMUXER
40     av_register_input_format(&fourxm_demuxer);
41 #endif
42 #ifdef CONFIG_ADTS_MUXER
43     av_register_output_format(&adts_muxer);
44 #endif
45 #ifdef CONFIG_AIFF_DEMUXER
46     av_register_input_format(&aiff_demuxer);
47 #endif
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);
71 #endif
72 #if defined(CONFIG_AUDIO_OSS) || defined(CONFIG_AUDIO_BEOS)
73 #ifdef CONFIG_AUDIO_DEMUXER
74     av_register_input_format(&audio_demuxer);
75 #endif
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);
97 #endif
98 #ifdef CONFIG_DC1394
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
141 #ifdef CONFIG_IDCIN_DEMUXER
142     av_register_input_format(&idcin_demuxer);
143 #endif
144 #ifdef CONFIG_ROQ_DEMUXER
145     av_register_input_format(&roq_demuxer);
146 #endif
147 #ifdef CONFIG_IMAGE2_DEMUXER
148     av_register_input_format(&image2_demuxer);
149 #endif
150 #ifdef CONFIG_IMAGE2PIPE_DEMUXER
151     av_register_input_format(&image2pipe_demuxer);
152 #endif
153 #ifdef CONFIG_IMAGE2_MUXER
154     av_register_output_format(&image2_muxer);
155 #endif
156 #ifdef CONFIG_IMAGE2PIPE_MUXER
157     av_register_output_format(&image2pipe_muxer);
158 #endif
159 #ifdef CONFIG_IMAGE_DEMUXER
160     av_register_input_format(&image_demuxer);
161 #endif
162 #ifdef CONFIG_IMAGEPIPE_DEMUXER
163     av_register_input_format(&imagepipe_demuxer);
164 #endif
165 #ifdef CONFIG_IMAGE_MUXER
166     av_register_output_format(&image_muxer);
167 #endif
168 #ifdef CONFIG_IMAGEPIPE_MUXER
169     av_register_output_format(&imagepipe_muxer);
170 #endif
171 #ifdef CONFIG_IPMOVIE_DEMUXER
172     av_register_input_format(&ipmovie_demuxer);
173 #endif
174 #ifdef CONFIG_MATROSKA_DEMUXER
175     av_register_input_format(&matroska_demuxer);
176 #endif
177 #ifdef CONFIG_MM_DEMUXER
178     av_register_input_format(&mm_demuxer);
179 #endif
180 #ifdef CONFIG_MMF_DEMUXER
181     av_register_input_format(&mmf_demuxer);
182 #endif
183 #ifdef CONFIG_MMF_MUXER
184     av_register_output_format(&mmf_muxer);
185 #endif
186 #ifdef CONFIG_MOV_DEMUXER
187     av_register_input_format(&mov_demuxer);
188 #endif
189 #ifdef CONFIG_MOV_MUXER
190     av_register_output_format(&mov_muxer);
191 #endif
192 #ifdef CONFIG_TGP_MUXER
193     av_register_output_format(&tgp_muxer);
194 #endif
195 #ifdef CONFIG_MP4_MUXER
196     av_register_output_format(&mp4_muxer);
197 #endif
198 #ifdef CONFIG_PSP_MUXER
199     av_register_output_format(&psp_muxer);
200 #endif
201 #ifdef CONFIG_TG2_MUXER
202     av_register_output_format(&tg2_muxer);
203 #endif
204 #ifdef CONFIG_MP3_DEMUXER
205     av_register_input_format(&mp3_demuxer);
206 #endif
207 #ifdef CONFIG_MP2_MUXER
208     av_register_output_format(&mp2_muxer);
209 #endif
210 #ifdef CONFIG_MP3_MUXER
211     av_register_output_format(&mp3_muxer);
212 #endif
213 #ifdef CONFIG_MPEG1SYSTEM_MUXER
214     av_register_output_format(&mpeg1system_muxer);
215 #endif
216 #ifdef CONFIG_MPEG1VCD_MUXER
217     av_register_output_format(&mpeg1vcd_muxer);
218 #endif
219 #ifdef CONFIG_MPEG2VOB_MUXER
220     av_register_output_format(&mpeg2vob_muxer);
221 #endif
222 #ifdef CONFIG_MPEG2SVCD_MUXER
223     av_register_output_format(&mpeg2svcd_muxer);
224 #endif
225 #ifdef CONFIG_MPEG2DVD_MUXER
226     av_register_output_format(&mpeg2dvd_muxer);
227 #endif
228 #ifdef CONFIG_MPEGPS_DEMUXER
229     av_register_input_format(&mpegps_demuxer);
230 #endif
231 #ifdef CONFIG_MPEGTS_DEMUXER
232     av_register_input_format(&mpegts_demuxer);
233 #endif
234 #ifdef CONFIG_MPEGTS_MUXER
235     av_register_output_format(&mpegts_muxer);
236 #endif
237 #ifdef CONFIG_MPJPEG_MUXER
238     av_register_output_format(&mpjpeg_muxer);
239 #endif
240 #ifdef CONFIG_NSV_DEMUXER
241     av_register_input_format(&nsv_demuxer);
242 #endif
243 #ifdef CONFIG_NUT_DEMUXER
244     av_register_input_format(&nut_demuxer);
245 #endif
246 #ifdef CONFIG_NUT_MUXER
247     av_register_output_format(&nut_muxer);
248 #endif
249 #ifdef CONFIG_NUV_DEMUXER
250     av_register_input_format(&nuv_demuxer);
251 #endif
252 #ifdef CONFIG_OGG_DEMUXER
253     av_register_input_format(&ogg_demuxer);
254 #endif
255 #ifdef CONFIG_LIBOGG
256 #ifdef CONFIG_OGG_MUXER
257     av_register_output_format(&ogg_muxer);
258 #endif
259 #endif /* CONFIG_LIBOGG */
260 #ifdef CONFIG_STR_DEMUXER
261     av_register_input_format(&str_demuxer);
262 #endif
263 #ifdef CONFIG_SHORTEN_DEMUXER
264     av_register_input_format(&shorten_demuxer);
265 #endif
266 #ifdef CONFIG_FLAC_DEMUXER
267     av_register_input_format(&flac_demuxer);
268 #endif
269 #ifdef CONFIG_FLAC_MUXER
270     av_register_output_format(&flac_muxer);
271 #endif
272 #ifdef CONFIG_AC3_DEMUXER
273     av_register_input_format(&ac3_demuxer);
274 #endif
275 #ifdef CONFIG_AC3_MUXER
276     av_register_output_format(&ac3_muxer);
277 #endif
278 #ifdef CONFIG_DTS_DEMUXER
279     av_register_input_format(&dts_demuxer);
280 #endif
281 #ifdef CONFIG_AAC_DEMUXER
282     av_register_input_format(&aac_demuxer);
283 #endif
284 #ifdef CONFIG_H261_DEMUXER
285     av_register_input_format(&h261_demuxer);
286 #endif
287 #ifdef CONFIG_H261_MUXER
288     av_register_output_format(&h261_muxer);
289 #endif
290 #ifdef CONFIG_H263_DEMUXER
291     av_register_input_format(&h263_demuxer);
292 #endif
293 #ifdef CONFIG_H263_MUXER
294     av_register_output_format(&h263_muxer);
295 #endif
296 #ifdef CONFIG_M4V_DEMUXER
297     av_register_input_format(&m4v_demuxer);
298 #endif
299 #ifdef CONFIG_M4V_MUXER
300     av_register_output_format(&m4v_muxer);
301 #endif
302 #ifdef CONFIG_H264_DEMUXER
303     av_register_input_format(&h264_demuxer);
304 #endif
305 #ifdef CONFIG_H264_MUXER
306     av_register_output_format(&h264_muxer);
307 #endif
308 #ifdef CONFIG_MPEGVIDEO_DEMUXER
309     av_register_input_format(&mpegvideo_demuxer);
310 #endif
311 #ifdef CONFIG_MPEG1VIDEO_MUXER
312     av_register_output_format(&mpeg1video_muxer);
313 #endif
314 #ifdef CONFIG_MPEG2VIDEO_MUXER
315     av_register_output_format(&mpeg2video_muxer);
316 #endif
317 #ifdef CONFIG_MJPEG_DEMUXER
318     av_register_input_format(&mjpeg_demuxer);
319 #endif
320 #ifdef CONFIG_INGENIENT_DEMUXER
321     av_register_input_format(&ingenient_demuxer);
322 #endif
323 #ifdef CONFIG_MJPEG_MUXER
324     av_register_output_format(&mjpeg_muxer);
325 #endif
326 #ifdef CONFIG_PCM_S16LE_DEMUXER
327     av_register_input_format(&pcm_s16le_demuxer);
328 #endif
329 #ifdef CONFIG_PCM_S16LE_MUXER
330     av_register_output_format(&pcm_s16le_muxer);
331 #endif
332 #ifdef CONFIG_PCM_S16BE_DEMUXER
333     av_register_input_format(&pcm_s16be_demuxer);
334 #endif
335 #ifdef CONFIG_PCM_S16BE_MUXER
336     av_register_output_format(&pcm_s16be_muxer);
337 #endif
338 #ifdef CONFIG_PCM_U16LE_DEMUXER
339     av_register_input_format(&pcm_u16le_demuxer);
340 #endif
341 #ifdef CONFIG_PCM_U16LE_MUXER
342     av_register_output_format(&pcm_u16le_muxer);
343 #endif
344 #ifdef CONFIG_PCM_U16BE_DEMUXER
345     av_register_input_format(&pcm_u16be_demuxer);
346 #endif
347 #ifdef CONFIG_PCM_U16BE_MUXER
348     av_register_output_format(&pcm_u16be_muxer);
349 #endif
350 #ifdef CONFIG_PCM_S8_DEMUXER
351     av_register_input_format(&pcm_s8_demuxer);
352 #endif
353 #ifdef CONFIG_PCM_S8_MUXER
354     av_register_output_format(&pcm_s8_muxer);
355 #endif
356 #ifdef CONFIG_PCM_U8_DEMUXER
357     av_register_input_format(&pcm_u8_demuxer);
358 #endif
359 #ifdef CONFIG_PCM_U8_MUXER
360     av_register_output_format(&pcm_u8_muxer);
361 #endif
362 #ifdef CONFIG_PCM_MULAW_DEMUXER
363     av_register_input_format(&pcm_mulaw_demuxer);
364 #endif
365 #ifdef CONFIG_PCM_MULAW_MUXER
366     av_register_output_format(&pcm_mulaw_muxer);
367 #endif
368 #ifdef CONFIG_PCM_ALAW_DEMUXER
369     av_register_input_format(&pcm_alaw_demuxer);
370 #endif
371 #ifdef CONFIG_PCM_ALAW_MUXER
372     av_register_output_format(&pcm_alaw_muxer);
373 #endif
374 #ifdef CONFIG_RAWVIDEO_DEMUXER
375     av_register_input_format(&rawvideo_demuxer);
376 #endif
377 #ifdef CONFIG_RAWVIDEO_MUXER
378     av_register_output_format(&rawvideo_muxer);
379 #endif
380 #ifdef CONFIG_NULL_MUXER
381     av_register_output_format(&null_muxer);
382 #endif
383 #ifdef CONFIG_RM_DEMUXER
384     av_register_input_format(&rm_demuxer);
385 #endif
386 #ifdef CONFIG_RM_MUXER
387     av_register_output_format(&rm_muxer);
388 #endif
389 #ifdef CONFIG_NETWORK
390 #ifdef CONFIG_RTP_MUXER
391     av_register_output_format(&rtp_muxer);
392 #endif
393 #ifdef CONFIG_RTSP_DEMUXER
394     av_register_input_format(&rtsp_demuxer);
395 #endif
396 #ifdef CONFIG_SDP_DEMUXER
397     av_register_input_format(&sdp_demuxer);
398 #endif
399 #ifdef CONFIG_REDIR_DEMUXER
400     av_register_input_format(&redir_demuxer);
401 #endif
402 #endif /* CONFIG_NETWORK */
403 #ifdef CONFIG_SEGAFILM_DEMUXER
404     av_register_input_format(&segafilm_demuxer);
405 #endif
406 #ifdef CONFIG_VMD_DEMUXER
407     av_register_input_format(&vmd_demuxer);
408 #endif
409 #ifdef CONFIG_SMACKER_DEMUXER
410     av_register_input_format(&smacker_demuxer);
411 #endif
412 #ifdef CONFIG_SOL_DEMUXER
413     av_register_input_format(&sol_demuxer);
414 #endif
415 #ifdef CONFIG_SWF_DEMUXER
416     av_register_input_format(&swf_demuxer);
417 #endif
418 #ifdef CONFIG_SWF_MUXER
419     av_register_output_format(&swf_muxer);
420 #endif
421 #ifdef CONFIG_TTA_DEMUXER
422     av_register_input_format(&tta_demuxer);
423 #endif
424 #ifdef CONFIG_VIDEO4LINUX2
425 #ifdef CONFIG_V4L2_DEMUXER
426     av_register_input_format(&v4l2_demuxer);
427 #endif
428 #endif /* CONFIG_VIDEO4LINUX2 */
429 #if defined(CONFIG_VIDEO4LINUX) || defined(CONFIG_BKTR)
430 #ifdef CONFIG_VIDEO_GRAB_DEVICE_DEMUXER
431     av_register_input_format(&video_grab_device_demuxer);
432 #endif
433 #endif /* CONFIG_VIDEO4LINUX || CONFIG_BKTR */
434 #ifdef CONFIG_VOC_DEMUXER
435     av_register_input_format(&voc_demuxer);
436 #endif
437 #ifdef CONFIG_VOC_MUXER
438     av_register_output_format(&voc_muxer);
439 #endif
440 #ifdef CONFIG_WAV_DEMUXER
441     av_register_input_format(&wav_demuxer);
442 #endif
443 #ifdef CONFIG_WAV_MUXER
444     av_register_output_format(&wav_muxer);
445 #endif
446 #ifdef CONFIG_WC3_DEMUXER
447     av_register_input_format(&wc3_demuxer);
448 #endif
449 #ifdef CONFIG_WSAUD_DEMUXER
450     av_register_input_format(&wsaud_demuxer);
451 #endif
452 #ifdef CONFIG_WSVQA_DEMUXER
453     av_register_input_format(&wsvqa_demuxer);
454 #endif
455 #ifdef CONFIG_YUV4MPEGPIPE_MUXER
456     av_register_output_format(&yuv4mpegpipe_muxer);
457 #endif
458 #ifdef CONFIG_YUV4MPEGPIPE_DEMUXER
459     av_register_input_format(&yuv4mpegpipe_demuxer);
460 #endif
461
462     /* image formats */
463 #if 0
464     av_register_image_format(&pnm_image_format);
465     av_register_image_format(&pbm_image_format);
466     av_register_image_format(&pgm_image_format);
467     av_register_image_format(&ppm_image_format);
468     av_register_image_format(&pam_image_format);
469     av_register_image_format(&pgmyuv_image_format);
470     av_register_image_format(&yuv_image_format);
471 #ifdef CONFIG_ZLIB
472     av_register_image_format(&png_image_format);
473 #endif
474     av_register_image_format(&jpeg_image_format);
475 #endif
476     av_register_image_format(&gif_image_format);
477 //    av_register_image_format(&sgi_image_format); heap corruption, dont enable
478
479 #ifdef CONFIG_PROTOCOLS
480     /* file protocols */
481     register_protocol(&file_protocol);
482     register_protocol(&pipe_protocol);
483 #ifdef CONFIG_NETWORK
484     register_protocol(&udp_protocol);
485     register_protocol(&rtp_protocol);
486     register_protocol(&tcp_protocol);
487     register_protocol(&http_protocol);
488 #endif
489 #endif
490 }