Updating x264, and adding x264 support to mplayer and ffmpeg.

svn path=/nixpkgs/trunk/; revision=21451
This commit is contained in:
Lluís Batlle i Rossell 2010-04-30 08:33:47 +00:00
parent 9b48c69f85
commit 7b6ce0f9df
4 changed files with 20 additions and 12 deletions

View File

@ -6,6 +6,7 @@
, cdparanoia ? null, cddaSupport ? true , cdparanoia ? null, cddaSupport ? true
, amrnb ? null, amrwb ? null, amrSupport ? false , amrnb ? null, amrwb ? null, amrSupport ? false
, jackaudioSupport ? false, jackaudio ? null , jackaudioSupport ? false, jackaudio ? null
, x264Support ? false, x264 ? null
, mesa, pkgconfig, unzip , mesa, pkgconfig, unzip
}: }:
@ -61,11 +62,13 @@ stdenv.mkDerivation {
++ stdenv.lib.optionals dvdnavSupport [ libdvdnav libdvdnav.libdvdread ] ++ stdenv.lib.optionals dvdnavSupport [ libdvdnav libdvdnav.libdvdread ]
++ stdenv.lib.optional cddaSupport cdparanoia ++ stdenv.lib.optional cddaSupport cdparanoia
++ stdenv.lib.optional jackaudioSupport jackaudio ++ stdenv.lib.optional jackaudioSupport jackaudio
++ stdenv.lib.optionals amrSupport [ amrnb amrwb ]; ++ stdenv.lib.optionals amrSupport [ amrnb amrwb ]
++ stdenv.lib.optional x264Support x264;
configureFlags = '' configureFlags = ''
${if cacaSupport then "--enable-caca" else "--disable-caca"} ${if cacaSupport then "--enable-caca" else "--disable-caca"}
${if dvdnavSupport then "--enable-dvdnav --enable-dvdread --disable-dvdread-internal" else ""} ${if dvdnavSupport then "--enable-dvdnav --enable-dvdread --disable-dvdread-internal" else ""}
${if x264Support then "--enable-x264 --extra-libs=-lx264" else ""}
--codecsdir=${codecs} --codecsdir=${codecs}
--enable-runtime-cpudetection --enable-runtime-cpudetection
--enable-x11 --enable-x11

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, faad2, libtheora, speex, libvorbis}: {stdenv, fetchurl, faad2, libtheora, speex, libvorbis, x264, pkgconfig}:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "ffmpeg-0.5.1"; name = "ffmpeg-0.5.1";
@ -22,9 +22,10 @@ stdenv.mkDerivation {
--enable-libtheora --enable-libtheora
--enable-libvorbis --enable-libvorbis
--enable-libspeex --enable-libspeex
--enable-libx264
''; '';
buildInputs = [faad2 libtheora speex libvorbis]; buildInputs = [faad2 libtheora speex libvorbis x264 pkgconfig];
meta = { meta = {
homepage = http://www.ffmpeg.org/; homepage = http://www.ffmpeg.org/;

View File

@ -1,16 +1,19 @@
args: { stdenv, fetchurl }:
args.stdenv.mkDerivation rec {
version = "snapshot-20080521-2245"; stdenv.mkDerivation rec {
version = "snapshot-20100429-2245";
name = "x264-${version}"; name = "x264-${version}";
src = args.fetchurl { src = fetchurl {
url = "ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-${version}.tar.bz2"; url = "ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-${version}.tar.bz2";
sha256 = "07khxih1lmhvrzlaksqmaghbi8w2yyjrjcw867gi2y4z1h0ndhks"; sha256 = "16b24mc63zyp4h4fqyvgzbdclnhpay4l72yfqzwnzsnlby94zwcj";
}; };
configureFlags= if args.stdenv.system == "x86_64-linux" then ["--enable-pic"] else []; patchPhase = ''
sed -i s,/bin/bash,${stdenv.bash}/bin/bash, configure version.sh
'';
buildInputs =(with args; []); configureFlags = [ "--disable-asm" "--enable-shared" ];
meta = { meta = {
description = "library for encoding H264/AVC video streams"; description = "library for encoding H264/AVC video streams";

View File

@ -3645,7 +3645,7 @@ let
}; };
ffmpeg = import ../development/libraries/ffmpeg { ffmpeg = import ../development/libraries/ffmpeg {
inherit fetchurl stdenv faad2 libvorbis speex libtheora; inherit fetchurl stdenv faad2 libvorbis speex libtheora x264 pkgconfig;
}; };
fftw = import ../development/libraries/fftw { fftw = import ../development/libraries/fftw {
@ -7877,7 +7877,7 @@ let
MPlayer = import ../applications/video/MPlayer { MPlayer = import ../applications/video/MPlayer {
inherit fetchurl stdenv freetype fontconfig x11 zlib libtheora libcaca libdvdnav inherit fetchurl stdenv freetype fontconfig x11 zlib libtheora libcaca libdvdnav
cdparanoia mesa pkgconfig unzip amrnb amrwb jackaudio; cdparanoia mesa pkgconfig unzip amrnb amrwb jackaudio x264;
inherit (xlibs) libX11 libXv libXinerama libXrandr; inherit (xlibs) libX11 libXv libXinerama libXrandr;
alsaSupport = true; alsaSupport = true;
alsa = alsaLib; alsa = alsaLib;
@ -7887,6 +7887,7 @@ let
randrSupport = true; randrSupport = true;
cddaSupport = true; cddaSupport = true;
amrSupport = getConfig [ "MPlayer" "amr" ] false; amrSupport = getConfig [ "MPlayer" "amr" ] false;
x264Support = true;
}; };
MPlayerPlugin = browser: MPlayerPlugin = browser: