2012-07-24 17:43:29 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, yasm, zlib, bzip2
|
2011-04-23 22:58:52 +02:00
|
|
|
, mp3Support ? true, lame ? null
|
|
|
|
, speexSupport ? true, speex ? null
|
|
|
|
, theoraSupport ? true, libtheora ? null
|
2012-02-08 20:54:16 +01:00
|
|
|
, vorbisSupport ? true, libvorbis ? null
|
2011-04-23 22:58:52 +02:00
|
|
|
, vpxSupport ? false, libvpx ? null
|
|
|
|
, x264Support ? true, x264 ? null
|
2012-02-08 20:54:16 +01:00
|
|
|
, xvidSupport ? true, xvidcore ? null
|
2012-07-02 16:17:16 +02:00
|
|
|
, vdpauSupport ? true, libvdpau ? null
|
2011-05-12 22:43:33 +02:00
|
|
|
, faacSupport ? false, faac ? null
|
2012-07-06 12:01:58 +02:00
|
|
|
, dc1394Support ? false, libdc1394 ? null
|
2011-05-12 22:43:33 +02:00
|
|
|
}:
|
2006-06-29 14:41:25 +02:00
|
|
|
|
2011-04-23 22:58:52 +02:00
|
|
|
assert speexSupport -> speex != null;
|
|
|
|
assert theoraSupport -> libtheora != null;
|
|
|
|
assert vorbisSupport -> libvorbis != null;
|
|
|
|
assert vpxSupport -> libvpx != null;
|
|
|
|
assert x264Support -> x264 != null;
|
|
|
|
assert xvidSupport -> xvidcore != null;
|
2012-07-02 16:17:16 +02:00
|
|
|
assert vdpauSupport -> libvdpau != null;
|
2011-07-27 23:00:09 +02:00
|
|
|
assert faacSupport -> faac != null;
|
2011-04-23 22:58:52 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-09-30 12:12:27 +02:00
|
|
|
name = "ffmpeg-0.10.15";
|
2013-12-11 01:00:55 +01:00
|
|
|
|
2006-06-29 14:41:25 +02:00
|
|
|
src = fetchurl {
|
2011-05-12 22:43:33 +02:00
|
|
|
url = "http://www.ffmpeg.org/releases/${name}.tar.bz2";
|
2014-09-30 12:12:27 +02:00
|
|
|
sha256 = "0p9x559fpj4zxll7rn3kwdig6y66c3ahv3pddmz23lljq5rvyvcb";
|
2009-03-10 22:03:51 +01:00
|
|
|
};
|
2013-12-11 01:00:55 +01:00
|
|
|
|
2009-03-10 22:03:51 +01:00
|
|
|
# `--enable-gpl' (as well as the `postproc' and `swscale') mean that
|
|
|
|
# the resulting library is GPL'ed, so it can only be used in GPL'ed
|
|
|
|
# applications.
|
2010-09-01 10:36:09 +02:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-gpl"
|
|
|
|
"--enable-postproc"
|
|
|
|
"--enable-swscale"
|
|
|
|
"--disable-ffplay"
|
|
|
|
"--enable-shared"
|
|
|
|
"--enable-runtime-cpudetect"
|
2011-04-23 22:58:52 +02:00
|
|
|
]
|
|
|
|
++ stdenv.lib.optional mp3Support "--enable-libmp3lame"
|
|
|
|
++ stdenv.lib.optional speexSupport "--enable-libspeex"
|
|
|
|
++ stdenv.lib.optional theoraSupport "--enable-libtheora"
|
|
|
|
++ stdenv.lib.optional vorbisSupport "--enable-libvorbis"
|
|
|
|
++ stdenv.lib.optional vpxSupport "--enable-libvpx"
|
|
|
|
++ stdenv.lib.optional x264Support "--enable-libx264"
|
2011-05-12 22:43:33 +02:00
|
|
|
++ stdenv.lib.optional xvidSupport "--enable-libxvid"
|
2012-07-02 16:17:16 +02:00
|
|
|
++ stdenv.lib.optional vdpauSupport "--enable-vdpau"
|
2012-07-06 12:01:58 +02:00
|
|
|
++ stdenv.lib.optional faacSupport "--enable-libfaac --enable-nonfree"
|
2012-07-24 17:43:30 +02:00
|
|
|
++ stdenv.lib.optional dc1394Support "--enable-libdc1394";
|
2011-04-23 22:58:52 +02:00
|
|
|
|
2012-07-24 17:43:29 +02:00
|
|
|
buildInputs = [ pkgconfig lame yasm zlib bzip2 ]
|
2011-04-23 22:58:52 +02:00
|
|
|
++ stdenv.lib.optional mp3Support lame
|
|
|
|
++ stdenv.lib.optional speexSupport speex
|
|
|
|
++ stdenv.lib.optional theoraSupport libtheora
|
|
|
|
++ stdenv.lib.optional vorbisSupport libvorbis
|
|
|
|
++ stdenv.lib.optional vpxSupport libvpx
|
|
|
|
++ stdenv.lib.optional x264Support x264
|
2011-05-12 22:43:33 +02:00
|
|
|
++ stdenv.lib.optional xvidSupport xvidcore
|
2012-07-02 16:17:16 +02:00
|
|
|
++ stdenv.lib.optional vdpauSupport libvdpau
|
2012-07-06 12:01:58 +02:00
|
|
|
++ stdenv.lib.optional faacSupport faac
|
2012-07-24 17:43:30 +02:00
|
|
|
++ stdenv.lib.optional dc1394Support libdc1394;
|
2009-03-10 22:03:51 +01:00
|
|
|
|
2011-07-25 16:35:54 +02:00
|
|
|
enableParallelBuilding = true;
|
2013-12-11 01:00:55 +01:00
|
|
|
|
2011-04-23 22:58:52 +02:00
|
|
|
crossAttrs = {
|
|
|
|
dontSetConfigureCross = true;
|
|
|
|
configureFlags = configureFlags ++ [
|
|
|
|
"--cross-prefix=${stdenv.cross.config}-"
|
|
|
|
"--enable-cross-compile"
|
|
|
|
"--target_os=linux"
|
|
|
|
"--arch=${stdenv.cross.arch}"
|
|
|
|
];
|
|
|
|
};
|
2009-03-10 23:45:27 +01:00
|
|
|
|
2013-01-05 22:05:34 +01:00
|
|
|
passthru = {
|
|
|
|
inherit vdpauSupport;
|
|
|
|
};
|
|
|
|
|
2013-07-04 06:55:32 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://www.ffmpeg.org/;
|
2009-03-10 22:03:51 +01:00
|
|
|
description = "A complete, cross-platform solution to record, convert and stream audio and video";
|
2013-07-04 06:55:32 +02:00
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.unix;
|
2014-09-30 12:12:27 +02:00
|
|
|
branch = "0.10";
|
2006-06-29 14:41:25 +02:00
|
|
|
};
|
|
|
|
}
|