提交 d771bcae 编写于 作者: F Fabrice Bellard

added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi:...

added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)


Originally committed as revision 9 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 980fc7b8
......@@ -74,3 +74,19 @@ if [ "$gprof" = "yes" ] ; then
echo "TARGET_GPROF=yes" >> config.mak
echo "#define HAVE_GPROF 1" >> config.h
fi
# if you do not want to use encoders, disable that.
echo "#define CONFIG_ENCODERS 1" >> config.h
echo "CONFIG_ENCODERS=yes" >> config.mak
# if you do not want to use decoders, disable that.
echo "#define CONFIG_DECODERS 1" >> config.h
echo "CONFIG_DECODERS=yes" >> config.mak
# special AC3 and MPGLIB enabling stuff in case you already have it
# without libavcodec.
echo "#define CONFIG_AC3 1" >> config.h
echo "CONFIG_AC3=yes" >> config.mak
echo "#define CONFIG_MPGLIB 1" >> config.h
echo "CONFIG_MPGLIB=yes" >> config.mak
......@@ -126,7 +126,6 @@ void register_all(void)
{
avcodec_init();
avcodec_register_all();
avcodec_register_more();
register_avformat(&mp2_format);
register_avformat(&ac3_format);
......
......@@ -10,14 +10,18 @@ OBJS= common.o utils.o mpegvideo.o h263.o jrevdct.o jfdctfst.o \
ASM_OBJS=
# currently using libac3 for ac3 decoding
ifeq ($(CONFIG_AC3),yes)
OBJS+= ac3dec.o \
libac3/bit_allocate.o libac3/bitstream.o libac3/downmix.o \
libac3/imdct.o libac3/parse.o
endif
# currently using mpglib for mpeg audio decoding
ifeq ($(CONFIG_MPGLIB),yes)
OBJS+= mpegaudiodec.o \
mpglib/layer1.o mpglib/layer2.o mpglib/layer3.o \
mpglib/dct64_i386.o mpglib/decode_i386.o mpglib/tabinit.o
endif
# i386 mmx specific stuff
ifeq ($(TARGET_MMX),yes)
......@@ -71,3 +75,10 @@ imgresample-test: imgresample.c
dct-test: dct-test.o jfdctfst.o i386/fdct_mmx.o i386/fdctdata.o fdctref.o
$(CC) -o $@ $^
#
# include dependency files if they exist
#
ifneq ($(wildcard .depend),)
include .depend
endif
......@@ -178,12 +178,3 @@ AVCodec ac3_decoder = {
ac3_decode_end,
ac3_decode_frame,
};
/* register codecs which could clash with mplayer symbols */
/* XXX: rename all symbols to avoid clashed */
void avcodec_register_more(void)
{
register_avcodec(&mp3_decoder);
register_avcodec(&ac3_decoder);
}
......@@ -174,4 +174,3 @@ int avcodec_encode_video(AVCodecContext *avctx, UINT8 *buf, int buf_size,
int avcodec_close(AVCodecContext *avctx);
void avcodec_register_all(void);
void avcodec_register_more(void);
......@@ -244,6 +244,8 @@ void avcodec_init(void)
/* simple call to use all the codecs */
void avcodec_register_all(void)
{
/* encoders */
#ifdef CONFIG_ENCODERS
register_avcodec(&ac3_encoder);
register_avcodec(&mp2_encoder);
register_avcodec(&mpeg1video_encoder);
......@@ -253,15 +255,25 @@ void avcodec_register_all(void)
register_avcodec(&mjpeg_encoder);
register_avcodec(&opendivx_encoder);
register_avcodec(&msmpeg4_encoder);
#endif /* CONFIG_ENCODERS */
register_avcodec(&pcm_codec);
register_avcodec(&rawvideo_codec);
/* decoders */
#ifdef CONFIG_DECODERS
register_avcodec(&h263_decoder);
register_avcodec(&opendivx_decoder);
register_avcodec(&msmpeg4_decoder);
register_avcodec(&mpeg_decoder);
register_avcodec(&h263i_decoder);
register_avcodec(&rv10_decoder);
#ifdef CONFIG_MPGLIB
register_avcodec(&mp3_decoder);
#endif
#ifdef CONFIG_AC3
register_avcodec(&ac3_decoder);
#endif
#endif /* CONFIG_DECODERS */
}
static int encode_init(AVCodecContext *s)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册