2002-06-11 13:41:41 +00:00
|
|
|
/*
|
|
|
|
* 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
|
|
|
|
*/
|
2003-03-06 11:32:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @file allcodecs.c
|
|
|
|
* Utils for libavcodec.
|
|
|
|
*/
|
|
|
|
|
2002-06-11 13:41:41 +00:00
|
|
|
#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);
|
2002-09-01 18:07:56 +00:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_VORBIS
|
|
|
|
register_avcodec(&oggvorbis_encoder);
|
2002-11-22 07:27:13 +00:00
|
|
|
register_avcodec(&oggvorbis_decoder);
|
2003-10-04 09:53:34 +00:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_FAAC
|
|
|
|
register_avcodec(&faac_encoder);
|
2002-06-11 13:41:41 +00:00
|
|
|
#endif
|
|
|
|
register_avcodec(&mpeg1video_encoder);
|
2003-04-04 14:42:28 +00:00
|
|
|
// register_avcodec(&h264_encoder);
|
2003-01-29 12:00:11 +00:00
|
|
|
#ifdef CONFIG_RISKY
|
2003-08-25 22:47:32 +00:00
|
|
|
register_avcodec(&mpeg2video_encoder);
|
2002-06-11 13:41:41 +00:00
|
|
|
register_avcodec(&h263_encoder);
|
|
|
|
register_avcodec(&h263p_encoder);
|
2003-07-10 16:25:30 +00:00
|
|
|
register_avcodec(&flv_encoder);
|
2002-06-11 13:41:41 +00:00
|
|
|
register_avcodec(&rv10_encoder);
|
|
|
|
register_avcodec(&mpeg4_encoder);
|
|
|
|
register_avcodec(&msmpeg4v1_encoder);
|
|
|
|
register_avcodec(&msmpeg4v2_encoder);
|
|
|
|
register_avcodec(&msmpeg4v3_encoder);
|
2002-06-18 00:50:20 +00:00
|
|
|
register_avcodec(&wmv1_encoder);
|
2002-12-27 23:51:46 +00:00
|
|
|
register_avcodec(&wmv2_encoder);
|
2003-01-29 12:00:11 +00:00
|
|
|
#endif
|
|
|
|
register_avcodec(&mjpeg_encoder);
|
2003-06-17 22:48:51 +00:00
|
|
|
register_avcodec(&ljpeg_encoder);
|
2002-11-14 19:20:04 +00:00
|
|
|
register_avcodec(&huffyuv_encoder);
|
2003-05-19 13:30:59 +00:00
|
|
|
register_avcodec(&asv1_encoder);
|
2003-09-01 12:26:39 +00:00
|
|
|
register_avcodec(&asv2_encoder);
|
2003-06-09 02:24:51 +00:00
|
|
|
register_avcodec(&ffv1_encoder);
|
2004-01-12 22:14:45 +00:00
|
|
|
register_avcodec(&zlib_encoder);
|
2004-03-14 23:45:42 +00:00
|
|
|
register_avcodec(&dvvideo_encoder);
|
2002-06-11 13:41:41 +00:00
|
|
|
#endif /* CONFIG_ENCODERS */
|
2003-05-07 19:01:45 +00:00
|
|
|
register_avcodec(&rawvideo_encoder);
|
|
|
|
register_avcodec(&rawvideo_decoder);
|
2002-06-11 13:41:41 +00:00
|
|
|
|
|
|
|
/* decoders */
|
|
|
|
#ifdef CONFIG_DECODERS
|
2003-01-29 12:00:11 +00:00
|
|
|
#ifdef CONFIG_RISKY
|
2002-06-11 13:41:41 +00:00
|
|
|
register_avcodec(&h263_decoder);
|
|
|
|
register_avcodec(&mpeg4_decoder);
|
|
|
|
register_avcodec(&msmpeg4v1_decoder);
|
|
|
|
register_avcodec(&msmpeg4v2_decoder);
|
|
|
|
register_avcodec(&msmpeg4v3_decoder);
|
|
|
|
register_avcodec(&wmv1_decoder);
|
2002-12-27 23:51:46 +00:00
|
|
|
register_avcodec(&wmv2_decoder);
|
2002-06-11 13:41:41 +00:00
|
|
|
register_avcodec(&h263i_decoder);
|
2003-07-10 16:25:30 +00:00
|
|
|
register_avcodec(&flv_decoder);
|
2002-06-11 13:41:41 +00:00
|
|
|
register_avcodec(&rv10_decoder);
|
2003-11-30 14:35:35 +00:00
|
|
|
register_avcodec(&rv20_decoder);
|
2002-07-09 16:08:43 +00:00
|
|
|
register_avcodec(&svq1_decoder);
|
2003-05-09 22:16:14 +00:00
|
|
|
register_avcodec(&svq3_decoder);
|
2003-01-29 12:00:11 +00:00
|
|
|
register_avcodec(&wmav1_decoder);
|
|
|
|
register_avcodec(&wmav2_decoder);
|
2003-04-15 10:12:38 +00:00
|
|
|
register_avcodec(&indeo3_decoder);
|
2003-05-12 10:55:19 +00:00
|
|
|
#ifdef CONFIG_FAAD
|
|
|
|
register_avcodec(&aac_decoder);
|
|
|
|
register_avcodec(&mpeg4aac_decoder);
|
|
|
|
#endif
|
2003-01-29 12:00:11 +00:00
|
|
|
#endif
|
2003-08-26 07:42:25 +00:00
|
|
|
register_avcodec(&mpeg1video_decoder);
|
|
|
|
register_avcodec(&mpeg2video_decoder);
|
2003-11-12 01:19:36 +00:00
|
|
|
register_avcodec(&mpegvideo_decoder);
|
2003-07-26 01:28:49 +00:00
|
|
|
#ifdef HAVE_XVMC
|
|
|
|
register_avcodec(&mpeg_xvmc_decoder);
|
|
|
|
#endif
|
2002-10-04 07:16:50 +00:00
|
|
|
register_avcodec(&dvvideo_decoder);
|
2002-06-11 13:41:41 +00:00
|
|
|
register_avcodec(&mjpeg_decoder);
|
2002-11-20 15:18:11 +00:00
|
|
|
register_avcodec(&mjpegb_decoder);
|
2003-10-11 21:49:10 +00:00
|
|
|
register_avcodec(&sp5x_decoder);
|
2002-06-11 13:41:41 +00:00
|
|
|
register_avcodec(&mp2_decoder);
|
|
|
|
register_avcodec(&mp3_decoder);
|
2002-11-02 10:39:22 +00:00
|
|
|
register_avcodec(&mace3_decoder);
|
|
|
|
register_avcodec(&mace6_decoder);
|
2002-11-14 19:20:04 +00:00
|
|
|
register_avcodec(&huffyuv_decoder);
|
2003-06-09 02:24:51 +00:00
|
|
|
register_avcodec(&ffv1_decoder);
|
2003-02-09 16:58:47 +00:00
|
|
|
register_avcodec(&cyuv_decoder);
|
2003-04-04 14:42:28 +00:00
|
|
|
register_avcodec(&h264_decoder);
|
2003-05-05 02:54:15 +00:00
|
|
|
register_avcodec(&vp3_decoder);
|
2003-10-11 17:44:21 +00:00
|
|
|
register_avcodec(&theora_decoder);
|
2003-05-19 13:30:59 +00:00
|
|
|
register_avcodec(&asv1_decoder);
|
2003-09-01 08:10:01 +00:00
|
|
|
register_avcodec(&asv2_decoder);
|
2003-07-24 12:18:46 +00:00
|
|
|
register_avcodec(&vcr1_decoder);
|
2003-07-27 20:20:31 +00:00
|
|
|
register_avcodec(&cljr_decoder);
|
2003-06-01 00:56:05 +00:00
|
|
|
register_avcodec(&fourxm_decoder);
|
2003-08-22 14:59:04 +00:00
|
|
|
register_avcodec(&mdec_decoder);
|
2003-09-02 04:32:02 +00:00
|
|
|
register_avcodec(&roq_decoder);
|
|
|
|
register_avcodec(&interplay_video_decoder);
|
2003-09-08 04:10:59 +00:00
|
|
|
register_avcodec(&xan_wc3_decoder);
|
2003-10-01 04:39:38 +00:00
|
|
|
register_avcodec(&rpza_decoder);
|
|
|
|
register_avcodec(&cinepak_decoder);
|
|
|
|
register_avcodec(&msrle_decoder);
|
|
|
|
register_avcodec(&msvideo1_decoder);
|
2003-10-02 05:20:07 +00:00
|
|
|
register_avcodec(&vqa_decoder);
|
2003-10-03 05:43:03 +00:00
|
|
|
register_avcodec(&idcin_decoder);
|
2003-11-07 22:39:18 +00:00
|
|
|
register_avcodec(&eightbps_decoder);
|
2003-11-10 03:14:04 +00:00
|
|
|
register_avcodec(&smc_decoder);
|
2003-11-14 05:42:14 +00:00
|
|
|
register_avcodec(&flic_decoder);
|
2003-12-03 04:22:15 +00:00
|
|
|
register_avcodec(&truemotion1_decoder);
|
2004-01-02 04:45:06 +00:00
|
|
|
register_avcodec(&vmdvideo_decoder);
|
|
|
|
register_avcodec(&vmdaudio_decoder);
|
2004-01-12 22:14:45 +00:00
|
|
|
register_avcodec(&mszh_decoder);
|
|
|
|
register_avcodec(&zlib_decoder);
|
2002-06-11 13:41:41 +00:00
|
|
|
#ifdef CONFIG_AC3
|
|
|
|
register_avcodec(&ac3_decoder);
|
|
|
|
#endif
|
2003-06-13 08:31:40 +00:00
|
|
|
register_avcodec(&ra_144_decoder);
|
|
|
|
register_avcodec(&ra_288_decoder);
|
2003-09-02 04:32:02 +00:00
|
|
|
register_avcodec(&roq_dpcm_decoder);
|
|
|
|
register_avcodec(&interplay_dpcm_decoder);
|
2003-09-08 04:10:59 +00:00
|
|
|
register_avcodec(&xan_dpcm_decoder);
|
2004-02-05 05:22:44 +00:00
|
|
|
register_avcodec(&qtrle_decoder);
|
2004-02-18 01:49:30 +00:00
|
|
|
register_avcodec(&flac_decoder);
|
2002-06-11 13:41:41 +00:00
|
|
|
#endif /* CONFIG_DECODERS */
|
|
|
|
|
2003-05-14 11:40:16 +00:00
|
|
|
#ifdef AMR_NB
|
|
|
|
register_avcodec(&amr_nb_decoder);
|
2003-10-15 03:20:40 +00:00
|
|
|
#ifdef CONFIG_ENCODERS
|
2003-06-05 14:30:52 +00:00
|
|
|
register_avcodec(&amr_nb_encoder);
|
2003-10-15 03:20:40 +00:00
|
|
|
#endif //CONFIG_ENCODERS
|
2003-05-14 11:40:16 +00:00
|
|
|
#endif /* AMR_NB */
|
2003-09-28 20:34:11 +00:00
|
|
|
|
|
|
|
#ifdef AMR_WB
|
|
|
|
register_avcodec(&amr_wb_decoder);
|
2003-10-15 03:20:40 +00:00
|
|
|
#ifdef CONFIG_ENCODERS
|
2003-09-28 20:34:11 +00:00
|
|
|
register_avcodec(&amr_wb_encoder);
|
2003-10-15 03:20:40 +00:00
|
|
|
#endif //CONFIG_ENCODERS
|
2003-09-28 20:34:11 +00:00
|
|
|
#endif /* AMR_WB */
|
|
|
|
|
2002-06-11 13:41:41 +00:00
|
|
|
/* pcm codecs */
|
|
|
|
|
2003-10-15 03:20:40 +00:00
|
|
|
#ifdef CONFIG_ENCODERS
|
2002-06-11 13:41:41 +00:00
|
|
|
#define PCM_CODEC(id, name) \
|
|
|
|
register_avcodec(& name ## _encoder); \
|
|
|
|
register_avcodec(& name ## _decoder); \
|
|
|
|
|
2003-10-15 03:20:40 +00:00
|
|
|
#else
|
|
|
|
#define PCM_CODEC(id, name) \
|
|
|
|
register_avcodec(& name ## _decoder);
|
|
|
|
#endif
|
|
|
|
|
2002-06-11 13:41:41 +00:00
|
|
|
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);
|
|
|
|
|
2002-07-20 20:05:50 +00:00
|
|
|
/* adpcm codecs */
|
|
|
|
PCM_CODEC(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt);
|
|
|
|
PCM_CODEC(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav);
|
2003-09-08 04:10:59 +00:00
|
|
|
PCM_CODEC(CODEC_ID_ADPCM_IMA_DK3, adpcm_ima_dk3);
|
|
|
|
PCM_CODEC(CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4);
|
2003-10-01 04:39:38 +00:00
|
|
|
PCM_CODEC(CODEC_ID_ADPCM_IMA_WS, adpcm_ima_ws);
|
2004-02-03 04:27:17 +00:00
|
|
|
PCM_CODEC(CODEC_ID_ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg);
|
2002-07-20 20:05:50 +00:00
|
|
|
PCM_CODEC(CODEC_ID_ADPCM_MS, adpcm_ms);
|
2003-06-03 13:58:44 +00:00
|
|
|
PCM_CODEC(CODEC_ID_ADPCM_4XM, adpcm_4xm);
|
2003-10-15 03:20:40 +00:00
|
|
|
PCM_CODEC(CODEC_ID_ADPCM_XA, adpcm_xa);
|
|
|
|
PCM_CODEC(CODEC_ID_ADPCM_ADX, adpcm_adx);
|
2004-02-03 04:27:17 +00:00
|
|
|
PCM_CODEC(CODEC_ID_ADPCM_EA, adpcm_ea);
|
2004-02-07 08:20:00 +00:00
|
|
|
PCM_CODEC(CODEC_ID_ADPCM_EA, adpcm_g726);
|
2002-07-20 20:05:50 +00:00
|
|
|
|
2002-06-11 13:41:41 +00:00
|
|
|
#undef PCM_CODEC
|
2003-11-10 15:29:20 +00:00
|
|
|
|
|
|
|
/* parsers */
|
|
|
|
av_register_codec_parser(&mpegvideo_parser);
|
|
|
|
av_register_codec_parser(&mpeg4video_parser);
|
|
|
|
av_register_codec_parser(&h263_parser);
|
|
|
|
av_register_codec_parser(&h264_parser);
|
|
|
|
|
|
|
|
av_register_codec_parser(&mpegaudio_parser);
|
|
|
|
#ifdef CONFIG_AC3
|
|
|
|
av_register_codec_parser(&ac3_parser);
|
|
|
|
#endif
|
2002-06-11 13:41:41 +00:00
|
|
|
}
|
|
|
|
|