diff options
author | Eric Hameleers <alien@slackware.com> | 2010-06-18 14:17:10 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2010-06-18 14:17:10 +0000 |
commit | b3e6e60d93164f9e643cc21543b75d3353e420e4 (patch) | |
tree | a225b6ad812017af737c70ee649fb81398c61ae0 /ffmpeg/build | |
parent | df3e7dd5df0d32146c2de8e75abf9ef2bb080ca5 (diff) | |
download | asb-b3e6e60d93164f9e643cc21543b75d3353e420e4.tar.gz asb-b3e6e60d93164f9e643cc21543b75d3353e420e4.tar.xz |
We need libva too in the package to get vaapi support
Diffstat (limited to 'ffmpeg/build')
-rwxr-xr-x | ffmpeg/build/ffmpeg.SlackBuild | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/ffmpeg/build/ffmpeg.SlackBuild b/ffmpeg/build/ffmpeg.SlackBuild index 2621a1f7..1feac633 100755 --- a/ffmpeg/build/ffmpeg.SlackBuild +++ b/ffmpeg/build/ffmpeg.SlackBuild @@ -129,6 +129,7 @@ DOCS_FAAC="AUTHORS COPYING* ChangeLog NEWS README* TODO" DOCS_FAAD2="AUTHORS COPYING* ChangeLog NEWS README* TODO" DOCS_GSM="COPYRIGHT ChangeLog* INSTALL MACHINES MANIFEST README" DOCS_LAME="API COPYING ChangeLog HACKING LICENSE README STYLEGUIDE TODO USAGE" +DOCS_LIBVA="COPYING" DOCS_ORC="COPYING README TODO" DOCS_RAW1394="AUTHORS COPYING ChangeLog INSTALL NEWS README" DOCS_RTMP="AUTHORS COPYING ChangeLog README" @@ -145,6 +146,7 @@ FAAD2=2.7 FFMPEG=$VERSION GSM=1.0.13 LAME=3.98.4 +LIBVA="0.31.0-1+sds13" ORC=0.4.5 RAW1394=2.0.5 RTMP=2.2e @@ -251,6 +253,10 @@ SOURCE[13]="$SRCDIR/libvpx-${VPX}.tar.bz2" SRCURL[13]="" SRCPAT[13]="NO" +SOURCE[14]="$SRCDIR/libva_${LIBVA}.tar.gz" +SRCURL[14]="http://www.splitted-desktop.com/~gbeauchesne/libva/libva_${LIBVA}.tar.gz" +SRCPAT[14]="NO" + # Use the src_checkout() function if no downloadable tarball exists. # This function checks out sources from SVN/CVS and creates a tarball of them. @@ -849,6 +855,70 @@ cd - # ----------------------------------------------------------------------------- +# Compile libva +# ----------------------------------------------------------------------------- +make_libva() +{ +echo -e "**\n** libva ...\n**" +cd $TMP/tmp-$PRGNAM/libva-$(echo "$LIBVA" |cut -d- -f1) + +# +# == NOTE ON VAAPI == +# +# VAAPI can enable hardware accelerated playback for MPEG-2/4, H.264/AVC +# and VC-1 video on certain graphics hardware. +# The VAAPI support in this ffmeeg package depends on VA drivers that you have +# to install yourself for your specific hardware. The drivers should go into +# directory /usr/lib${LIBDIRSUFFIX}/va/drivers . +# If you install my libva package you can get MPEG-2 hardware acceleration on +# Intel graphics. If you additionally install my vdpau-video package, then you +# get hardware acceleration on Nvidia graphics (with nvidia's binary driver). +# If you own an Ati card and use the fglrx driver, then you can achieve +# hardware acceleration by installing the xvba-video driver from here: +# http://www.splitted-desktop.com/~gbeauchesne/xvba-video/ (since I do not own +# Ati hardware I can not build a package for xvba-video myself) + +# Apply a wad of patches: +for DPATCH in $(ls debian/patches/*.patch) ; do + cat $DPATCH |patch -p1 --verbose +done 2>&1 | tee $OUTPUT/patch-${PRGNAM}_libva.log + +## Slackware uses a newer aclocal: +autoreconf -vif + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +LDFLAGS="$SLKLDFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --enable-static \ + --enable-shared \ + --enable-glx \ + --with-drivers-path=/usr/lib${LIBDIRSUFFIX}/va/drivers \ + --program-prefix= \ + --program-suffix= \ + --build=$ARCH-slackware-linux \ + 2>&1 | tee $OUTPUT/configure-${PRGNAM}_libva.log +make ${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}_libva.log +# Strip the static lib to prevent linking errors in 64-bit, +find . -name "*.a" | xargs strip --strip-unneeded +# Install libva into a temp location so vlc can pickup the library +echo -e "\n**\n**\n" +make install DESTDIR=$FFMPEGDEPSDIR \ + 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_libva.log +# Remove the .so and .la files; we want static linking (but still use +# the drivers in $(libdir)/va/drivers): +rm -f $FFMPEGDEPSDIR/usr/lib${LIBDIRSUFFIX}/libva*.so* +rm -f $FFMPEGDEPSDIR/usr/lib${LIBDIRSUFFIX}/libva*.la +# Add DOCS to the ffmpegdeps to have it added to ffmpeg package later: +mkdir -p $FFMPEGDEPSDIR/doc/libva +cp -a $DOCS_LIBVA $FFMPEGDEPSDIR/doc/libva/ || true +cd - +} + + +# ----------------------------------------------------------------------------- # Compile ffmpeg with additional support for - # LAME (MP3), XVID, FAAC (MP4), FAAD2 , SPEEX, X264, GSM, SCHROEDINGER # ----------------------------------------------------------------------------- @@ -964,6 +1034,7 @@ make_orc make_schroedinger make_x264 make_vpx +make_libva #fi # end of 'xy' |