Ok, i'm attaching a quick and dirty hack for current svn version of freej to build it on debian unstable with gcc-4.1 .
Please note that this patch will use system libraries, thus the following packages are needed: libavcodec-dev libavformat-dev libflash-dev libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev libshout3-dev libtheora-dev HTH luca -- Beware of programmers who carry screwdrivers. -- Leonard Brandwein http://shammash.homelinux.org/ - http://www.artha.org/ - http://www.yue.it/
diff -Naurp trunk/autogen.sh mytrunk/autogen.sh --- trunk/autogen.sh 2006-08-07 13:32:51.000000000 +0200 +++ mytrunk/autogen.sh 2006-08-07 13:33:54.000000000 +0200 @@ -31,7 +31,7 @@ DIE=0 (automake --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have automake installed to compile $package." - echo "Download the appropriate package for your system, + echo "Download the appropriate package for your system," echo "or get the source from one of the GNU ftp sites" echo "listed in http://www.gnu.org/order/ftp.html" DIE=1 @@ -40,7 +40,7 @@ DIE=0 ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have libtool installed to compile $package." - echo "Download the appropriate package for your system, + echo "Download the appropriate package for your system," echo "or get the source from one of the GNU ftp sites" echo "listed in http://www.gnu.org/order/ftp.html" DIE=1 diff -Naurp trunk/configure.in mytrunk/configure.in --- trunk/configure.in 2006-08-07 13:32:51.000000000 +0200 +++ mytrunk/configure.in 2006-08-07 15:45:47.000000000 +0200 @@ -139,9 +139,9 @@ dnl AC_HEADER_DIRENT dnl ============================================================== dnl Check OGG/THEORA MMX STUFF dnl ============================================================== -THEORA_LIBS="" -THEORA_MMX_DIR="" -THEORA_MMX_INCLUDE="" +#THEORA_LIBS="" +#THEORA_MMX_DIR="" +#THEORA_MMX_INCLUDE="" PKG_CHECK_MODULES(XIPH, ogg >= 1.1 vorbis vorbisenc, have_oggtheora=yes, have_oggtheora=no) if test x$have_oggtheora = xyes ; then @@ -155,18 +155,18 @@ if test x$have_oggtheora = xyes ; then AC_DEFINE(CONFIG_OGGVORBIS_DECODER,1,[define if compiling FFMpeg with oggvorbis decoder]) AC_DEFINE(CONFIG_OGGTHEORA_ENCODER,1,[define if compiling FFMpeg with oggtheora encoder]) AC_DEFINE(CONFIG_OGGTHEORA_DECODER,1,[define if compiling FFMpeg with oggtheora decoder]) - THEORA_LIBS="\$(top_srcdir)/lib/theora-mmx/libtheora.a \$(top_srcdir)/lib/shout/libshout.a" - THEORA_MMX_DIR="theora-mmx shout" - THEORA_MMX_INCLUDE="-I\$(top_srcdir)/lib/theora-mmx" +# THEORA_LIBS="\$(top_srcdir)/lib/theora-mmx/libtheora.a \$(top_srcdir)/lib/shout/libshout.a" +# THEORA_MMX_DIR="theora-mmx shout" +# THEORA_MMX_INCLUDE="-I\$(top_srcdir)/lib/theora-mmx" if test x$static_build = xyes ; then XIPH_LIBS="`pkg-config --variable=prefix ogg`/lib/libogg.a" XIPH_LIBS="$XIPH_LIBS `pkg-config --variable=prefix vorbis`/lib/libvorbis.a" XIPH_LIBS="$XIPH_LIBS `pkg-config --variable=prefix vorbis`/lib/libvorbisenc.a" fi fi -AC_SUBST(THEORA_LIBS) -AC_SUBST(THEORA_MMX_DIR) -AC_SUBST(THEORA_MMX_INCLUDE) +#AC_SUBST(THEORA_LIBS) +#AC_SUBST(THEORA_MMX_DIR) +#AC_SUBST(THEORA_MMX_INCLUDE) AC_SUBST(XIPH_LIBS) @@ -184,21 +184,21 @@ dnl AVCODEC AVFORMAT STUFF dnl ============================================================== dnl put a disable flag AC_DEFINE(WITH_AVCODEC,1,[define if compiling movie layer linking to ffmpeg libavcodec]) -AVCODEC_SUBDIRS="" -AVCODEC_LIBS="\$(top_srcdir)/lib/avcodec/libavcodec.a" -AVFORMAT_LIBS="\$(top_srcdir)/lib/avformat/libavformat.a" -if test x$have_mmx = xyes ; then - AVCODEC_SUBDIRS="i386" - AVCODEC_LIBS="$AVCODEC_LIBS \$(top_srcdir)/lib/avcodec/i386/libavcodecmmx.a" -fi -if test x$have_ppc = xyes ; then - AVCODEC_SUBDIRS="ppc" - AVCODEC_LIBS="$AVCODEC_LIBS \$(top_srcdir)/lib/avcodec/ppc/libavcodecppc.a" -fi - -AC_SUBST(AVFORMAT_LIBS) -AC_SUBST(AVCODEC_SUBDIRS) -AC_SUBST(AVCODEC_LIBS) +#AVCODEC_SUBDIRS="" +#AVCODEC_LIBS="\$(top_srcdir)/lib/avcodec/libavcodec.a" +#AVFORMAT_LIBS="\$(top_srcdir)/lib/avformat/libavformat.a" +#if test x$have_mmx = xyes ; then +# AVCODEC_SUBDIRS="i386" +# AVCODEC_LIBS="$AVCODEC_LIBS \$(top_srcdir)/lib/avcodec/i386/libavcodecmmx.a" +#fi +#if test x$have_ppc = xyes ; then +# AVCODEC_SUBDIRS="ppc" +# AVCODEC_LIBS="$AVCODEC_LIBS \$(top_srcdir)/lib/avcodec/ppc/libavcodecppc.a" +#fi +# +#AC_SUBST(AVFORMAT_LIBS) +#AC_SUBST(AVCODEC_SUBDIRS) +#AC_SUBST(AVCODEC_LIBS) @@ -594,17 +594,7 @@ src/Makefile src/include/Makefile lib/Makefile lib/ccvt/Makefile -lib/theora-mmx/Makefile -lib/avformat/Makefile -lib/avcodec/Makefile -lib/avcodec/i386/Makefile -lib/avcodec/ppc/Makefile -lib/shout/Makefile lib/portaudio/Makefile -lib/sdl_image/Makefile -lib/sdl_gfx/Makefile -lib/sdl_ttf/Makefile -lib/flash/Makefile filters/Makefile filters/delaygrab/Makefile filters/rotozoom/Makefile diff -Naurp trunk/lib/Makefile.am mytrunk/lib/Makefile.am --- trunk/lib/Makefile.am 2006-08-07 13:32:51.000000000 +0200 +++ mytrunk/lib/Makefile.am 2006-08-07 15:40:51.000000000 +0200 @@ -1 +1 @@ -SUBDIRS = ccvt @THEORA_MMX_DIR@ avformat avcodec portaudio sdl_image sdl_gfx sdl_ttf javascript flash +SUBDIRS = ccvt javascript portaudio diff -Naurp trunk/src/ffmpeg_encoder.cpp mytrunk/src/ffmpeg_encoder.cpp --- trunk/src/ffmpeg_encoder.cpp 2006-08-07 13:32:36.000000000 +0200 +++ mytrunk/src/ffmpeg_encoder.cpp 2006-08-07 15:14:26.000000000 +0200 @@ -104,7 +104,7 @@ bool FFmpegEncoder::init(Context *_env) dump_format(afc, 0, filename, 1); // find the video encoder - AVCodecContext *acc=&video_stream->codec; + AVCodecContext *acc=video_stream->codec; AVCodec *codec = avcodec_find_encoder(acc->codec_id); if(!codec) { error("FFmpegEncoder:init::Couldn't find encoder"); @@ -173,7 +173,7 @@ bool FFmpegEncoder::write_frame() { int packet_size; double video_pts; - codec=&video_stream->codec; + codec=video_stream->codec; // TODO changed ffmpeg api :| // video_pts = (double)video_stream->pts.val * video_stream->time_base.num / video_stream->time_base.den; @@ -260,7 +260,7 @@ void FFmpegEncoder::convert_to_YUV420P() codec->height); } void FFmpegEncoder::set_encoding_parameter() { - AVCodecContext *acc=&video_stream->codec; + AVCodecContext *acc=video_stream->codec; /** Set video codec from the format context */ // acc->codec_id=aof->video_codec; diff -Naurp trunk/src/include/blitter.h mytrunk/src/include/blitter.h --- trunk/src/include/blitter.h 2006-08-07 13:32:36.000000000 +0200 +++ mytrunk/src/include/blitter.h 2006-08-07 14:47:40.000000000 +0200 @@ -115,7 +115,7 @@ class Blitter { bool fade_value(int step, int val); ///< fade to a new blit value bool pulse_value(int step, int val); ///< pulse it to a value and come back bool set_kernel(short *krn); /// set the convolution kernel - bool Blitter::set_colorkey(int x,int y); + bool set_colorkey(int x,int y); bool set_zoom(double x, double y); bool set_rotate(double angle); diff -Naurp trunk/src/include/linklist.h mytrunk/src/include/linklist.h --- trunk/src/include/linklist.h 2006-08-07 13:32:36.000000000 +0200 +++ mytrunk/src/include/linklist.h 2006-08-07 14:47:09.000000000 +0200 @@ -50,7 +50,7 @@ class Linklist { Entry *search(char *name); int *completion(char *needle); - Entry *Linklist::selected(); + Entry *selected(); Entry *operator[](int pos) { return pick(pos); }; diff -Naurp trunk/src/Makefile.am mytrunk/src/Makefile.am --- trunk/src/Makefile.am 2006-08-07 13:32:36.000000000 +0200 +++ mytrunk/src/Makefile.am 2006-08-07 16:11:27.000000000 +0200 @@ -1,17 +1,11 @@ INCLUDES = -I$(top_srcdir)/src/include \ -I$(top_srcdir)/lib/ccvt \ - -I$(top_srcdir)/lib/avformat \ - -I$(top_srcdir)/lib/avcodec \ - -I$(top_srcdir)/lib/shout \ -I$(top_srcdir)/lib/portaudio \ - -I$(top_srcdir)/lib/sdl_image \ - -I$(top_srcdir)/lib/sdl_gfx \ - -I$(top_srcdir)/lib/sdl_ttf \ -I$(top_srcdir)/lib/javascript \ -I$(top_srcdir)/lib/javascript/obj \ - -I$(top_srcdir)/lib/flash \ -I/usr/include/slang \ - @THEORA_MMX_INCLUDE@ + -I/usr/include/ffmpeg \ + -I/usr/include/SDL # -I$(top_srcdir)/lib/portaudio-v19/pa_common @@ -79,18 +73,15 @@ freej_SOURCES = \ impl_video_encoders.cpp freej_LDADD = $(top_srcdir)/lib/ccvt/libccvt.a \ - @THEORA_LIBS@ \ @XIPH_LIBS@ \ - @AVFORMAT_LIBS@ \ - @AVCODEC_LIBS@ \ $(top_srcdir)/lib/portaudio/libportaudio.a \ @PORTAUDIO_LIBS@ \ - $(top_srcdir)/lib/sdl_image/libsdl_image.a \ - $(top_srcdir)/lib/sdl_gfx/libsdl_gfx.a \ - $(top_srcdir)/lib/sdl_ttf/libsdl_ttf.a \ $(top_srcdir)/lib/javascript/obj/libjs.a \ - $(top_srcdir)/lib/flash/libflash.a \ -ldl -lpthread -lm -lslang -lpng -ljpeg \ + -lSDL_ttf -lSDL_image -lSDL_gfx \ + -lshout -lvorbis -ltheora -lspeex -logg \ + -lavformat -lavcodec -ldts -ldc1394_control -lgsm -lz -lvorbisenc -lraw1394 -lavutil \ + -lflash \ @STATIC_LIBS@ \ @OPENGL_LIB@ \ @SDL_LIBS@ \ diff -Naurp trunk/src/video_layer.cpp mytrunk/src/video_layer.cpp --- trunk/src/video_layer.cpp 2006-08-07 13:32:36.000000000 +0200 +++ mytrunk/src/video_layer.cpp 2006-08-07 15:04:24.000000000 +0200 @@ -202,7 +202,7 @@ bool VideoLayer::open(char *file) { */ for(int i=0; i < avformat_context -> nb_streams; i++) { avformat_stream = avformat_context -> streams[i]; - enc = &avformat_stream->codec; + enc = avformat_stream->codec; if(enc == NULL) printf("enc nullo\n"); //notice("VideoLayer:: Codec type= %d\n",enc->codec_type); @@ -248,7 +248,7 @@ bool VideoLayer::open(char *file) { return false; } avformat_stream = avformat_context -> streams [video_index]; - enc = &avformat_stream -> codec; + enc = avformat_stream -> codec; full_filename = strdup (file); return true; } @@ -347,7 +347,7 @@ bool VideoLayer::open(char *file) { /** * yuv2rgb */ - img_convert(rgba_picture, PIX_FMT_RGBA32, (AVPicture *)yuv_picture, avformat_stream->codec.pix_fmt, + img_convert(rgba_picture, PIX_FMT_RGBA32, (AVPicture *)yuv_picture, avformat_stream->codec->pix_fmt, enc->width, enc->height);