updating nut demuxer to latest spec
[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_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
191 #ifdef CONFIG_MTV_DEMUXER
192     av_register_input_format(&mtv_demuxer);
193 #endif
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
242 #ifdef CONFIG_MXF_DEMUXER
243     av_register_input_format(&mxf_demuxer);
244 #endif
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
252 //    av_register_output_format(&nut_muxer);
253 #endif
254 #ifdef CONFIG_NUV_DEMUXER
255     av_register_input_format(&nuv_demuxer);
256 #endif
257 #ifdef CONFIG_OGG_DEMUXER
258     av_register_input_format(&ogg_demuxer);
259 #endif
260 #ifdef CONFIG_LIBOGG
261 #ifdef CONFIG_OGG_MUXER
262     av_register_output_format(&ogg_muxer);
263 #endif
264 #endif /* CONFIG_LIBOGG */
265 #ifdef CONFIG_STR_DEMUXER
266     av_register_input_format(&str_demuxer);
267 #endif
268 #ifdef CONFIG_SHORTEN_DEMUXER
269     av_register_input_format(&shorten_demuxer);
270 #endif
271 #ifdef CONFIG_FLAC_DEMUXER
272     av_register_input_format(&flac_demuxer);
273 #endif
274 #ifdef CONFIG_FLAC_MUXER
275     av_register_output_format(&flac_muxer);
276 #endif
277 #ifdef CONFIG_AC3_DEMUXER
278     av_register_input_format(&ac3_demuxer);
279 #endif
280 #ifdef CONFIG_AC3_MUXER
281     av_register_output_format(&ac3_muxer);
282 #endif
283 #ifdef CONFIG_DTS_DEMUXER
284     av_register_input_format(&dts_demuxer);
285 #endif
286 #ifdef CONFIG_AAC_DEMUXER
287     av_register_input_format(&aac_demuxer);
288 #endif
289 #ifdef CONFIG_H261_DEMUXER
290     av_register_input_format(&h261_demuxer);
291 #endif
292 #ifdef CONFIG_H261_MUXER
293     av_register_output_format(&h261_muxer);
294 #endif
295 #ifdef CONFIG_H263_DEMUXER
296     av_register_input_format(&h263_demuxer);
297 #endif
298 #ifdef CONFIG_H263_MUXER
299     av_register_output_format(&h263_muxer);
300 #endif
301 #ifdef CONFIG_M4V_DEMUXER
302     av_register_input_format(&m4v_demuxer);
303 #endif
304 #ifdef CONFIG_M4V_MUXER
305     av_register_output_format(&m4v_muxer);
306 #endif
307 #ifdef CONFIG_H264_DEMUXER
308     av_register_input_format(&h264_demuxer);
309 #endif
310 #ifdef CONFIG_H264_MUXER
311     av_register_output_format(&h264_muxer);
312 #endif
313 #ifdef CONFIG_MPEGVIDEO_DEMUXER
314     av_register_input_format(&mpegvideo_demuxer);
315 #endif
316 #ifdef CONFIG_MPEG1VIDEO_MUXER
317     av_register_output_format(&mpeg1video_muxer);
318 #endif
319 #ifdef CONFIG_MPEG2VIDEO_MUXER
320     av_register_output_format(&mpeg2video_muxer);
321 #endif
322 #ifdef CONFIG_MJPEG_DEMUXER
323     av_register_input_format(&mjpeg_demuxer);
324 #endif
325 #ifdef CONFIG_INGENIENT_DEMUXER
326     av_register_input_format(&ingenient_demuxer);
327 #endif
328 #ifdef CONFIG_MJPEG_MUXER
329     av_register_output_format(&mjpeg_muxer);
330 #endif
331 #ifdef CONFIG_PCM_S16LE_DEMUXER
332     av_register_input_format(&pcm_s16le_demuxer);
333 #endif
334 #ifdef CONFIG_PCM_S16LE_MUXER
335     av_register_output_format(&pcm_s16le_muxer);
336 #endif
337 #ifdef CONFIG_PCM_S16BE_DEMUXER
338     av_register_input_format(&pcm_s16be_demuxer);
339 #endif
340 #ifdef CONFIG_PCM_S16BE_MUXER
341     av_register_output_format(&pcm_s16be_muxer);
342 #endif
343 #ifdef CONFIG_PCM_U16LE_DEMUXER
344     av_register_input_format(&pcm_u16le_demuxer);
345 #endif
346 #ifdef CONFIG_PCM_U16LE_MUXER
347     av_register_output_format(&pcm_u16le_muxer);
348 #endif
349 #ifdef CONFIG_PCM_U16BE_DEMUXER
350     av_register_input_format(&pcm_u16be_demuxer);
351 #endif
352 #ifdef CONFIG_PCM_U16BE_MUXER
353     av_register_output_format(&pcm_u16be_muxer);
354 #endif
355 #ifdef CONFIG_PCM_S8_DEMUXER
356     av_register_input_format(&pcm_s8_demuxer);
357 #endif
358 #ifdef CONFIG_PCM_S8_MUXER
359     av_register_output_format(&pcm_s8_muxer);
360 #endif
361 #ifdef CONFIG_PCM_U8_DEMUXER
362     av_register_input_format(&pcm_u8_demuxer);
363 #endif
364 #ifdef CONFIG_PCM_U8_MUXER
365     av_register_output_format(&pcm_u8_muxer);
366 #endif
367 #ifdef CONFIG_PCM_MULAW_DEMUXER
368     av_register_input_format(&pcm_mulaw_demuxer);
369 #endif
370 #ifdef CONFIG_PCM_MULAW_MUXER
371     av_register_output_format(&pcm_mulaw_muxer);
372 #endif
373 #ifdef CONFIG_PCM_ALAW_DEMUXER
374     av_register_input_format(&pcm_alaw_demuxer);
375 #endif
376 #ifdef CONFIG_PCM_ALAW_MUXER
377     av_register_output_format(&pcm_alaw_muxer);
378 #endif
379 #ifdef CONFIG_RAWVIDEO_DEMUXER
380     av_register_input_format(&rawvideo_demuxer);
381 #endif
382 #ifdef CONFIG_RAWVIDEO_MUXER
383     av_register_output_format(&rawvideo_muxer);
384 #endif
385 #ifdef CONFIG_NULL_MUXER
386     av_register_output_format(&null_muxer);
387 #endif
388 #ifdef CONFIG_RM_DEMUXER
389     av_register_input_format(&rm_demuxer);
390 #endif
391 #ifdef CONFIG_RM_MUXER
392     av_register_output_format(&rm_muxer);
393 #endif
394 #ifdef CONFIG_NETWORK
395 #ifdef CONFIG_RTP_MUXER
396     av_register_output_format(&rtp_muxer);
397 #endif
398 #ifdef CONFIG_RTSP_DEMUXER
399     av_register_input_format(&rtsp_demuxer);
400 #endif
401 #ifdef CONFIG_SDP_DEMUXER
402     av_register_input_format(&sdp_demuxer);
403 #endif
404 #ifdef CONFIG_REDIR_DEMUXER
405     av_register_input_format(&redir_demuxer);
406 #endif
407     av_register_rtp_dynamic_payload_handlers();
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_WV_DEMUXER
462     av_register_input_format(&wv_demuxer);
463 #endif
464 #ifdef CONFIG_YUV4MPEGPIPE_MUXER
465     av_register_output_format(&yuv4mpegpipe_muxer);
466 #endif
467 #ifdef CONFIG_YUV4MPEGPIPE_DEMUXER
468     av_register_input_format(&yuv4mpegpipe_demuxer);
469 #endif
470 #ifdef CONFIG_TIERTEXSEQ_DEMUXER
471     av_register_input_format(&tiertexseq_demuxer);
472 #endif
473
474 #ifdef CONFIG_PROTOCOLS
475     /* file protocols */
476     register_protocol(&file_protocol);
477     register_protocol(&pipe_protocol);
478 #ifdef CONFIG_NETWORK
479     register_protocol(&udp_protocol);
480     register_protocol(&rtp_protocol);
481     register_protocol(&tcp_protocol);
482     register_protocol(&http_protocol);
483 #endif
484 #endif
485 }