[ffmpeg] avfilter: fix dependencies and linux library ordering (#16000)

* [ffmpeg] avfilter: fix library ordering on linux and fix feature dependencies

* [ffmpeg] bump port version

* [ffmpeg] add OpenGL, Foundation, CoreGraphics, AppKit and CoreImage for osx (needed for avfilter)

* [ffmpeg] update git-tree

* [ffmpeg] restrict new osx dependencies to avfilter feature

* [ffmpeg] update git-tree

* [ffmpeg] remove avfilter dependencies

Note this exposes a bug in upstream, will need fix in ffmpeg configure script itself.

* [ffmpeg] improve macos framework dependencies

* [ffmpeg] update git-tree

* [ffmpeg] patch for filter dependencies in configure script

* [ffmpeg] update git-tree

* [ffmpeg] apple framework fix: securetransport is part of avformat and not avdevice

* [ffmpeg] update git-tree
This commit is contained in:
Matthias C. M. Troffaes 2021-02-09 02:09:01 +00:00 committed by GitHub
parent 96a1f9c78d
commit df76decfd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 55 additions and 25 deletions

View File

@ -0,0 +1,23 @@
diff --git a/configure b/configure
index a092a6b457..41e55b4101 100755
--- a/configure
+++ b/configure
@@ -3666,6 +3666,18 @@ vpp_qsv_filter_select="qsvvpp"
xfade_opencl_filter_deps="opencl"
yadif_cuda_filter_deps="ffnvcodec"
yadif_cuda_filter_deps_any="cuda_nvcc cuda_llvm"
+ametadata_filter_deps="avformat"
+metadata_filter_deps="avformat"
+headphone_filter_deps="avcodec"
+headphone_filter_select="fft"
+showspatial_filter_deps="avcodec"
+showspatial_filter_select="fft"
+superequalizer_filter_deps="avcodec"
+superequalizer_filter_select="rdft"
+surround_filter_deps="avcodec"
+surround_filter_select="rdft"
+sinc_filter_deps="avcodec"
+sinc_filter_select="rdft"
# examples
avio_list_dir_deps="avformat avutil"

View File

@ -1,6 +1,6 @@
Source: ffmpeg
Version: 4.3.1
Port-Version: 10
Port-Version: 11
Homepage: https://ffmpeg.org
Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.
FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.

View File

@ -62,6 +62,16 @@ function(select_library_configurations_from_targets)
set(${_slc_BASENAME}_LIBRARIES ${${_slc_BASENAME}_LIBRARIES} PARENT_SCOPE)
endfunction()
# for finding system libraries (e.g. Apple framework libraries)
function(find_platform_dependent_libraries)
cmake_parse_arguments(_fpd "" "" "NAMES" ${ARGN})
foreach(_name ${_fpd_NAMES})
find_library(${_name}_LIBRARY ${_name} REQUIRED)
list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS ${${_name}_LIBRARY})
endforeach()
set(FFMPEG_PLATFORM_DEPENDENT_LIBS ${FFMPEG_PLATFORM_DEPENDENT_LIBS} PARENT_SCOPE)
endfunction()
set(FFMPEG_VERSION "4.3.1")
find_dependency(Threads)
@ -230,45 +240,36 @@ macro(FFMPEG_FIND varname shortname headername)
endmacro(FFMPEG_FIND)
if(APPLE)
find_library(VT_UNIT VideoToolbox)
if (NOT VT_UNIT)
message(FATAL_ERROR "VideoToolbox not found")
find_platform_dependent_libraries(NAMES VideoToolbox CoreServices CoreMedia CoreVideo)
if(@ENABLE_OPENCL@)
find_platform_dependent_libraries(NAMES OpenCL)
endif()
find_library(AT_UNIT AudioToolbox)
if (NOT AT_UNIT)
message(FATAL_ERROR "AudioToolbox not found")
if(@ENABLE_AVDEVICE@)
find_platform_dependent_libraries(NAMES AVFoundation CoreFoundation CoreGraphics Foundation)
endif()
find_library(SEC_UNIT Security)
if (NOT SEC_UNIT)
message(FATAL_ERROR "Security not found")
if(@ENABLE_AVFILTER@)
find_platform_dependent_libraries(NAMES OpenGL AppKit CoreImage)
endif()
find_library(CF_UNIT CoreFoundation)
if (NOT CF_UNIT)
message(FATAL_ERROR "CoreFoundation not found")
if(@ENABLE_AVFORMAT@)
find_platform_dependent_libraries(NAMES Security)
endif()
find_library(CM_UNIT CoreMedia)
if (NOT CM_UNIT)
message(FATAL_ERROR "CoreMedia not found")
if(@ENABLE_AVCODEC@)
find_platform_dependent_libraries(NAMES AudioToolbox)
endif()
find_library(CV_UNIT CoreVideo)
if (NOT CV_UNIT)
message(FATAL_ERROR "CoreVideo not found")
endif()
list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS ${VT_UNIT} ${AT_UNIT} ${SEC_UNIT} ${CF_UNIT} ${CM_UNIT} ${CV_UNIT})
endif()
if(@ENABLE_AVDEVICE@)
FFMPEG_FIND(libavdevice avdevice avdevice.h)
endif()
if(@ENABLE_AVFILTER@)
FFMPEG_FIND(libavfilter avfilter avfilter.h)
endif()
if(@ENABLE_AVFORMAT@)
FFMPEG_FIND(libavformat avformat avformat.h)
endif()
if(@ENABLE_AVCODEC@)
FFMPEG_FIND(libavcodec avcodec avcodec.h)
endif()
if(@ENABLE_AVFILTER@)
FFMPEG_FIND(libavfilter avfilter avfilter.h)
endif()
if(@ENABLE_AVRESAMPLE@)
FFMPEG_FIND(libavresample avresample avresample.h)
endif()

View File

@ -17,6 +17,7 @@ vcpkg_from_github(
0011-Fix-x265-detection.patch
0012-Fix-ssl-110-detection.patch
0013-define-WINVER.patch
0014-avfilter-dependency-fix.patch
)
if (SOURCE_PATH MATCHES " ")

View File

@ -1910,7 +1910,7 @@
},
"ffmpeg": {
"baseline": "4.3.1",
"port-version": 10
"port-version": 11
},
"ffnvcodec": {
"baseline": "10.0.26.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "985bdde5191e69e38ecda3472663614fcd491052",
"version-string": "4.3.1",
"port-version": 11
},
{
"git-tree": "93395ca1a700faa1c8c6ce04ef4a6dfa26e9fade",
"version-string": "4.3.1",