changeset 338:1a38b3b4ea28 libavcodec

* using liba52
author kabi
date Mon, 22 Apr 2002 19:57:45 +0000
parents 8899c3b35b57
children b743a6bbab25
files Makefile a52dec.c
diffstat 2 files changed, 15 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Mon Apr 22 19:57:26 2002 +0000
+++ b/Makefile	Mon Apr 22 19:57:45 2002 +0000
@@ -10,11 +10,15 @@
       ratecontrol.o
 ASM_OBJS=
 
-# currently using libac3 for ac3 decoding
+# currently using liba52 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
+OBJS+= a52dec.o
+endif
+
+# using builtin liba52 or runtime linked liba52.so.0
+ifeq ($(CONFIG_A52BIN),no)
+OBJS+= liba52/bit_allocate.o liba52/bitstream.o liba52/downmix.o \
+	liba52/imdct.o  liba52/parse.o
 endif
 
 ifeq ($(CONFIG_MP3LAME),yes)
@@ -30,7 +34,7 @@
 ifeq ($(TARGET_MMX),yes)
 OBJS += i386/fdct_mmx.o i386/cputest.o \
 	i386/dsputil_mmx.o i386/mpegvideo_mmx.o \
-        i386/idct_mmx.o i386/motion_est_mmx.o \
+	i386/idct_mmx.o i386/motion_est_mmx.o \
 	i386/simple_idct_mmx.o
 endif
 
@@ -91,8 +95,8 @@
 	   armv4l/*.o armv4l/*~ \
 	   mlib/*.o mlib/*~ \
 	   alpha/*.o alpha/*~ \
-           libac3/*.o libac3/*~ \
-           apiexample $(TESTS)
+	   liba52/*.o liba52/*~ \
+	   apiexample $(TESTS)
 
 distclean: clean
 	rm -f Makefile.bak .depend
--- a/a52dec.c	Mon Apr 22 19:57:26 2002 +0000
+++ b/a52dec.c	Mon Apr 22 19:57:45 2002 +0000
@@ -19,7 +19,7 @@
 #include "avcodec.h"
 #include "liba52/a52.h"
 
-#ifdef LIBAVCODEC_A52BIN
+#ifdef CONFIG_A52BIN
 #include <dlfcn.h>
 static const char* liba52name = "liba52.so.0";
 #endif
@@ -62,7 +62,7 @@
 
 } AC3DecodeState;
 
-#ifdef LIBAVCODEC_A52BIN
+#ifdef CONFIG_A52BIN
 static void* dlsymm(void* handle, const char* symbol)
 {
     void* f = dlsym(handle, symbol);
@@ -76,7 +76,7 @@
 {
     AC3DecodeState *s = avctx->priv_data;
 
-#ifdef LIBAVCODEC_A52BIN
+#ifdef CONFIG_A52BIN
     s->handle = dlopen(liba52name, RTLD_LAZY);
     if (!s->handle)
     {
@@ -95,7 +95,6 @@
 	dlclose(s->handle);
         return -1;
     }
-    printf("INITIALIZED\n");
 #else
     /* static linked version */
     s->handle = 0;
@@ -233,7 +232,7 @@
 {
     AC3DecodeState *s = avctx->priv_data;
     s->a52_free(s->state);
-#ifdef LIBAVCODEC_A52BIN
+#ifdef CONFIG_A52BIN
     dlclose(s->handle);
 #endif
     return 0;