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