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