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
{
avcodec_init();
avcodec_register_all();
- avcodec_register_more();
register_avformat(&mp2_format);
register_avformat(&ac3_format);
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)
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
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);
-}
-
int avcodec_close(AVCodecContext *avctx);
void avcodec_register_all(void);
-void avcodec_register_more(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);
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)