diff options
| author | Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> | 2019-08-19 21:40:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-19 21:40:43 +0200 |
| commit | 70f4aabbe8bf5273e11a03f804d4361354cf0a11 (patch) | |
| tree | c2d553869f70b8fce7b2539bcaa8ffb8bb8aa0cc /ports/ffmpeg | |
| parent | 173642528e2cf7a3f18b41d903b5ff5a758d34ae (diff) | |
| parent | 8e7ce6d91a060bba5f9e252a5d9aad92f5bd4a56 (diff) | |
| download | vcpkg-70f4aabbe8bf5273e11a03f804d4361354cf0a11.tar.gz vcpkg-70f4aabbe8bf5273e11a03f804d4361354cf0a11.zip | |
Merge branch 'master' into path_separator
Diffstat (limited to 'ports/ffmpeg')
| -rw-r--r-- | ports/ffmpeg/CONTROL | 6 | ||||
| -rw-r--r-- | ports/ffmpeg/FindFFMPEG.cmake | 55 | ||||
| -rw-r--r-- | ports/ffmpeg/configure_opencv.patch | 11 | ||||
| -rw-r--r-- | ports/ffmpeg/portfile.cmake | 5 |
4 files changed, 53 insertions, 24 deletions
diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index 3bbf544c1..724a849c2 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,5 +1,6 @@ Source: ffmpeg -Version: 4.1-9 +Version: 4.1-11 +Build-Depends: zlib 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. @@ -45,3 +46,6 @@ Description: allow nonfree and unredistributable libraries Feature: gpl Description: allow GPL licensed libraries + +Feature: avresample +Description: Libav audio resampling library support in ffmpeg diff --git a/ports/ffmpeg/FindFFMPEG.cmake b/ports/ffmpeg/FindFFMPEG.cmake index 65ab59e90..4ed03f457 100644 --- a/ports/ffmpeg/FindFFMPEG.cmake +++ b/ports/ffmpeg/FindFFMPEG.cmake @@ -35,6 +35,8 @@ include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) include(${CMAKE_ROOT}/Modules/CMakeFindDependencyMacro.cmake) +set(FFMPEG_VERSION "4.1") + find_dependency(Threads) #list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS Threads::Threads) if(UNIX) @@ -44,7 +46,7 @@ endif() # Platform dependent libraries required by FFMPEG if(WIN32) if(NOT CYGWIN) - list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS wsock32 ws2_32 Secur32) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS wsock32 ws2_32 Secur32 bcrypt) endif() else() list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS m) @@ -83,17 +85,41 @@ macro(FFMPEG_FIND_GENEX varname shortname headername) set(FFMPEG_${varname}_FOUND 1) list(APPEND FFMPEG_LIBRARY_DIRS ${FFMPEG_${varname}_LIBRARY_RELEASE_DIR} ${FFMPEG_${varname}_LIBRARY_DEBUG_DIR}) endif() -endmacro(FFMPEG_FIND) +endmacro(FFMPEG_FIND_GENEX) if(WIN32) - if(NOT FFMPEG_${varname}_INCLUDE_DIRS) - find_path(FFMPEG_stdint_INCLUDE_DIRS NAMES stdint.h PATH_SUFFIXES ffmpeg) + FFMPEG_FIND_GENEX(libzlib zlib zlib.h) +else() + FFMPEG_FIND_GENEX(libzlib z zlib.h) +endif() + +if(APPLE) + find_library(VT_UNIT VideoToolbox) + if (NOT VT_UNIT) + message(FATAL_ERROR "VideoToolbox not found") endif() - if (FFMPEG_stdint_INCLUDE_DIRS) - set(STDINT_OK TRUE) + find_library(AT_UNIT AudioToolbox) + if (NOT AT_UNIT) + message(FATAL_ERROR "AudioToolbox not found") endif() -else() - set(STDINT_OK TRUE) + find_library(SEC_UNIT Security) + if (NOT SEC_UNIT) + message(FATAL_ERROR "Security not found") + endif() + find_library(CF_UNIT CoreFoundation) + if (NOT CF_UNIT) + message(FATAL_ERROR "CoreFoundation not found") + endif() + find_library(CM_UNIT CoreMedia) + if (NOT CM_UNIT) + message(FATAL_ERROR "CoreMedia not found") + endif() + find_library(CV_UNIT CoreVideo) + if (NOT CV_UNIT) + message(FATAL_ERROR "CoreVideo not found") + endif() + find_package(Iconv QUIET) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS ${VT_UNIT} ${AT_UNIT} ${SEC_UNIT} ${CF_UNIT} ${CM_UNIT} ${CV_UNIT} ${Iconv_LIBRARIES}) endif() FFMPEG_FIND(libavcodec avcodec avcodec.h) @@ -103,13 +129,20 @@ FFMPEG_FIND(libavformat avformat avformat.h) FFMPEG_FIND(libavutil avutil avutil.h) FFMPEG_FIND(libswresample swresample swresample.h) FFMPEG_FIND(libswscale swscale swscale.h) -FFMPEG_FIND_GENEX(libzlib zlib zlib.h) -if (FFMPEG_libavcodec_FOUND AND FFMPEG_libavdevice_FOUND AND FFMPEG_libavfilter_FOUND AND FFMPEG_libavformat_FOUND AND FFMPEG_libavutil_FOUND AND FFMPEG_libswresample_FOUND AND FFMPEG_libswscale_FOUND AND FFMPEG_libzlib_FOUND AND STDINT_OK) - list(APPEND FFMPEG_INCLUDE_DIRS ${FFMPEG_libavformat_INCLUDE_DIRS} ${FFMPEG_libavdevice_INCLUDE_DIRS} ${FFMPEG_libavcodec_INCLUDE_DIRS} ${FFMPEG_libavutil_INCLUDE_DIRS} ${FFMPEG_libswscale_INCLUDE_DIRS} ${FFMPEG_stdint_INCLUDE_DIRS}) +if (FFMPEG_libavcodec_FOUND AND FFMPEG_libavdevice_FOUND AND FFMPEG_libavfilter_FOUND AND FFMPEG_libavformat_FOUND AND FFMPEG_libavutil_FOUND AND FFMPEG_libswresample_FOUND AND FFMPEG_libswscale_FOUND AND FFMPEG_libzlib_FOUND) + list(APPEND FFMPEG_INCLUDE_DIRS ${FFMPEG_libavformat_INCLUDE_DIRS} ${FFMPEG_libavdevice_INCLUDE_DIRS} ${FFMPEG_libavcodec_INCLUDE_DIRS} ${FFMPEG_libavutil_INCLUDE_DIRS} ${FFMPEG_libswscale_INCLUDE_DIRS}) list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS) list(REMOVE_DUPLICATES FFMPEG_LIBRARY_DIRS) + set(FFMPEG_libavformat_VERSION "${FFMPEG_VERSION}" CACHE STRING "") + set(FFMPEG_libavdevice_VERSION "${FFMPEG_VERSION}" CACHE STRING "") + set(FFMPEG_libavcodec_VERSION "${FFMPEG_VERSION}" CACHE STRING "") + set(FFMPEG_libavutil_VERSION "${FFMPEG_VERSION}" CACHE STRING "") + set(FFMPEG_libswscale_VERSION "${FFMPEG_VERSION}" CACHE STRING "") + set(FFMPEG_libavfilter_VERSION "${FFMPEG_VERSION}" CACHE STRING "") + set(FFMPEG_libswresample_VERSION "${FFMPEG_VERSION}" CACHE STRING "") + list(APPEND FFMPEG_LIBRARIES ${FFMPEG_libavformat_LIBRARY} ${FFMPEG_libavdevice_LIBRARY} diff --git a/ports/ffmpeg/configure_opencv.patch b/ports/ffmpeg/configure_opencv.patch deleted file mode 100644 index ac5c82797..000000000 --- a/ports/ffmpeg/configure_opencv.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure
-+++ b/configure
-@@ -6110,7 +6110,7 @@ enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec
- enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb
- enabled libopencv && { check_headers opencv2/core/core_c.h &&
- { check_pkg_config libopencv opencv opencv2/core/core_c.h cvCreateImageHeader ||
-- require libopencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
-+ require opencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core341 -lopencv_imgproc341; } ||
- require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; }
- enabled libopenh264 && require_pkg_config libopenh264 openh264 wels/codec_api.h WelsGetCodecVersion
- enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version ||
diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 7309bd544..079880ab3 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -12,7 +12,6 @@ vcpkg_extract_source_archive_ex( PATCHES create-lib-libraries.patch detect-openssl.patch - configure_opencv.patch fix_windowsinclude-in-ffmpegexe-1.patch fix_windowsinclude-in-ffmpegexe-2.patch fix_libvpx_windows_linking.patch @@ -126,6 +125,10 @@ else() set(OPTIONS "${OPTIONS} --disable-bzlib") endif() +if("avresample" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-avresample") +endif() + set(OPTIONS_CROSS "") if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") |
