01-makefile_fix_updated.patch

Adds --enable-theora/--enable-vorbis/--enable-ogg to configure
   If compiled WITHOUT --enable-theora, native VP3 decoder is used
patch by (Nilesh Bansal <nileshbansal gmail com>)

Originally committed as revision 3975 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Nilesh Bansal 20 years ago committed by Michael Niedermayer
parent 738386a5ed
commit 5c5dea3f0c
  1. 10
      Makefile
  2. 42
      configure
  3. 9
      libavcodec/Makefile
  4. 6
      libavcodec/allcodecs.c
  5. 4
      libavcodec/avcodec.h
  6. 2
      libavformat/Makefile
  7. 2
      libavformat/allformats.c
  8. 2
      libavformat/nut.c

@ -43,8 +43,14 @@ EXTRALIBS+=-lmp3lame
endif
endif
ifeq ($(CONFIG_VORBIS),yes)
EXTRALIBS+=-lvorbis -lvorbisenc -logg
ifeq ($(CONFIG_LIBOGG),yes)
EXTRALIBS+= -logg
ifeq ($(CONFIG_LIBVORBIS),yes)
EXTRALIBS+= -lvorbis -lvorbisenc
endif
ifeq ($(CONFIG_LIBTHEORA),yes)
EXTRALIBS+= -ltheora
endif
endif
ifeq ($(CONFIG_FAAD),yes)

42
configure vendored

@ -15,7 +15,9 @@ echo " --help print this message"
echo " --prefix=PREFIX install in PREFIX [$prefix]"
echo " --mandir=DIR man documentation in DIR [PREFIX/man]"
echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
echo " --enable-vorbis enable vorbis support via libvorbisenc [default=no]"
echo " --enable-ogg enable ogg support via libogg [default=no]"
echo " --enable-vorbis enable vorbis support via libvorbis [default=no]"
echo " --enable-theora enable theora support via libtheora [default=no]"
echo " --enable-faad enable faad support via libfaad [default=no]"
echo " --enable-faadbin build faad support with runtime linking [default=no]"
echo " --enable-faac enable faac support via libfaac [default=no]"
@ -149,7 +151,9 @@ dc1394="no"
network="yes"
zlib="yes"
mp3lame="no"
ogg="no"
vorbis="no"
theora="no"
faad="no"
faadbin="no"
faac="no"
@ -410,8 +414,12 @@ for opt do
;;
--enable-mp3lame) mp3lame="yes"
;;
--enable-ogg) ogg="yes"
;;
--enable-vorbis) vorbis="yes"
;;
--enable-theora) theora="yes"
;;
--enable-faad) faad="yes"
;;
--enable-faadbin) faadbin="yes"
@ -461,6 +469,22 @@ for opt do
esac
done
if test "$theora" = "yes" ; then
if test "$ogg" = "no" ; then
echo "Ogg must be enabled to enable Theora"
fail="yes"
theora="no"
fi
fi
if test "$vorbis" = "yes" ; then
if test "$ogg" = "no" ; then
echo "Ogg must be enabled to enable Vorbis"
fail="yes"
vorbis="no"
fi
fi
if test "$gpl" != "yes"; then
if test "$pp" != "no" -o "$shared_pp" != "no"; then
echo "The Postprocessing code is under GPL and --enable-gpl is not specified"
@ -1040,7 +1064,9 @@ fi
echo "gprof enabled $gprof"
echo "zlib enabled $zlib"
echo "mp3lame enabled $mp3lame"
echo "ogg enabled $ogg"
echo "vorbis enabled $vorbis"
echo "theora enabled $theora"
echo "faad enabled $faad"
echo "faadbin enabled $faadbin"
echo "faac enabled $faac"
@ -1335,9 +1361,19 @@ if test "$mp3lame" = "yes" ; then
echo "CONFIG_MP3LAME=yes" >> config.mak
fi
if test "$ogg" = "yes" ; then
echo "#define CONFIG_LIBOGG 1" >> $TMPH
echo "CONFIG_LIBOGG=yes" >> config.mak
fi
if test "$vorbis" = "yes" ; then
echo "#define CONFIG_VORBIS 1" >> $TMPH
echo "CONFIG_VORBIS=yes" >> config.mak
echo "#define CONFIG_LIBVORBIS 1" >> $TMPH
echo "CONFIG_LIBVORBIS=yes" >> config.mak
fi
if test "$theora" = "yes" ; then
echo "#define CONFIG_LIBTHEORA 1" >> $TMPH
echo "CONFIG_LIBTHEORA=yes" >> config.mak
fi
if test "$faad" = "yes" ; then

@ -118,10 +118,17 @@ OBJS += mp3lameaudio.o
EXTRALIBS += -lmp3lame
endif
ifeq ($(CONFIG_VORBIS),yes)
ifeq ($(CONFIG_LIBOGG),yes)
EXTRALIBS += -logg
ifeq ($(CONFIG_LIBVORBIS),yes)
OBJS += oggvorbis.o
EXTRALIBS += -lvorbis -lvorbisenc
endif
ifeq ($(CONFIG_LIBTHEORA), yes)
OBJS += oggtheora.o
EXTRALIBS += -ltheora
endif
endif
ifeq ($(TARGET_GPROF),yes)
CFLAGS+=-p

@ -45,10 +45,14 @@ void avcodec_register_all(void)
#ifdef CONFIG_MP3LAME
register_avcodec(&mp3lame_encoder);
#endif
#ifdef CONFIG_VORBIS
#ifdef CONFIG_LIBVORBIS
register_avcodec(&oggvorbis_encoder);
register_avcodec(&oggvorbis_decoder);
#endif
#ifdef CONFIG_LIBTHEORA
register_avcodec(&oggtheora_encoder);
register_avcodec(&oggtheora_decoder);
#endif
#ifdef CONFIG_FAAC
register_avcodec(&faac_encoder);
#endif

@ -165,6 +165,8 @@ enum CodecID {
CODEC_ID_MP3ADU,
CODEC_ID_MP3ON4,
CODEC_ID_OGGTHEORA= 0x16000,
CODEC_ID_MPEG2TS= 0x20000, /* _FAKE_ codec to indicate a raw MPEG2 transport
stream (only used by libavformat) */
};
@ -1877,6 +1879,7 @@ extern AVCodec ac3_encoder;
extern AVCodec mp2_encoder;
extern AVCodec mp3lame_encoder;
extern AVCodec oggvorbis_encoder;
extern AVCodec oggtheora_encoder;
extern AVCodec faac_encoder;
extern AVCodec xvid_encoder;
extern AVCodec mpeg1video_encoder;
@ -1954,6 +1957,7 @@ extern AVCodec mace6_decoder;
extern AVCodec huffyuv_decoder;
extern AVCodec ffvhuff_decoder;
extern AVCodec oggvorbis_decoder;
extern AVCodec oggtheora_decoder;
extern AVCodec cyuv_decoder;
extern AVCodec h264_decoder;
extern AVCodec indeo3_decoder;

@ -67,7 +67,7 @@ OBJS+= barpainet.o
endif
endif
ifeq ($(CONFIG_VORBIS),yes)
ifeq ($(CONFIG_LIBOGG),yes)
OBJS+= ogg.o
endif

@ -82,7 +82,7 @@ void av_register_all(void)
#endif
yuv4mpeg_init();
#ifdef CONFIG_VORBIS
#ifdef CONFIG_LIBOGG
ogg_init();
#endif

@ -1433,7 +1433,7 @@ static AVOutputFormat nut_oformat = {
"video/x-nut",
"nut",
sizeof(NUTContext),
#ifdef CONFIG_VORBIS
#ifdef CONFIG_LIBVORBIS
CODEC_ID_VORBIS,
#elif defined(CONFIG_MP3LAME)
CODEC_ID_MP3,

Loading…
Cancel
Save