allcodecs.c 3.56 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
/*
 * Utils for libavcodec
 * Copyright (c) 2002 Fabrice Bellard.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
#include "avcodec.h"

/* If you do not call this function, then you can select exactly which
   formats you want to support */

/**
 * simple call to register all the codecs. 
 */
void avcodec_register_all(void)
{
    static int inited = 0;
    
    if (inited != 0)
	return;
    inited = 1;

    /* encoders */
#ifdef CONFIG_ENCODERS
    register_avcodec(&ac3_encoder);
    register_avcodec(&mp2_encoder);
#ifdef CONFIG_MP3LAME
    register_avcodec(&mp3lame_encoder);
41 42 43
#endif
#ifdef CONFIG_VORBIS
    register_avcodec(&oggvorbis_encoder);
Mark Hills's avatar
Mark Hills committed
44
    register_avcodec(&oggvorbis_decoder);
45 46
#endif
    register_avcodec(&mpeg1video_encoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
47
#ifdef CONFIG_RISKY
48 49 50 51 52 53 54
    register_avcodec(&h263_encoder);
    register_avcodec(&h263p_encoder);
    register_avcodec(&rv10_encoder);
    register_avcodec(&mpeg4_encoder);
    register_avcodec(&msmpeg4v1_encoder);
    register_avcodec(&msmpeg4v2_encoder);
    register_avcodec(&msmpeg4v3_encoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
55
    register_avcodec(&wmv1_encoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
56
    register_avcodec(&wmv2_encoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
57 58
#endif
    register_avcodec(&mjpeg_encoder);
Michael Niedermayer's avatar
huffyuv  
Michael Niedermayer committed
59
    register_avcodec(&huffyuv_encoder);
60 61 62 63 64
#endif /* CONFIG_ENCODERS */
    register_avcodec(&rawvideo_codec);

    /* decoders */
#ifdef CONFIG_DECODERS
Michael Niedermayer's avatar
Michael Niedermayer committed
65
#ifdef CONFIG_RISKY
66 67 68 69 70 71
    register_avcodec(&h263_decoder);
    register_avcodec(&mpeg4_decoder);
    register_avcodec(&msmpeg4v1_decoder);
    register_avcodec(&msmpeg4v2_decoder);
    register_avcodec(&msmpeg4v3_decoder);
    register_avcodec(&wmv1_decoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
72
    register_avcodec(&wmv2_decoder);
73 74
    register_avcodec(&h263i_decoder);
    register_avcodec(&rv10_decoder);
Nick Kurshev's avatar
Nick Kurshev committed
75
    register_avcodec(&svq1_decoder);
Michael Niedermayer's avatar
Michael Niedermayer committed
76 77 78 79
    register_avcodec(&wmav1_decoder);
    register_avcodec(&wmav2_decoder);
#endif
    register_avcodec(&mpeg_decoder);
Fabrice Bellard's avatar
Fabrice Bellard committed
80
    register_avcodec(&dvvideo_decoder);
81
    register_avcodec(&dvaudio_decoder);
82
    register_avcodec(&mjpeg_decoder);
83
    register_avcodec(&mjpegb_decoder);
84 85
    register_avcodec(&mp2_decoder);
    register_avcodec(&mp3_decoder);
86 87
    register_avcodec(&mace3_decoder);
    register_avcodec(&mace6_decoder);
Michael Niedermayer's avatar
huffyuv  
Michael Niedermayer committed
88
    register_avcodec(&huffyuv_decoder);
Mike Melanson's avatar
Mike Melanson committed
89
    register_avcodec(&cyuv_decoder);
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
#ifdef CONFIG_AC3
    register_avcodec(&ac3_decoder);
#endif
#endif /* CONFIG_DECODERS */

    /* pcm codecs */

#define PCM_CODEC(id, name) \
    register_avcodec(& name ## _encoder); \
    register_avcodec(& name ## _decoder); \

PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le);
PCM_CODEC(CODEC_ID_PCM_S16BE, pcm_s16be);
PCM_CODEC(CODEC_ID_PCM_U16LE, pcm_u16le);
PCM_CODEC(CODEC_ID_PCM_U16BE, pcm_u16be);
PCM_CODEC(CODEC_ID_PCM_S8, pcm_s8);
PCM_CODEC(CODEC_ID_PCM_U8, pcm_u8);
PCM_CODEC(CODEC_ID_PCM_ALAW, pcm_alaw);
PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw);

110 111 112 113 114
    /* adpcm codecs */
PCM_CODEC(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt);
PCM_CODEC(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav);
PCM_CODEC(CODEC_ID_ADPCM_MS, adpcm_ms);

115 116 117
#undef PCM_CODEC
}