1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-11-22 13:41:53 +02:00

Disable (all?) patented codecs. Disable ffmpeg's (broken) ogg demuxer.

This commit is contained in:
David Kühling 2011-04-24 21:27:53 +02:00
parent 6a975d2489
commit ffb6f8b339
3 changed files with 160 additions and 19 deletions

View File

@ -77,8 +77,6 @@ CONFIGURE_ARGS := --target=mips \
--enable-fbdev \
--confdir=/usr/share/mplayer \
--enable-menu \
--$(if $(CONFIG_BUILD_PATENTED),enable-mad,disable-mad) \
--$(if $(CONFIG_BUILD_PATENTED),enable-mp3lib,disable-mp3lib) \
--disable-x11 \
--disable-xv \
--disable-vm \
@ -87,7 +85,63 @@ CONFIGURE_ARGS := --target=mips \
--disable-xf86keysym \
--enable-vidix \
--disable-vidix-pcidb \
--with-vidix-drivers="no"
--with-vidix-drivers="no" \
--enable-tremor-internal \
--enable-decoder=RAWVIDEO_DECODER \
--enable-decoder=THEORA_DECODER \
--enable-decoder=VP3_DECODER \
--enable-decoder=VP8_DECODER \
--enable-decoder=MP2_DECODER \
--enable-decoder=FLAC_DECODER \
--enable-decoder=PCM_U8_DECODER \
--enable-decoder=PCM_U16BE_DECODER \
--enable-decoder=PCM_U16LE_DECODER \
--enable-decoder=PCM_S8_DECODER \
--enable-decoder=PCM_S16BE_DECODER \
--enable-decoder=PCM_S16LE_DECODER \
--enable-decoder=PCM_MULAW_DECODER \
--enable-decoder=PCM_ALAW_DECODER \
--enable-demuxer=RAWVIDEO_DEMUXER \
--enable-demuxer=AVI_DEMUXER \
--enable-demuxer=FLAC_DEMUXER \
--enable-demuxer=MATROSKA_DEMUXER \
--enable-demuxer=MATROSKA_AUDIO_DEMUXER \
--enable-demuxer=SRT_DEMUXER \
--enable-demuxer=WAV_DEMUXER \
--enable-demuxer=YUV4MPEGPIPE_DEMUXER \
--enable-parser=VP3_PARSER \
--enable-parser=VP8_PARSER \
--enable-parser=PNM_PARSER \
--enable-parser=DIRAC_PARSER \
--enable-parser=FLAC_PARSER \
--enable-protocol=HTTP_PROTOCOL \
--enable-protocol=CONCAT_PROTOCOL \
--enable-protocol=FILE_PROTOCOL \
--enable-protocol=PIPE_PROTOCOL \
--enable-protocol=TCP_PROTOCOL \
--enable-protocol=UDP_PROTOCOL
# cannot enable, pulls in mpegts, and realmedia stuff (?):
# --enable-protocol=RTP_PROTOCOL
# not compiling working with libspeex version from openwrt:
# --enable-decoder=LIBSPEEX_DECODER
# ffmpeg ogg demuxer disabled for now (leaks memory, use mplayer's native ogg
# support instead) --enable-demuxer=OGG_DEMUXER
# ffmpeg vorbis is float-based and slow, using mplayer's internal tremor
#instead --enable-decoder=VORBIS_DECODER
ifdef CONFIG_BUILD_PATENTED
CONFIGURE_ARGS+= --enable-mad \
--enable-mp3lib
else
CONFIGURE_ARGS+= --disable-mad \
--disable-mp3lib \
--disable-libmpeg2 \
--disable-libmpeg2-internal
endif
# mplayer makefile is soooo broken. have to specify libs by hand, if
# compileing with --enable-system-ffmpeg
@ -116,3 +170,9 @@ define Package/MPlayer/install
endef
$(eval $(call BuildPackage,MPlayer))
# The following comments configure the Emacs editor. Just ignore them.
# Local Variables:
# compile-command: "make -C ~/h/src/qi/openwrt-xburst package/mplayer/compile -j4 V=99"
# End:

View File

@ -1,3 +1,7 @@
this is outdated; mpeg1 support currently disabled (patents?).
Use ffmpeg2theora or ffmpeg with vp8, vorbis, mkv
1. prepare your avi files for Ben:
for i in $(echo "*.avi"); do /usr/bin/mencoder -o "$i.mpg" -vf scale=320:-2 -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video:vpass=1:vbitrate=200 -ofps 24000/1001 -oac lavc -lavcopts acodec=mp2:abitrate=64 "$i" && /usr/bin/mencoder -o "$i.mpg" -vf scale=320:-2 -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video:vpass=2:vbitrate=200 -ofps 24000/1001 -oac lavc -lavcopts acodec=mp2:abitrate=64 "$i"; done

View File

@ -0,0 +1,77 @@
Index: MPlayer-r33304/configure
===================================================================
--- MPlayer-r33304.orig/configure 2011-04-24 12:39:13.000000000 +0200
+++ MPlayer-r33304/configure 2011-04-24 19:43:38.000000000 +0200
@@ -635,21 +635,28 @@
libopenjpeg=auto
libavdecoders_all=$(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
libavdecoders=$(echo $libavdecoders_all | sed -e 's/ LIB[A-Z0-9_]*_DECODER//g')
+libavdecoders=
libavencoders_all=$(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
libavencoders=$(echo $libavencoders_all | sed -e 's/ LIB[A-Z0-9_]*_ENCODER//g')
+libavencoders=
libavparsers_all=$(sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
libavparsers=$libavparsers_all
+libavparsers=
libavbsfs_all=$(sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
libavbsfs=$libavbsfs_all
+libavbsfs=
libavhwaccels_all=$(sed -n 's/^[^#]*HWACCEL.*(.*, *\(.*\)).*/\1_hwaccel/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
# Disable all hardware accelerators for now.
libavhwaccels=
libavdemuxers_all=$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]')
libavdemuxers=$(echo $libavdemuxers_all | sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s/REDIR_DEMUXER// -e s/AVISYNTH_DEMUXER//)
+libavdemuxers=
libavmuxers_all=$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]')
libavmuxers=$(echo $libavmuxers_all | sed -e 's/ LIB[A-Z0-9_]*_MUXER//g' -e s/RTP_MUXER// -e s/RTSP_MUXER//)
+libavmuxers=
libavprotocols_all=$(sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]')
libavprotocols=$libavprotocols_all
+libavprotocols=
_mencoder=yes
_mplayer=yes
_x11=auto
@@ -3366,7 +3373,8 @@
if test "$networking" = yes ; then
def_network='#define CONFIG_NETWORK 1'
def_networking='#define CONFIG_NETWORKING 1'
- def_rtpdec='#define CONFIG_RTPDEC 1'
+ # disabled, pulls in various patented crap (?)
+# def_rtpdec='#define CONFIG_RTPDEC 1'
extra_ldflags="$extra_ldflags $_ld_sock"
inputmodules="networking $inputmodules"
else
Index: MPlayer-r33304/Makefile
===================================================================
--- MPlayer-r33304.orig/Makefile 2011-04-24 19:15:52.000000000 +0200
+++ MPlayer-r33304/Makefile 2011-04-24 19:16:08.000000000 +0200
@@ -73,8 +73,9 @@
sub/av_sub.c \
# These filters use private headers and do not work with shared FFmpeg.
-SRCS_COMMON-$(FFMPEG_A) += libaf/af_lavcac3enc.c \
- libmpcodecs/vf_fspp.c \
+# removed: libaf/af_lavcac3enc.c (patents?)
+
+SRCS_COMMON-$(FFMPEG_A) += libmpcodecs/vf_fspp.c \
libmpcodecs/vf_mcdeint.c \
libmpcodecs/vf_qp.c \
libmpcodecs/vf_spp.c \
Index: MPlayer-r33304/libaf/af.c
===================================================================
--- MPlayer-r33304.orig/libaf/af.c 2011-04-24 21:18:52.000000000 +0200
+++ MPlayer-r33304/libaf/af.c 2011-04-24 21:19:08.000000000 +0200
@@ -71,9 +71,10 @@
#endif
&af_info_volnorm,
&af_info_extrastereo,
-#ifdef CONFIG_FFMPEG_A
- &af_info_lavcac3enc,
-#endif
+ /* AC3 disabled until patent status cleared */
+/* #ifdef CONFIG_FFMPEG_A */
+/* &af_info_lavcac3enc, */
+/* #endif */
#ifdef CONFIG_FFMPEG
&af_info_lavcresample,
#endif