changeset 10095:51da0282b302

Theora demuxer/codec support, patch by David Kuehling <dvdkhlng@gmx.de>
author arpi
date Sun, 11 May 2003 18:29:07 +0000
parents 5730f6098f98
children 896c5b8856d2
files Makefile configure etc/codecs.conf libmpcodecs/Makefile libmpcodecs/vd.c
diffstat 5 files changed, 52 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sun May 11 18:26:48 2003 +0000
+++ b/Makefile	Sun May 11 18:29:07 2003 +0000
@@ -35,7 +35,7 @@
 
 VO_LIBS = $(AA_LIB) $(X_LIB) $(SDL_LIB) $(GGI_LIB) $(MP1E_LIB) $(MLIB_LIB) $(SVGA_LIB) $(DIRECTFB_LIB) 
 AO_LIBS = $(ARTS_LIB) $(ESD_LIB) $(NAS_LIB) $(SGIAUDIO_LIB)
-CODEC_LIBS = $(AV_LIB) $(FAME_LIB) $(MAD_LIB) $(VORBIS_LIB) $(FAAD_LIB) $(LIBLZO_LIB) $(DECORE_LIB) $(XVID_LIB) $(PNG_LIB) $(Z_LIB) $(JPEG_LIB) $(ALSA_LIB) $(XMMS_LIB) $(MATROSKA_LIB)
+CODEC_LIBS = $(AV_LIB) $(FAME_LIB) $(MAD_LIB) $(VORBIS_LIB) $(THEORA_LIB) $(FAAD_LIB) $(LIBLZO_LIB) $(DECORE_LIB) $(XVID_LIB) $(PNG_LIB) $(Z_LIB) $(JPEG_LIB) $(ALSA_LIB) $(XMMS_LIB) $(MATROSKA_LIB) 
 COMMON_LIBS = libmpcodecs/libmpcodecs.a mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a $(W32_LIB) $(DS_LIB) libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a $(CSS_LIB) $(CODEC_LIBS) $(FREETYPE_LIB) $(TERMCAP_LIB) $(CDPARANOIA_LIB) $(STREAMING_LIB) $(WIN32_LIB) $(GIF_LIB) $(MACOSX_FRAMEWORKS) $(SMBSUPPORT_LIB) $(FRIBIDI_LIB)
 
 CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader -Ilibvo $(FREETYPE_INC) $(EXTRA_INC) $(CDPARANOIA_INC) $(SDL_INC) $(FRIBIDI_INC) # -Wall
--- a/configure	Sun May 11 18:26:48 2003 +0000
+++ b/configure	Sun May 11 18:29:07 2003 +0000
@@ -189,6 +189,7 @@
   --enable-libfame       enable libfame realtime encoder [autodetect]
   --enable-vorbis        build with OggVorbis support [autodetect]
   --enable-tremor        build with integer-only OggVorbis support [disabled]
+  --enable-theora        build with OggTheora support [autodetect]
   --enable-matroska      build with Matroska support [autodetect]
   --enable-faad          build with FAAD2 (MP4/AAC) support [autodetect]
   --disable-libdv        disable libdv 0.9.5 en/decoding support [autodetect]
@@ -1026,6 +1027,7 @@
 _liblzo=auto
 _mad=auto
 _vorbis=auto
+_theora=auto
 _matroska=auto
 _tremor=no
 _faad=auto
@@ -1180,6 +1182,8 @@
   --disable-vorbis)	_vorbis=no	;;
   --enable-tremor)	_tremor=yes	;;
   --disable-tremor)	_tremor=no	;;
+  --enable-theora)	_theora=yes	;;
+  --disable-theora)	_theora=no	;;
   --enable-matroska)    _matroska=yes   ;;
   --disable-matroska)   _matroska=no    ;;
   --enable-faad)	_faad=yes	;;
@@ -4028,6 +4032,25 @@
 fi
 echores "$_vorbis"
 
+echocheck "OggTheora support"
+if test "$_theora" = auto ; then
+  _theora=no
+  cat > $TMPC << EOF
+#include <theora/theora.h>
+int main(void) { theora_version_number (); return 0; }
+EOF
+  cc_check -ltheora -logg -lm && _theora=yes
+fi
+if test "$_theora" = yes ; then
+  _def_theora='#define HAVE_OGGTHEORA 1'
+  _codecmodules="libtheora $_codecmodules"
+  _ld_theora="-ltheora"
+else
+  _def_theora='#undef HAVE_OGGTHEORA'
+  _nocodecmodules="libtheora $_nocodecmodules"
+fi
+echores "$_theora"
+
 
 echocheck "Matroska support"
 if test "$_matroska" != no ; then
@@ -5272,6 +5295,7 @@
 LIBLZO_LIB= $_ld_liblzo
 MAD_LIB = $_ld_mad
 VORBIS_LIB = $_ld_vorbis $_ld_libdv
+THEORA_LIB = $_ld_theora
 FAAD_LIB = $_ld_faad
 SMBSUPPORT_LIB = $_ld_smb
 XMMS_PLUGINS = $_xmms
@@ -5687,6 +5711,9 @@
 /* enable Tremor as vorbis decoder */
 $_def_tremor
 
+/* enable OggTheora support */
+$_def_theora
+
 /* enable Matroska support */
 $_def_matroska
 $_def_matroska_gcc2
--- a/etc/codecs.conf	Sun May 11 18:26:48 2003 +0000
+++ b/etc/codecs.conf	Sun May 11 18:29:07 2003 +0000
@@ -12,6 +12,15 @@
 ; mpeg 1/2 decoding:
 ; Note: mpegpes is preferred for hw decoders:
 
+videocodec theora
+  info "Theora (free, reworked VP3)"
+  status working
+  fourcc theo
+  format 0xFFFC
+  driver theora
+  dll libtheora
+  out YV12
+
 videocodec mpegpes
   info "Mpeg PES output (.mpg or Dxr3/DVB card)"
   comment "for hardware decoding"
@@ -958,6 +967,14 @@
   dll rv10
   out YV12,I420,IYUV
 
+videocodec ffvp3
+  info "FFmpeg's VP3-Codec"
+  status untested
+  fourcc VP30,vp30,VP31,vp31
+  driver ffmpeg
+  dll "vp3"
+  out YV12
+
 videocodec vp3
   info "On2 OpenSource VP3-Codec"
   status working
--- a/libmpcodecs/Makefile	Sun May 11 18:26:48 2003 +0000
+++ b/libmpcodecs/Makefile	Sun May 11 18:29:07 2003 +0000
@@ -11,7 +11,7 @@
 
 VIDEO_SRCS_LIB=vd_libmpeg2.c vd_nuv.c vd_lzo.c
 VIDEO_SRCS_NAT=vd_null.c vd_cinepak.c vd_qtrpza.c vd_raw.c vd_msvidc.c vd_fli.c vd_qtrle.c vd_qtsmc.c vd_roqvideo.c vd_cyuv.c vd_msrle.c vd_huffyuv.c vd_mpegpes.c vd_svq1.c vd_lcl.c vd_mtga.c vd_sgi.c
-VIDEO_SRCS_OPT=vd_realvid.c vd_ffmpeg.c vd_dshow.c vd_dmo.c vd_vfw.c vd_vfwex.c vd_odivx.c vd_divx4.c vd_xanim.c vd_xvid.c vd_libdv.c vd_qtvideo.c
+VIDEO_SRCS_OPT=vd_realvid.c vd_ffmpeg.c vd_dshow.c vd_dmo.c vd_vfw.c vd_vfwex.c vd_odivx.c vd_divx4.c vd_xanim.c vd_xvid.c vd_libdv.c vd_qtvideo.c vd_theora.c
 VIDEO_SRCS=dec_video.c vd.c $(VIDEO_SRCS_NAT) $(VIDEO_SRCS_LIB) $(VIDEO_SRCS_OPT)
 
 VFILTER_SRCS=vf.c vf_vo.c vf_crop.c vf_expand.c vf_pp.c vf_scale.c vf_format.c vf_yuy2.c vf_flip.c vf_rgb2bgr.c vf_rotate.c vf_mirror.c vf_palette.c vf_lavc.c vf_dvbscale.c vf_cropdetect.c vf_test.c vf_noise.c vf_yvu9.c vf_rectangle.c vf_lavcdeint.c vf_eq.c vf_eq2.c vf_halfpack.c vf_dint.c vf_1bpp.c vf_bmovl.c vf_2xsai.c vf_unsharp.c vf_swapuv.c vf_il.c vf_boxblur.c vf_sab.c vf_smartblur.c vf_perspective.c vf_down3dright.c vf_field.c vf_denoise3d.c vf_hqdn3d.c vf_detc.c vf_telecine.c vf_tfields.c vf_ivtc.c vf_ilpack.c vf_dsize.c
--- a/libmpcodecs/vd.c	Sun May 11 18:26:48 2003 +0000
+++ b/libmpcodecs/vd.c	Sun May 11 18:29:07 2003 +0000
@@ -2,6 +2,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#define USE_THEORA
+
 #include "config.h"
 #include "mp_msg.h"
 #include "help_mp.h"
@@ -29,6 +31,7 @@
 extern vd_functions_t mpcodecs_vd_cinepak;
 extern vd_functions_t mpcodecs_vd_qtrpza;
 extern vd_functions_t mpcodecs_vd_ffmpeg;
+extern vd_functions_t mpcodecs_vd_theora;
 extern vd_functions_t mpcodecs_vd_dshow;
 extern vd_functions_t mpcodecs_vd_dmo;
 extern vd_functions_t mpcodecs_vd_vfw;
@@ -67,6 +70,9 @@
 #ifdef USE_LIBAVCODEC
         &mpcodecs_vd_ffmpeg,
 #endif
+#ifdef HAVE_OGGTHEORA
+	&mpcodecs_vd_theora,
+#endif
 #ifdef USE_WIN32DLL
 #ifdef USE_DIRECTSHOW
         &mpcodecs_vd_dshow,