aboutsummaryrefslogtreecommitdiff
path: root/ports/ffmpeg
diff options
context:
space:
mode:
authorMarc Bertola <5149167+marcbertola@users.noreply.github.com>2020-03-24 16:00:09 -0400
committerGitHub <noreply@github.com>2020-03-24 13:00:09 -0700
commit78a2116a4ad58a96d23146ffa8f8ca4d998a3a5a (patch)
tree9f9d629fdc040b796ada59006156667c4476b02d /ports/ffmpeg
parent2d9a32b46fc82d50aa7714a1a4bedc8f0d153dcc (diff)
downloadvcpkg-78a2116a4ad58a96d23146ffa8f8ca4d998a3a5a.tar.gz
vcpkg-78a2116a4ad58a96d23146ffa8f8ca4d998a3a5a.zip
[ffmpeg] Add NVIDIA Codec feature for Windows and Linux (#9171)
* Add NVIDIA Codec support for Windows, Linux and Linux for Tegra * [ffnvcodec] Fix typos, add/remove comments * Bump nvcodec version to 9.1.23.1 * Update version number as per change request * Use PORT variable instead of hardcoded portname * Identify the release the hash pertains to * Find nvcodec in 'installed' instead of 'packages' * Force FFmpeg to look for nvcodec headers in the installed directory instead of /usr/lib/pkgconfig. * Use p option on cygpath to convert full path in case it contains more than one entry
Diffstat (limited to 'ports/ffmpeg')
-rw-r--r--ports/ffmpeg/CONTROL4
-rw-r--r--ports/ffmpeg/build.sh1
-rw-r--r--ports/ffmpeg/build_linux.sh1
-rw-r--r--ports/ffmpeg/portfile.cmake7
4 files changed, 13 insertions, 0 deletions
diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL
index 9b08398db..ef26c4d97 100644
--- a/ports/ffmpeg/CONTROL
+++ b/ports/ffmpeg/CONTROL
@@ -53,3 +53,7 @@ Description: upgrade (L)GPL to version 3
Feature: avresample
Description: Libav audio resampling library support in ffmpeg
+
+Feature: nvcodec
+Build-Depends: ffnvcodec, cuda
+Description: Hardware accelerated codecs \ No newline at end of file
diff --git a/ports/ffmpeg/build.sh b/ports/ffmpeg/build.sh
index 048d9ec08..40f1797cd 100644
--- a/ports/ffmpeg/build.sh
+++ b/ports/ffmpeg/build.sh
@@ -1,6 +1,7 @@
#!/usr/bin/bash
set -e
export PATH=/usr/bin:$PATH
+export PKG_CONFIG_PATH="`cygpath -p ${PKG_CONFIG_PATH}`"
# Export HTTP(S)_PROXY as http(s)_proxy:
if [ "$HTTP_PROXY" ]; then
export http_proxy=$HTTP_PROXY
diff --git a/ports/ffmpeg/build_linux.sh b/ports/ffmpeg/build_linux.sh
index b24be1346..d7360ce1d 100644
--- a/ports/ffmpeg/build_linux.sh
+++ b/ports/ffmpeg/build_linux.sh
@@ -16,6 +16,7 @@ PATH_TO_PACKAGE_DIR=$3
cd "$PATH_TO_BUILD_DIR"
echo "=== CONFIGURING ==="
+chmod a+x "$PATH_TO_SRC_DIR/configure"
"$PATH_TO_SRC_DIR/configure" "--prefix=$PATH_TO_PACKAGE_DIR" $4
echo "=== BUILDING ==="
make -j6
diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake
index b1ddd0ddf..6e861a051 100644
--- a/ports/ffmpeg/portfile.cmake
+++ b/ports/ffmpeg/portfile.cmake
@@ -131,6 +131,12 @@ if("avresample" IN_LIST FEATURES)
set(OPTIONS "${OPTIONS} --enable-avresample")
endif()
+if("nvcodec" IN_LIST FEATURES)
+ set(OPTIONS "${OPTIONS} --enable-cuda --enable-nvenc --enable-cuvid --disable-libnpp")
+else()
+ set(OPTIONS "${OPTIONS} --disable-cuda --disable-nvenc --disable-cuvid --disable-libnpp")
+endif()
+
set(OPTIONS_CROSS "")
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
@@ -177,6 +183,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
endif()
set(ENV_LIB_PATH "$ENV{${LIB_PATH_VAR}}")
+set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/lib/pkgconfig")
message(STATUS "Building Options: ${OPTIONS}")