[SCM] libav/experimental: added CONFIG_AC3, CONFIG_MPGLIB, CONFIG_DECODERS and CONFIG_ENCODERS (Arpi: don't forget to put CONFIG_DECODERS in mplayer)

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:29:40 UTC 2013


The following commit has been merged in the experimental branch:
commit d771bcae33d7503796235d2199186a821582cd09
Author: Fabrice Bellard <fabrice at bellard.org>
Date:   Mon Jul 23 20:58:31 2001 +0000

    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

diff --git a/configure b/configure
index df3087a..568e24d 100755
--- a/configure
+++ b/configure
@@ -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
diff --git a/libav/utils.c b/libav/utils.c
index 9018d0f..b29961c 100644
--- a/libav/utils.c
+++ b/libav/utils.c
@@ -126,7 +126,6 @@ void register_all(void)
 {
     avcodec_init();
     avcodec_register_all();
-    avcodec_register_more();
 
     register_avformat(&mp2_format);
     register_avformat(&ac3_format);
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index e6dbe85..3c79f40 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -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
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 7332a11..ac8789b 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -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);
-}
-
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 8516d2a..f3462aa 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -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);
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 9497f90..39801f4 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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)

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list