mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 13:10:33 +00:00
ffmpeg-full: avfoundation indev support on darwin
Adds support for camera input devices on OS X. This required fixing links in output libraries and executables to pull in the system's CoreFoundation.framework rather than the open source CF one.
This commit is contained in:
parent
ca1d46f98a
commit
184a3957e6
|
@ -141,7 +141,7 @@
|
|||
/*
|
||||
* Darwin frameworks
|
||||
*/
|
||||
, Cocoa, CoreServices
|
||||
, Cocoa, CoreServices, AVFoundation, MediaToolbox, VideoDecodeAcceleration, CF
|
||||
}:
|
||||
|
||||
/* Maintainer notes:
|
||||
|
@ -177,7 +177,7 @@
|
|||
|
||||
let
|
||||
inherit (stdenv) isCygwin isFreeBSD isLinux;
|
||||
inherit (stdenv.lib) optional optionals enableFeature;
|
||||
inherit (stdenv.lib) optional optionals optionalString enableFeature;
|
||||
in
|
||||
|
||||
/*
|
||||
|
@ -410,11 +410,25 @@ stdenv.mkDerivation rec {
|
|||
++ optionals nonfreeLicensing [ faac fdk_aac openssl ]
|
||||
++ optional ((isLinux || isFreeBSD) && libva != null) libva
|
||||
++ optionals isLinux [ alsaLib libraw1394 libv4l ]
|
||||
++ optionals stdenv.isDarwin [ Cocoa CoreServices ];
|
||||
++ optionals stdenv.isDarwin [ Cocoa CoreServices AVFoundation MediaToolbox
|
||||
VideoDecodeAcceleration ];
|
||||
|
||||
# Build qt-faststart executable
|
||||
buildPhase = optional qtFaststartProgram ''make tools/qt-faststart'';
|
||||
postInstall = optional qtFaststartProgram ''cp -a tools/qt-faststart $out/bin/'';
|
||||
|
||||
# Hacky framework patching technique borrowed from the phantomjs2 package
|
||||
postInstall = optionalString qtFaststartProgram ''
|
||||
cp -a tools/qt-faststart $out/bin/
|
||||
'' + optionalString stdenv.isDarwin ''
|
||||
FILES=($(ls $out/bin/*))
|
||||
FILES+=($(ls $out/lib/*.dylib))
|
||||
for f in ''${FILES[@]}; do
|
||||
if [ ! -h "$f" ]; then
|
||||
install_name_tool -change ${CF}/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation "$f"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
|
|
@ -6705,7 +6705,9 @@ in
|
|||
vid-stab = if stdenv.isDarwin then null else vid-stab;
|
||||
x265 = if stdenv.isDarwin then null else x265;
|
||||
xavs = if stdenv.isDarwin then null else xavs;
|
||||
inherit (darwin.apple_sdk.frameworks) Cocoa CoreServices;
|
||||
inherit (darwin) CF;
|
||||
inherit (darwin.apple_sdk.frameworks) Cocoa CoreServices AVFoundation
|
||||
MediaToolbox VideoDecodeAcceleration;
|
||||
};
|
||||
|
||||
ffmpegthumbnailer = callPackage ../development/libraries/ffmpegthumbnailer { };
|
||||
|
|
Loading…
Reference in a new issue