Statistics
| Branch: | Revision:

ffmpeg / libavcodec / allcodecs.c @ d0a0bbd2

History | View | Annotate | Download (7.38 KB)

1 771b9a70 Fabrice Bellard
/*
2
 * Utils for libavcodec
3
 * Copyright (c) 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 */
19 983e3246 Michael Niedermayer
20
/**
21
 * @file allcodecs.c
22
 * Utils for libavcodec.
23
 */
24
25 771b9a70 Fabrice Bellard
#include "avcodec.h"
26
27
/* If you do not call this function, then you can select exactly which
28
   formats you want to support */
29
30
/**
31
 * simple call to register all the codecs. 
32
 */
33
void avcodec_register_all(void)
34
{
35
    static int inited = 0;
36
    
37
    if (inited != 0)
38
        return;
39
    inited = 1;
40
41
    /* encoders */
42
#ifdef CONFIG_ENCODERS
43
    register_avcodec(&ac3_encoder);
44
    register_avcodec(&mp2_encoder);
45
#ifdef CONFIG_MP3LAME
46
    register_avcodec(&mp3lame_encoder);
47
#endif
48 81e0d0b4 Mark Hills
#ifdef CONFIG_VORBIS
49
    register_avcodec(&oggvorbis_encoder);
50 3aca208a Mark Hills
    register_avcodec(&oggvorbis_decoder);
51 81e0d0b4 Mark Hills
#endif
52 29d48296 Michael Niedermayer
#ifdef CONFIG_FAAC
53
    register_avcodec(&faac_encoder);
54
#endif
55 1ddadfa9 Adam Thayer
#ifdef CONFIG_XVID
56
    register_avcodec(&xvid_encoder);
57
#endif
58 771b9a70 Fabrice Bellard
    register_avcodec(&mpeg1video_encoder);
59 0da71265 Michael Niedermayer
//    register_avcodec(&h264_encoder);
60 1d0d55da Michael Niedermayer
#ifdef CONFIG_RISKY
61 029911d1 Michael Niedermayer
    register_avcodec(&mpeg2video_encoder);
62 771b9a70 Fabrice Bellard
    register_avcodec(&h263_encoder);
63
    register_avcodec(&h263p_encoder);
64 dde38422 Michael Niedermayer
    register_avcodec(&flv_encoder);
65 771b9a70 Fabrice Bellard
    register_avcodec(&rv10_encoder);
66
    register_avcodec(&mpeg4_encoder);
67
    register_avcodec(&msmpeg4v1_encoder);
68
    register_avcodec(&msmpeg4v2_encoder);
69
    register_avcodec(&msmpeg4v3_encoder);
70 0151a6f5 Michael Niedermayer
    register_avcodec(&wmv1_encoder);
71 1457ab52 Michael Niedermayer
    register_avcodec(&wmv2_encoder);
72 3b64893d Mike Melanson
    register_avcodec(&svq1_encoder);
73 1d0d55da Michael Niedermayer
#endif
74
    register_avcodec(&mjpeg_encoder);
75 b1e6b355 Michael Niedermayer
    register_avcodec(&ljpeg_encoder);
76 11f18faf Michael Niedermayer
    register_avcodec(&huffyuv_encoder);
77 3d2e8cce Michael Niedermayer
    register_avcodec(&asv1_encoder);
78 1149acdc Michael Niedermayer
    register_avcodec(&asv2_encoder);
79 5e20f836 Michael Niedermayer
    register_avcodec(&ffv1_encoder);
80 791e7b83 Michael Niedermayer
    register_avcodec(&snow_encoder);
81 a273bbfb Roberto Togni
    register_avcodec(&zlib_encoder);
82 6faa4645 Roman Shaposhnik
    register_avcodec(&dvvideo_encoder);
83 54f5fd22 Alex Beregszaszi
    register_avcodec(&sonic_encoder);
84
    register_avcodec(&sonic_ls_encoder);
85 771b9a70 Fabrice Bellard
#endif /* CONFIG_ENCODERS */
86 63167088 Roman Shaposhnik
    register_avcodec(&rawvideo_encoder);
87
    register_avcodec(&rawvideo_decoder);
88 771b9a70 Fabrice Bellard
89
    /* decoders */
90
#ifdef CONFIG_DECODERS
91 1d0d55da Michael Niedermayer
#ifdef CONFIG_RISKY
92 771b9a70 Fabrice Bellard
    register_avcodec(&h263_decoder);
93 c6148de2 Michael Niedermayer
    register_avcodec(&h261_decoder);
94 771b9a70 Fabrice Bellard
    register_avcodec(&mpeg4_decoder);
95
    register_avcodec(&msmpeg4v1_decoder);
96
    register_avcodec(&msmpeg4v2_decoder);
97
    register_avcodec(&msmpeg4v3_decoder);
98
    register_avcodec(&wmv1_decoder);
99 1457ab52 Michael Niedermayer
    register_avcodec(&wmv2_decoder);
100 771b9a70 Fabrice Bellard
    register_avcodec(&h263i_decoder);
101 dde38422 Michael Niedermayer
    register_avcodec(&flv_decoder);
102 771b9a70 Fabrice Bellard
    register_avcodec(&rv10_decoder);
103 68b94c35 Michael Niedermayer
    register_avcodec(&rv20_decoder);
104 be8ffec9 Nick Kurshev
    register_avcodec(&svq1_decoder);
105 8b82a956 Michael Niedermayer
    register_avcodec(&svq3_decoder);
106 1d0d55da Michael Niedermayer
    register_avcodec(&wmav1_decoder);
107
    register_avcodec(&wmav2_decoder);
108 deabd4fd Mike Melanson
    register_avcodec(&indeo3_decoder);
109 d0a0bbd2 Mike Melanson
    register_avcodec(&tscc_decoder);
110
    register_avcodec(&ulti_decoder);
111 280bd7b7 Zdenek Kabelac
#ifdef CONFIG_FAAD
112
    register_avcodec(&aac_decoder);
113
    register_avcodec(&mpeg4aac_decoder);
114
#endif
115 1d0d55da Michael Niedermayer
#endif
116 922bc38d Michael Niedermayer
    register_avcodec(&mpeg1video_decoder);
117
    register_avcodec(&mpeg2video_decoder);
118 c512b303 Ivan Kalvachev
    register_avcodec(&mpegvideo_decoder);
119 2e7b4c84 Ivan Kalvachev
#ifdef HAVE_XVMC
120
    register_avcodec(&mpeg_xvmc_decoder);
121
#endif
122 020fcc94 Fabrice Bellard
    register_avcodec(&dvvideo_decoder);
123 771b9a70 Fabrice Bellard
    register_avcodec(&mjpeg_decoder);
124 b135d9fb Alex Beregszaszi
    register_avcodec(&mjpegb_decoder);
125 5e83dec4 Alex Beregszaszi
    register_avcodec(&sp5x_decoder);
126 771b9a70 Fabrice Bellard
    register_avcodec(&mp2_decoder);
127
    register_avcodec(&mp3_decoder);
128 3f95e843 François Revol
    register_avcodec(&mace3_decoder);
129
    register_avcodec(&mace6_decoder);
130 11f18faf Michael Niedermayer
    register_avcodec(&huffyuv_decoder);
131 5e20f836 Michael Niedermayer
    register_avcodec(&ffv1_decoder);
132 791e7b83 Michael Niedermayer
    register_avcodec(&snow_decoder);
133 c78f73c8 Mike Melanson
    register_avcodec(&cyuv_decoder);
134 0da71265 Michael Niedermayer
    register_avcodec(&h264_decoder);
135 d86053a4 Mike Melanson
    register_avcodec(&vp3_decoder);
136 f44ee2c3 Alex Beregszaszi
    register_avcodec(&theora_decoder);
137 3d2e8cce Michael Niedermayer
    register_avcodec(&asv1_decoder);
138 9b56edf5 Michael Niedermayer
    register_avcodec(&asv2_decoder);
139 be3564ed Michael Niedermayer
    register_avcodec(&vcr1_decoder);
140 3aff069b Alex Beregszaszi
    register_avcodec(&cljr_decoder);
141 8809cfee Michael Niedermayer
    register_avcodec(&fourxm_decoder);
142 c3bf0288 Michael Niedermayer
    register_avcodec(&mdec_decoder);
143 3ef8be2b Mike Melanson
    register_avcodec(&roq_decoder);
144
    register_avcodec(&interplay_video_decoder);
145 9937e686 Mike Melanson
    register_avcodec(&xan_wc3_decoder);
146 2fdf638b Mike Melanson
    register_avcodec(&rpza_decoder);
147
    register_avcodec(&cinepak_decoder);
148
    register_avcodec(&msrle_decoder);
149
    register_avcodec(&msvideo1_decoder);
150 6955a882 Mike Melanson
    register_avcodec(&vqa_decoder);
151 4120a53a Mike Melanson
    register_avcodec(&idcin_decoder);
152 1dc1ed99 Roberto Togni
    register_avcodec(&eightbps_decoder);
153 11e29a41 Mike Melanson
    register_avcodec(&smc_decoder);
154 42cad81a Mike Melanson
    register_avcodec(&flic_decoder);
155 9a4117d5 Mike Melanson
    register_avcodec(&truemotion1_decoder);
156 fafa0b75 Mike Melanson
    register_avcodec(&vmdvideo_decoder);
157
    register_avcodec(&vmdaudio_decoder);
158 a273bbfb Roberto Togni
    register_avcodec(&mszh_decoder);
159
    register_avcodec(&zlib_decoder);
160 54f5fd22 Alex Beregszaszi
    register_avcodec(&sonic_decoder);
161 771b9a70 Fabrice Bellard
#ifdef CONFIG_AC3
162
    register_avcodec(&ac3_decoder);
163
#endif
164 23c99253 Michael Niedermayer
#ifdef CONFIG_DTS
165
    register_avcodec(&dts_decoder);
166
#endif
167 b8414bbd Nick Kurshev
    register_avcodec(&ra_144_decoder);
168
    register_avcodec(&ra_288_decoder);
169 3ef8be2b Mike Melanson
    register_avcodec(&roq_dpcm_decoder);
170
    register_avcodec(&interplay_dpcm_decoder);
171 9937e686 Mike Melanson
    register_avcodec(&xan_dpcm_decoder);
172 070ed1bc Mike Melanson
    register_avcodec(&qtrle_decoder);
173 ac2570a8 Michael Niedermayer
    register_avcodec(&flac_decoder);
174 771b9a70 Fabrice Bellard
#endif /* CONFIG_DECODERS */
175
176 891f64b3 joca@rixmail.se
#ifdef AMR_NB
177
    register_avcodec(&amr_nb_decoder);
178 fc384777 Mike Melanson
#ifdef CONFIG_ENCODERS
179 bc634f6f Zdenek Kabelac
    register_avcodec(&amr_nb_encoder);
180 fc384777 Mike Melanson
#endif //CONFIG_ENCODERS
181 891f64b3 joca@rixmail.se
#endif /* AMR_NB */
182 d663a1fd Michael Niedermayer
183
#ifdef AMR_WB
184
    register_avcodec(&amr_wb_decoder);
185 fc384777 Mike Melanson
#ifdef CONFIG_ENCODERS
186 d663a1fd Michael Niedermayer
    register_avcodec(&amr_wb_encoder);
187 fc384777 Mike Melanson
#endif //CONFIG_ENCODERS
188 d663a1fd Michael Niedermayer
#endif /* AMR_WB */
189
190 771b9a70 Fabrice Bellard
    /* pcm codecs */
191
192 fc384777 Mike Melanson
#ifdef CONFIG_ENCODERS
193 771b9a70 Fabrice Bellard
#define PCM_CODEC(id, name) \
194
    register_avcodec(& name ## _encoder); \
195
    register_avcodec(& name ## _decoder); \
196
197 fc384777 Mike Melanson
#else
198
#define PCM_CODEC(id, name) \
199
    register_avcodec(& name ## _decoder);
200
#endif
201
202 771b9a70 Fabrice Bellard
PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le);
203
PCM_CODEC(CODEC_ID_PCM_S16BE, pcm_s16be);
204
PCM_CODEC(CODEC_ID_PCM_U16LE, pcm_u16le);
205
PCM_CODEC(CODEC_ID_PCM_U16BE, pcm_u16be);
206
PCM_CODEC(CODEC_ID_PCM_S8, pcm_s8);
207
PCM_CODEC(CODEC_ID_PCM_U8, pcm_u8);
208
PCM_CODEC(CODEC_ID_PCM_ALAW, pcm_alaw);
209
PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw);
210
211 0147f198 François Revol
    /* adpcm codecs */
212
PCM_CODEC(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt);
213
PCM_CODEC(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav);
214 9937e686 Mike Melanson
PCM_CODEC(CODEC_ID_ADPCM_IMA_DK3, adpcm_ima_dk3);
215
PCM_CODEC(CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4);
216 2fdf638b Mike Melanson
PCM_CODEC(CODEC_ID_ADPCM_IMA_WS, adpcm_ima_ws);
217 7d8379f2 Mike Melanson
PCM_CODEC(CODEC_ID_ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg);
218 0147f198 François Revol
PCM_CODEC(CODEC_ID_ADPCM_MS, adpcm_ms);
219 4b465299 Michael Niedermayer
PCM_CODEC(CODEC_ID_ADPCM_4XM, adpcm_4xm);
220 fc384777 Mike Melanson
PCM_CODEC(CODEC_ID_ADPCM_XA, adpcm_xa);
221
PCM_CODEC(CODEC_ID_ADPCM_ADX, adpcm_adx);
222 7d8379f2 Mike Melanson
PCM_CODEC(CODEC_ID_ADPCM_EA, adpcm_ea);
223 13b4c18e Mike Melanson
PCM_CODEC(CODEC_ID_ADPCM_G726, adpcm_g726);
224 0147f198 François Revol
225 771b9a70 Fabrice Bellard
#undef PCM_CODEC
226 8424cf50 Fabrice Bellard
227
    /* parsers */ 
228
    av_register_codec_parser(&mpegvideo_parser);
229
    av_register_codec_parser(&mpeg4video_parser);
230 c6148de2 Michael Niedermayer
    av_register_codec_parser(&h261_parser);
231 8424cf50 Fabrice Bellard
    av_register_codec_parser(&h263_parser);
232
    av_register_codec_parser(&h264_parser);
233
234
    av_register_codec_parser(&mpegaudio_parser);
235
#ifdef CONFIG_AC3
236
    av_register_codec_parser(&ac3_parser);
237
#endif
238 771b9a70 Fabrice Bellard
}