mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
ffmpeg_{4,6,7}: Darwin clean‐ups and improvements (#351188)
This commit is contained in:
commit
a162f7e57f
@ -1,25 +0,0 @@
|
||||
From a804dd05351716b1fd9a7c2b7ed636613edd9c0f Mon Sep 17 00:00:00 2001
|
||||
From: toonn <toonn@toonn.io>
|
||||
Date: Fri, 21 Jun 2024 18:59:49 +0000
|
||||
Subject: [PATCH] avfoundation.m: macOS SDK 10.12 compatibility
|
||||
|
||||
---
|
||||
libavdevice/avfoundation.m | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
|
||||
index d9b17ccdae..2a1f66d751 100644
|
||||
--- a/libavdevice/avfoundation.m
|
||||
+++ b/libavdevice/avfoundation.m
|
||||
@@ -762,7 +762,7 @@ static int get_audio_config(AVFormatContext *s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static NSArray* getDevicesWithMediaType(AVMediaType mediaType) {
|
||||
+static NSArray* getDevicesWithMediaType(NSString * mediaType) {
|
||||
#if ((TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000) || (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500))
|
||||
NSMutableArray *deviceTypes = nil;
|
||||
if (mediaType == AVMediaTypeVideo) {
|
||||
--
|
||||
2.44.0
|
||||
|
@ -9,14 +9,6 @@ let
|
||||
initArgs: ffmpegVariant:
|
||||
callPackage ./generic.nix (
|
||||
{
|
||||
inherit (darwin.apple_sdk.frameworks)
|
||||
Accelerate
|
||||
AppKit
|
||||
AudioToolbox
|
||||
AVFoundation
|
||||
CoreImage
|
||||
VideoToolbox
|
||||
;
|
||||
inherit (darwin) xcode;
|
||||
inherit (cudaPackages) cuda_cudart cuda_nvcc libnpp;
|
||||
}
|
||||
|
@ -36,12 +36,9 @@
|
||||
, withAlsa ? withHeadlessDeps && stdenv.hostPlatform.isLinux # Alsa in/output supporT
|
||||
, withAmf ? lib.meta.availableOn stdenv.hostPlatform amf # AMD Media Framework video encoding
|
||||
, withAom ? withHeadlessDeps # AV1 reference encoder
|
||||
, withAppKit ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple AppKit framework
|
||||
, withAribb24 ? withFullDeps # ARIB text and caption decoding
|
||||
, withAribcaption ? withFullDeps && lib.versionAtLeast version "6.1" # ARIB STD-B24 Caption Decoder/Renderer
|
||||
, withAss ? withHeadlessDeps && stdenv.hostPlatform == stdenv.buildPlatform # (Advanced) SubStation Alpha subtitle rendering
|
||||
, withAudioToolbox ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple AudioToolbox
|
||||
, withAvFoundation ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple AVFoundation framework
|
||||
, withAvisynth ? withFullDeps # AviSynth script files reading
|
||||
, withBluray ? withFullDeps # BluRay reading
|
||||
, withBs2b ? withFullDeps # bs2b DSP library
|
||||
@ -51,7 +48,6 @@
|
||||
, withCelt ? withHeadlessDeps # CELT decoder
|
||||
, withChromaprint ? withFullDeps # Audio fingerprinting
|
||||
, withCodec2 ? withFullDeps # codec2 en/decoding
|
||||
, withCoreImage ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple CoreImage framework
|
||||
, withCuda ? withFullDeps && withNvcodec
|
||||
, withCudaLLVM ? withFullDeps
|
||||
, withCudaNVCC ? withFullDeps && withUnfree && config.cudaSupport
|
||||
@ -122,7 +118,6 @@
|
||||
, withV4l2M2m ? withV4l2
|
||||
, withVaapi ? withHeadlessDeps && (with stdenv; isLinux || isFreeBSD) # Vaapi hardware acceleration
|
||||
, withVdpau ? withSmallDeps && !stdenv.hostPlatform.isMinGW # Vdpau hardware acceleration
|
||||
, withVideoToolbox ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple VideoToolbox
|
||||
, withVidStab ? withHeadlessDeps && withGPL # Video stabilization
|
||||
, withVmaf ? withFullDeps && !stdenv.hostPlatform.isAarch64 && lib.versionAtLeast version "5" # Netflix's VMAF (Video Multi-Method Assessment Fusion)
|
||||
, withVoAmrwbenc ? withFullDeps && withVersion3 # AMR-WB encoder
|
||||
@ -335,14 +330,9 @@
|
||||
, zlib
|
||||
, zvbi
|
||||
/*
|
||||
* Darwin frameworks
|
||||
* Darwin
|
||||
*/
|
||||
, Accelerate
|
||||
, AppKit
|
||||
, AudioToolbox
|
||||
, AVFoundation
|
||||
, CoreImage
|
||||
, VideoToolbox
|
||||
, apple-sdk_15
|
||||
, xcode # unfree contains metalcc and metallib
|
||||
/*
|
||||
* Cuda Packages
|
||||
@ -467,7 +457,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
})
|
||||
]
|
||||
++ optionals (lib.versionAtLeast version "7.1") [
|
||||
./0001-avfoundation.m-macOS-SDK-10.12-compatibility.patch
|
||||
./fix-fate-ffmpeg-spec-disposition-7.1.patch
|
||||
|
||||
# Expose a private API for Chromium / Qt WebEngine.
|
||||
@ -562,14 +551,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
(enableFeature withAlsa "alsa")
|
||||
(enableFeature withAmf "amf")
|
||||
(enableFeature withAom "libaom")
|
||||
(enableFeature withAppKit "appkit")
|
||||
(enableFeature withAribb24 "libaribb24")
|
||||
] ++ optionals (versionAtLeast version "6.1") [
|
||||
(enableFeature withAribcaption "libaribcaption")
|
||||
] ++ [
|
||||
(enableFeature withAss "libass")
|
||||
(enableFeature withAudioToolbox "audiotoolbox")
|
||||
(enableFeature withAvFoundation "avfoundation")
|
||||
(enableFeature withAvisynth "avisynth")
|
||||
(enableFeature withBluray "libbluray")
|
||||
(enableFeature withBs2b "libbs2b")
|
||||
@ -579,7 +565,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
(enableFeature withCelt "libcelt")
|
||||
(enableFeature withChromaprint "chromaprint")
|
||||
(enableFeature withCodec2 "libcodec2")
|
||||
(enableFeature withCoreImage "coreimage")
|
||||
(enableFeature withCuda "cuda")
|
||||
(enableFeature withCudaLLVM "cuda-llvm")
|
||||
(enableFeature withCudaNVCC "cuda-nvcc")
|
||||
@ -670,7 +655,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
] ++ optionals (versionAtLeast version "6.0") [
|
||||
(enableFeature withVpl "libvpl")
|
||||
] ++ [
|
||||
(enableFeature withVideoToolbox "videotoolbox")
|
||||
(enableFeature withVidStab "libvidstab") # Actual min. version 2.0
|
||||
(enableFeature withVmaf "libvmaf")
|
||||
(enableFeature withVoAmrwbenc "libvo-amrwbenc")
|
||||
@ -735,15 +719,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
++ optionals withCudaNVCC [ cuda_nvcc ];
|
||||
|
||||
buildInputs = []
|
||||
++ optionals stdenv.hostPlatform.isDarwin [ apple-sdk_15 ]
|
||||
++ optionals withAlsa [ alsa-lib ]
|
||||
++ optionals withAmf [ amf-headers ]
|
||||
++ optionals withAom [ libaom ]
|
||||
++ optionals withAppKit [ AppKit ]
|
||||
++ optionals withAribb24 [ aribb24 ]
|
||||
++ optionals withAribcaption [ libaribcaption ]
|
||||
++ optionals withAss [ libass ]
|
||||
++ optionals withAudioToolbox [ AudioToolbox ]
|
||||
++ optionals withAvFoundation [ AVFoundation ]
|
||||
++ optionals withAvisynth [ avisynthplus ]
|
||||
++ optionals withBluray [ libbluray ]
|
||||
++ optionals withBs2b [ libbs2b ]
|
||||
@ -753,7 +735,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
++ optionals withCelt [ celt ]
|
||||
++ optionals withChromaprint [ chromaprint ]
|
||||
++ optionals withCodec2 [ codec2 ]
|
||||
++ optionals withCoreImage [ CoreImage ]
|
||||
++ optionals withCudaNVCC [ cuda_cudart cuda_nvcc ]
|
||||
++ optionals withDav1d [ dav1d ]
|
||||
++ optionals withDc1394 [ libdc1394 libraw1394 ]
|
||||
@ -798,7 +779,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
++ optionals withQuirc [ quirc ]
|
||||
++ optionals withRav1e [ rav1e ]
|
||||
++ optionals withRtmp [ rtmpdump ]
|
||||
++ optionals withRubberband ([ rubberband ] ++ lib.optional stdenv.hostPlatform.isDarwin Accelerate)
|
||||
++ optionals withRubberband [ rubberband ]
|
||||
++ optionals withSamba [ samba ]
|
||||
++ optionals withSdl2 [ SDL2 ]
|
||||
++ optionals withShaderc [ shaderc ]
|
||||
@ -816,7 +797,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
++ optionals withV4l2 [ libv4l ]
|
||||
++ optionals withVaapi [ (if withSmallDeps then libva else libva-minimal) ]
|
||||
++ optionals withVdpau [ libvdpau ]
|
||||
++ optionals withVideoToolbox [ VideoToolbox ]
|
||||
++ optionals withVidStab [ vid-stab ]
|
||||
++ optionals withVmaf [ libvmaf ]
|
||||
++ optionals withVoAmrwbenc [ vo-amrwbenc ]
|
||||
|
Loading…
Reference in New Issue
Block a user