diff --git a/pkgs/development/libraries/ffmpeg-full/default.nix b/pkgs/development/libraries/ffmpeg-full/default.nix index 1ab0b543400f..306b4e22cfc9 100644 --- a/pkgs/development/libraries/ffmpeg-full/default.nix +++ b/pkgs/development/libraries/ffmpeg-full/default.nix @@ -75,7 +75,7 @@ , libdc1394 ? null, libraw1394 ? null # IIDC-1394 grabbing (ieee 1394) , libiconv ? null #, libiec61883 ? null, libavc1394 ? null # iec61883 (also uses libraw1394) -#, libmfx ? null # Hardware acceleration vis libmfx +, libmfx ? null # Hardware acceleration vis libmfx , libmodplug ? null # ModPlug support , libmysofa ? null # HRTF support via SOFAlizer #, libnut ? null # NUT (de)muxer, native (de)muser exists @@ -156,12 +156,13 @@ * * Not packaged: * aacplus avisynth cdio-paranoia crystalhd libavc1394 libiec61883 - * libmxf libnut libquvi nvenc opencl openh264 oss shine twolame + * libnut libquvi nvenc opencl openh264 oss shine twolame * utvideo vo-aacenc vo-amrwbenc xvmc zvbi blackmagic-design-desktop-video * * Need fixes to support Darwin: - * frei0r, game-music-emu, gsm, libjack2, libssh, libvpx(stable 1.3.0), openal, openjpeg, - * pulseaudio, rtmpdump, samba, vid-stab, wavpack, x265. xavs + * frei0r game-music-emu gsm libjack2 libmfx(intel-media-sdk) libssh + * libvpx(stable 1.3.0) openal openjpeg pulseaudio rtmpdump samba vid-stab + * wavpack x265 xavs * * Not supported: * stagefright-h264(android only) @@ -343,7 +344,7 @@ stdenv.mkDerivation rec { (enableFeature (if isLinux then libdc1394 != null && libraw1394 != null else false) "libdc1394") (enableFeature (libiconv != null) "iconv") #(enableFeature (if isLinux then libiec61883 != null && libavc1394 != null && libraw1394 != null else false) "libiec61883") - #(enableFeature (libmfx != null) "libmfx") + (enableFeature (if isLinux then libmfx != null else false) "libmfx") (enableFeature (libmodplug != null) "libmodplug") (enableFeature (libmysofa != null) "libmysofa") #(enableFeature (libnut != null) "libnut") @@ -416,6 +417,7 @@ stdenv.mkDerivation rec { ++ optionals nonfreeLicensing [ fdk_aac openssl ] ++ optional ((isLinux || isFreeBSD) && libva != null) libva ++ optionals isLinux [ alsaLib libraw1394 libv4l ] + ++ optional (isLinux && libmfx != null) libmfx ++ optionals nvenc [ nvidia-video-sdk nv-codec-headers ] ++ optionals stdenv.isDarwin [ Cocoa CoreServices CoreAudio AVFoundation MediaToolbox VideoDecodeAcceleration diff --git a/pkgs/development/libraries/intel-media-sdk/default.nix b/pkgs/development/libraries/intel-media-sdk/default.nix new file mode 100644 index 000000000000..6ab10c24d3dc --- /dev/null +++ b/pkgs/development/libraries/intel-media-sdk/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, autoPatchelfHook, cmake, pkgconfig, libdrm, libpciaccess +, libva , libX11, libXau, libXdmcp, libpthreadstubs +}: + +stdenv.mkDerivation rec { + name = "intel-media-sdk-${version}"; + version = "18.4.1"; + + src = fetchurl { + url = "https://github.com/Intel-Media-SDK/MediaSDK/archive/intel-mediasdk-${version}.tar.gz"; + sha256 = "0yqqw6hyjn28zk4f4wznqpyiz9vinnjj8067dim64bz1f4pjhyra"; + }; + + # patchelf is needed for binaries in $out/share/samples + nativeBuildInputs = [ autoPatchelfHook cmake pkgconfig ]; + buildInputs = [ + libdrm libva libpciaccess libX11 libXau libXdmcp libpthreadstubs + ]; + + enableParallelBuild = true; + + meta = with stdenv.lib; { + description = "Intel Media SDK."; + license = licenses.mit; + maintainers = with maintainers; [ midchildan ]; + platforms = with platforms; linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d283c73ffc75..cb2cf66d718e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3545,6 +3545,8 @@ in intecture-cli = callPackage ../tools/admin/intecture/cli.nix { }; + intel-media-sdk = callPackage ../development/libraries/intel-media-sdk { }; + invoice2data = callPackage ../tools/text/invoice2data { }; inxi = callPackage ../tools/system/inxi { }; @@ -9904,6 +9906,7 @@ in libjack2 = if stdenv.isDarwin then null else libjack2; libmodplug = if stdenv.isDarwin then null else libmodplug; openal = if stdenv.isDarwin then null else openal; + libmfx = if stdenv.isDarwin then null else intel-media-sdk; libpulseaudio = if stdenv.isDarwin then null else libpulseaudio; samba = if stdenv.isDarwin then null else samba; vid-stab = if stdenv.isDarwin then null else vid-stab;