Multimedia :: mini-MPlayer patches



MPlayer version: MPlayer-0.90rc2.tar.bz2
Patch: http://pastebin.com/f143ee236 (2008-09-07)
Configuration:
Code Sample
CFLAGS="-Os -march=i386 -mpreferred-stack-boundary=2 -malign-jumps=0 -malign-loops=0 -ffast-math -fomit-frame-pointer -fdata-sections -ffunction-sections -Wl,--gc-sections" \
./configure \
--prefix=/usr/local --disable-mencoder --disable-largefiles \
--enable-termcap --disable-iconv --disable-setlocale \
--disable-lirc --disable-tv --disable-tv-v4l \
--disable-tv-bsdbt848 --disable-edl --disable-streaming \
--disable-dvdnav --disable-dvdread --disable-mpdvdkit \
--disable-css --disable-cdparanoia --disable-freetype \
--disable-unrarlib --disable-sortsub --disable-gif \
--disable-png --disable-jpeg --disable-liblzo \
--disable-win32 --disable-dshow --disable-qtx-codecs \
--disable-xanim --disable-real --disable-xvid \
--disable-divx4linux --disable-libdv --enable-mad \
--disable-vidix --disable-vesa --disable-sdl \
--disable-aa --disable-dvb --enable-fbdev --disable-alsa \
--target=i386-linux --enable-mmx --disable-mmx2 \
--disable-3dnow --disable-3dnowex --disable-sse \
--disable-sse2 --disable-big-endian --disable-i18n
Comments:
Can be built with dietlibc-0.31.tar.bz2.
- Use gcc 2.95.x.
- Compile and install libid3tag-0.15.0b.tar.gz and libmad-0.15.0b.tar.gz to get mp3 audio support.
Code Sample
CC="diet gcc" \
CFLAGS="-Os -march=i386 -mpreferred-stack-boundary=2 -malign-jumps=0 -malign-loops=0 -fomit-frame-pointer -fdata-sections -ffunction-sections" \
./configure \
--prefix=/usr/local --disable-shared --disable-debugging
- Compile and install ftp://prep.ai.mit.edu/pub/gnu/termcap/termcap-1.3.1.tar.gz.
(The terminal handling code in dietlibc breaks the MPlayer progress indicator -- it doesn't refresh the indicator, it just outputs the text repeatedly.)
Code Sample
CC="diet gcc" \
CFLAGS="-Os -march=i386 -mpreferred-stack-boundary=2 -malign-jumps=0 -malign-loops=0 -fomit-frame-pointer -fdata-sections -ffunction-sections" \
./configure \
--prefix=/usr/local
- In "config.mak", change "CC = gcc" to "CC = diet gcc".
- In "config.h", comment out (i.e. "//") these 2 lines:
Code Sample
#define HAVE_LRINTF 1
#define HAVE_MEMALIGN 1
- Comment out this line in "/opt/diet/include/unistd.h":
Code Sample
int open(const char* pathname,int flags, ...) __THROW;
because it is redefined in "libaf/af_*.c".
- Run "make".

WIP: MPlayer 1.0pre7try2
Turns out, patches could be alot, alot simpler:
There's no need to painstakingly edit the sources.
Just removing codecs/parsers from 'libavcodec/allcodecs.c' will disable those codecs/parsers from being made.
Working on a patch for 1.0rc2. Hopefully, it should be much smaller than the current one. Please don't use the current one anymore. (It's really too messy...)
p.s.
Seems like the progress indicator in 1.0rc2 works with dietlibc out of the box, so there's no need for libtermcap.

Any difference with dietlibc and uclibc?
Size with dietlibc is the same as glibc, but may be better for small storage (e.g. floppy) since it's compiled static, doesn't depend on any libs. POI: gcc-2.95 compiled with dietlibc is ~1.5M (.tar.gz). Could fit on a floppy.
Next Page...
original here.