Bah!

The Windows build is using revision 32674 of MPlayer for "mencoder-alternate", so I tried checking out and building that. Note that this revision of MPlayer automatically checks out a version of FFmpeg as well, as opposed to more recent MPlayer revisions.
At first compiling did not work at all, until I realized that you have to configure, build and install the older version of FFmpeg first because of dependencies on header files. (Running the script builds and installs a newer and incompatible version of the FFmpeg header files in the $TARGET/include directory)
But even with that fixed, I end up with an error:
- Code: Select all
libmpcodecs/vd_mpng.c: In function 'pngReadFN':
libmpcodecs/vd_mpng.c:77: error: dereferencing pointer to incomplete type
libmpcodecs/vd_mpng.c: In function 'decode':
libmpcodecs/vd_mpng.c:114: error: dereferencing pointer to incomplete type
libmpcodecs/vd_mpng.c:131: error: dereferencing pointer to incomplete type
make: *** [libmpcodecs/vd_mpng.o] Error 1
make: *** Waiting for unfinished jobs....
Looks like a dead end there. Well, for me at least.
My C is too crappy to understand the error, plus I don't really want to fix anything in the source to obtain a pure build.

For people that want to replay what I did and experiment a little, here is what I added to the
script to attempt the build:
- Code: Select all
##########################################
# MENCODER-ALTERNATE
# http://www.mplayerhq.hu/design7/news.html
# The latest known version of mencoder known to work for certain types of files
# for which support is broken in newer versions of mencoder.
#
build_mencoder_alternate() {
start_build mencoder-alternate
cd $SRC
REVISION="-r 32674" # Same as the Windows distribution
if [ -d mencoder-alternate ]; then
cd mencoder-alternate
$SVN update $REVISION
exit_on_error
else
$SVN checkout $REVISION svn://svn.mplayerhq.hu/mplayer/trunk mencoder-alternate
exit_on_error
cd mencoder-alternate
fi
# Build and install FFmpeg first because of header dependencies
cd ffmpeg
GIT_STR=`echo $GIT | $SED -e "s/\//\\\\\\\\\\\//g"`
$SED -i -e "s/ git / $GIT_STR /g" version.sh
set_flags
# Theora/vorbis disabled for mplayer, also disabled here to avoid build errors
./configure --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid \
--disable-libtheora --disable-libvorbis --disable-shared --prefix=$TARGET
$MAKE -j$THREADS
exit_on_error
$MAKE install
# Back to compiling MPlayer
cd ..
# Extra flags for compiling mplayer
export CFLAGS="-O4 -fomit-frame-pointer -pipe $CFLAGS"
export CXXFLAGS="-O4 -fomit-frame-pointer -pipe $CXXFLAGS"
# Theora, vorbis and fribidi support seems broken in this revision, disable it for now
./configure --disable-x11 --disable-gl --disable-qtx --disable-dvdread-internal \
--disable-theora --disable-libvorbis --disable-fribidi \
--with-freetype-config=$TARGET/bin/freetype-config --prefix=$TARGET
# Somehow -I/usr/X11/include still made it into the config.mak, regardless of the --disable-x11
$SED -i -e "s/-I\/usr\/X11\/include//g" config.mak
$MAKE -j$THREADS
exit_on_error
$MAKE install
cd $WORKDIR
}