Statistics
| Branch: | Revision:

ffmpeg / libavcodec / allcodecs.c @ cb231c48

History | View | Annotate | Download (4.72 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 771b9a70 Fabrice Bellard
    register_avcodec(&mpeg1video_encoder);
53 0da71265 Michael Niedermayer
//    register_avcodec(&h264_encoder);
54 1d0d55da Michael Niedermayer
#ifdef CONFIG_RISKY
55 029911d1 Michael Niedermayer
    register_avcodec(&mpeg2video_encoder);
56 771b9a70 Fabrice Bellard
    register_avcodec(&h263_encoder);
57
    register_avcodec(&h263p_encoder);
58 dde38422 Michael Niedermayer
    register_avcodec(&flv_encoder);
59 771b9a70 Fabrice Bellard
    register_avcodec(&rv10_encoder);
60
    register_avcodec(&mpeg4_encoder);
61
    register_avcodec(&msmpeg4v1_encoder);
62
    register_avcodec(&msmpeg4v2_encoder);
63
    register_avcodec(&msmpeg4v3_encoder);
64 0151a6f5 Michael Niedermayer
    register_avcodec(&wmv1_encoder);
65 1457ab52 Michael Niedermayer
    register_avcodec(&wmv2_encoder);
66 1d0d55da Michael Niedermayer
#endif
67
    register_avcodec(&mjpeg_encoder);
68 b1e6b355 Michael Niedermayer
    register_avcodec(&ljpeg_encoder);
69 11f18faf Michael Niedermayer
    register_avcodec(&huffyuv_encoder);
70 3d2e8cce Michael Niedermayer
    register_avcodec(&asv1_encoder);
71 5e20f836 Michael Niedermayer
    register_avcodec(&ffv1_encoder);
72 771b9a70 Fabrice Bellard
#endif /* CONFIG_ENCODERS */
73 63167088 Roman Shaposhnik
    register_avcodec(&rawvideo_encoder);
74
    register_avcodec(&rawvideo_decoder);
75 771b9a70 Fabrice Bellard
76
    /* decoders */
77
#ifdef CONFIG_DECODERS
78 1d0d55da Michael Niedermayer
#ifdef CONFIG_RISKY
79 771b9a70 Fabrice Bellard
    register_avcodec(&h263_decoder);
80
    register_avcodec(&mpeg4_decoder);
81
    register_avcodec(&msmpeg4v1_decoder);
82
    register_avcodec(&msmpeg4v2_decoder);
83
    register_avcodec(&msmpeg4v3_decoder);
84
    register_avcodec(&wmv1_decoder);
85 1457ab52 Michael Niedermayer
    register_avcodec(&wmv2_decoder);
86 771b9a70 Fabrice Bellard
    register_avcodec(&h263i_decoder);
87 dde38422 Michael Niedermayer
    register_avcodec(&flv_decoder);
88 771b9a70 Fabrice Bellard
    register_avcodec(&rv10_decoder);
89 be8ffec9 Nick Kurshev
    register_avcodec(&svq1_decoder);
90 8b82a956 Michael Niedermayer
    register_avcodec(&svq3_decoder);
91 1d0d55da Michael Niedermayer
    register_avcodec(&wmav1_decoder);
92
    register_avcodec(&wmav2_decoder);
93 deabd4fd Mike Melanson
    register_avcodec(&indeo3_decoder);
94 280bd7b7 Zdenek Kabelac
#ifdef CONFIG_FAAD
95
    register_avcodec(&aac_decoder);
96
    register_avcodec(&mpeg4aac_decoder);
97
#endif
98 1d0d55da Michael Niedermayer
#endif
99 922bc38d Michael Niedermayer
    register_avcodec(&mpeg1video_decoder);
100
    register_avcodec(&mpeg2video_decoder);
101 2e7b4c84 Ivan Kalvachev
#ifdef HAVE_XVMC
102
    register_avcodec(&mpeg_xvmc_decoder);
103
#endif
104 020fcc94 Fabrice Bellard
    register_avcodec(&dvvideo_decoder);
105 425ed6e2 Fabrice Bellard
    register_avcodec(&dvaudio_decoder);
106 771b9a70 Fabrice Bellard
    register_avcodec(&mjpeg_decoder);
107 b135d9fb Alex Beregszaszi
    register_avcodec(&mjpegb_decoder);
108 771b9a70 Fabrice Bellard
    register_avcodec(&mp2_decoder);
109
    register_avcodec(&mp3_decoder);
110 3f95e843 François Revol
    register_avcodec(&mace3_decoder);
111
    register_avcodec(&mace6_decoder);
112 11f18faf Michael Niedermayer
    register_avcodec(&huffyuv_decoder);
113 5e20f836 Michael Niedermayer
    register_avcodec(&ffv1_decoder);
114 c78f73c8 Mike Melanson
    register_avcodec(&cyuv_decoder);
115 0da71265 Michael Niedermayer
    register_avcodec(&h264_decoder);
116 d86053a4 Mike Melanson
    register_avcodec(&vp3_decoder);
117 3d2e8cce Michael Niedermayer
    register_avcodec(&asv1_decoder);
118 be3564ed Michael Niedermayer
    register_avcodec(&vcr1_decoder);
119 3aff069b Alex Beregszaszi
    register_avcodec(&cljr_decoder);
120 8809cfee Michael Niedermayer
    register_avcodec(&fourxm_decoder);
121 c3bf0288 Michael Niedermayer
    register_avcodec(&mdec_decoder);
122 771b9a70 Fabrice Bellard
#ifdef CONFIG_AC3
123
    register_avcodec(&ac3_decoder);
124
#endif
125 b8414bbd Nick Kurshev
    register_avcodec(&ra_144_decoder);
126
    register_avcodec(&ra_288_decoder);
127 771b9a70 Fabrice Bellard
#endif /* CONFIG_DECODERS */
128
129 891f64b3 joca@rixmail.se
#ifdef AMR_NB
130
    register_avcodec(&amr_nb_decoder);
131 bc634f6f Zdenek Kabelac
    register_avcodec(&amr_nb_encoder);
132 891f64b3 joca@rixmail.se
#endif /* AMR_NB */
133 771b9a70 Fabrice Bellard
    /* pcm codecs */
134
135
#define PCM_CODEC(id, name) \
136
    register_avcodec(& name ## _encoder); \
137
    register_avcodec(& name ## _decoder); \
138
139
PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le);
140
PCM_CODEC(CODEC_ID_PCM_S16BE, pcm_s16be);
141
PCM_CODEC(CODEC_ID_PCM_U16LE, pcm_u16le);
142
PCM_CODEC(CODEC_ID_PCM_U16BE, pcm_u16be);
143
PCM_CODEC(CODEC_ID_PCM_S8, pcm_s8);
144
PCM_CODEC(CODEC_ID_PCM_U8, pcm_u8);
145
PCM_CODEC(CODEC_ID_PCM_ALAW, pcm_alaw);
146
PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw);
147
148 0147f198 François Revol
    /* adpcm codecs */
149
PCM_CODEC(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt);
150
PCM_CODEC(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav);
151
PCM_CODEC(CODEC_ID_ADPCM_MS, adpcm_ms);
152 4b465299 Michael Niedermayer
PCM_CODEC(CODEC_ID_ADPCM_4XM, adpcm_4xm);
153 0147f198 François Revol
154 771b9a70 Fabrice Bellard
#undef PCM_CODEC
155
}