diff options
author | Zane van Iperen <zane@zanevaniperen.com> | 2022-01-22 12:53:14 +1000 |
---|---|---|
committer | Jonathan Ringer <jonringer@users.noreply.github.com> | 2022-01-24 15:31:51 -0800 |
commit | 7976f70bae1f688a2d1a9e1863710c63bbc16b5f (patch) | |
tree | dda689e39ce937ed55efe60370b52709ce3e3625 /pkgs/development/libraries/ffmpeg | |
parent | e79bb564af849cab074452a9ed24208e0002c716 (diff) |
ffmpeg_5: init at 5.0
Diffstat (limited to 'pkgs/development/libraries/ffmpeg')
3 files changed, 44 insertions, 1 deletions
diff --git a/pkgs/development/libraries/ffmpeg/0001-fate-ffmpeg-add-missing-samples-dependency-to-fate-s.patch b/pkgs/development/libraries/ffmpeg/0001-fate-ffmpeg-add-missing-samples-dependency-to-fate-s.patch new file mode 100644 index 0000000000000..ac016069357df --- /dev/null +++ b/pkgs/development/libraries/ffmpeg/0001-fate-ffmpeg-add-missing-samples-dependency-to-fate-s.patch @@ -0,0 +1,27 @@ +From a66b58d61caaae452785a2d69f5de9259ab27138 Mon Sep 17 00:00:00 2001 +From: James Almer <jamrial@gmail.com> +Date: Sun, 16 Jan 2022 00:32:52 -0300 +Subject: [PATCH] fate/ffmpeg: add missing samples dependency to fate-shortest + +Signed-off-by: James Almer <jamrial@gmail.com> +(cherry picked from commit b1ef5882e35d1a95e9c4838d0933084773055345) +--- + tests/fate/ffmpeg.mak | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak +index 0b00bb5b23..b80467d02e 100644 +--- a/tests/fate/ffmpeg.mak ++++ b/tests/fate/ffmpeg.mak +@@ -86,7 +86,7 @@ fate-unknown_layout-ac3: CMD = md5 -auto_conversion_filters \ + -guess_layout_max 0 -f s32le -ac 1 -ar 44100 -i $(TARGET_PATH)/$(AREF) \ + -f ac3 -flags +bitexact -c ac3_fixed + +-FATE_FFMPEG-$(call ALLYES, FILE_PROTOCOL LAVFI_INDEV RAWVIDEO_DEMUXER \ ++FATE_SAMPLES_FFMPEG-$(call ALLYES, FILE_PROTOCOL LAVFI_INDEV RAWVIDEO_DEMUXER \ + SINE_FILTER PCM_S16LE_DECODER RAWVIDEO_DECODER \ + ARESAMPLE_FILTER AMIX_FILTER MPEG4_ENCODER \ + AC3_FIXED_ENCODER FRAMECRC_MUXER PIPE_PROTOCOL) \ +-- +2.33.1 + diff --git a/pkgs/development/libraries/ffmpeg/5.nix b/pkgs/development/libraries/ffmpeg/5.nix new file mode 100644 index 0000000000000..7b79ddff77ebb --- /dev/null +++ b/pkgs/development/libraries/ffmpeg/5.nix @@ -0,0 +1,14 @@ +{ callPackage +# Darwin frameworks +, Cocoa, CoreMedia, VideoToolbox +, ... +}@args: + +callPackage ./generic.nix (rec { + version = "5.0"; + branch = version; + sha256 = "1ndy6a2bhl6nvz9grmcaakh4xi0vss455466s47l6qy7na6hn4y0"; + darwinFrameworks = [ Cocoa CoreMedia VideoToolbox ]; + + patches = [ ./0001-fate-ffmpeg-add-missing-samples-dependency-to-fate-s.patch ]; +} // args) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 876910da6d259..8f74fbd5a3d54 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -54,6 +54,8 @@ let ifMinVer = minVer: flag: if reqMin minVer then flag else null; + ifVerOlder = maxVer: flag: if (lib.versionOlder branch maxVer) then flag else null; + # Version specific fix verFix = withoutFix: fixVer: withFix: if reqMatch fixVer then withFix else withoutFix; @@ -121,7 +123,7 @@ stdenv.mkDerivation rec { (ifMinVer "0.6" "--enable-avdevice") "--enable-avfilter" (ifMinVer "0.6" "--enable-avformat") - (ifMinVer "1.0" "--enable-avresample") + (ifMinVer "1.0" (ifVerOlder "5.0" "--enable-avresample")) (ifMinVer "1.1" "--enable-avutil") "--enable-postproc" (ifMinVer "0.9" "--enable-swresample") |