Merge pull request #281753 from Atemu/ffmpeg-vulkan-default

ffmpeg: enable vulkan in small variant
This commit is contained in:
Atemu 2024-02-20 13:21:54 +01:00 committed by GitHub
commit dff14f8dac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,7 +93,7 @@
, withVoAmrwbenc ? withFullDeps && withVersion3 # AMR-WB encoder
, withVorbis ? withHeadlessDeps # Vorbis de/encoding, native encoder exists
, withVpx ? withHeadlessDeps && stdenv.buildPlatform == stdenv.hostPlatform # VP8 & VP9 de/encoding
, withVulkan ? withFullDeps && !stdenv.isDarwin
, withVulkan ? withSmallDeps && !stdenv.isDarwin
, withWebp ? withFullDeps # WebP encoder
, withX264 ? withHeadlessDeps && withGPL # H.264/AVC encoder
, withX265 ? withHeadlessDeps && withGPL # H.265/HEVC encoder
@ -707,6 +707,10 @@ stdenv.mkDerivation (finalAttrs: {
postFixup = optionalString (stdenv.isLinux && withLib) ''
addOpenGLRunpath ${placeholder "lib"}/lib/libavcodec.so
addOpenGLRunpath ${placeholder "lib"}/lib/libavutil.so
''
# https://trac.ffmpeg.org/ticket/10809
+ optionalString (versionAtLeast version "5.0" && withVulkan) ''
patchelf $lib/lib/libavcodec.so --add-needed libvulkan.so --add-rpath ${lib.makeLibraryPath [ vulkan-loader ]}
'';
enableParallelBuilding = true;