summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2017-01-22 16:06:04 +0000
committerLuca Barbato <lu_zero@gentoo.org>2017-01-22 16:06:58 +0000
commitbb5e2dc22c3dbcea53c5f34e7ea924d0bfc322df (patch)
tree22679747a9807d5455bc153ff4775886bfc5d935 /media-video
parentdev-python/BitVector: bump to 3.4.6 (diff)
downloadgentoo-bb5e2dc22c3dbcea53c5f34e7ea924d0bfc322df.tar.gz
gentoo-bb5e2dc22c3dbcea53c5f34e7ea924d0bfc322df.tar.bz2
gentoo-bb5e2dc22c3dbcea53c5f34e7ea924d0bfc322df.zip
media-video/libav: Add nvidia-video-codec support
Package-Manager: portage-2.3.3
Diffstat (limited to 'media-video')
-rw-r--r--media-video/libav/libav-12.ebuild13
-rw-r--r--media-video/libav/metadata.xml1
2 files changed, 11 insertions, 3 deletions
diff --git a/media-video/libav/libav-12.ebuild b/media-video/libav/libav-12.ebuild
index 57a650750f27..214466a166a3 100644
--- a/media-video/libav/libav-12.ebuild
+++ b/media-video/libav/libav-12.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -37,7 +37,7 @@ SLOT="0/12"
~x64-solaris ~x86-solaris"
IUSE="aac alsa amr bs2b +bzip2 cdio cpudetection custom-cflags debug doc +encode faac fdk
frei0r fontconfig +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k libressl mp3
- +network openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl
+ +network nvidia openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl
static-libs test theora threads tools truetype twolame v4l vaapi vdpau vorbis vpx X
wavpack webp x264 x265 xvid +zlib"
@@ -79,6 +79,7 @@ RDEPEND="
x265? ( >=media-libs/x265-1.2:=[${MULTILIB_USEDEP}] )
xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
)
+ nvidia? ( media-video/nvidia-video-codec[${MULTILIB_USEDEP}] )
fdk? ( >=media-libs/fdk-aac-0.1.2[${MULTILIB_USEDEP}] )
frei0r? ( media-plugins/frei0r-plugins )
gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
@@ -139,7 +140,7 @@ REQUIRED_USE="
test? ( encode zlib )
fontconfig? ( truetype )
"
-RESTRICT="faac? ( bindist ) fdk? ( bindist ) openssl? ( bindist )"
+RESTRICT="faac? ( bindist ) fdk? ( bindist ) openssl? ( bindist ) nvidia? ( bindist )"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/libavutil/avconfig.h
@@ -200,12 +201,18 @@ multilib_src_configure() {
use vaapi && myconf+=( --enable-vaapi )
+ NVIDIA_INCLUDES="-I/opt/nvidia-video-codec/include -I/opt/cuda/include"
+ NVIDIA_LIBS="-L/opt/cuda/lib64"
+ use nvidia && myconf+=( --enable-nonfree --enable-cuda --enable-libnpp
+ --extra-cflags="$NVIDIA_INCLUDES" --extra-ldflags="$NVIDIA_LIBS" )
+
# Encoders
if use encode; then
use faac && myconf+=( --enable-nonfree )
use mp3 && myconf+=( --enable-libmp3lame )
use amr && myconf+=( --enable-libvo-amrwbenc )
use aac && myconf+=( --enable-libvo-aacenc )
+ use nvidia && myconf+=( --enable-nvenc )
uses="faac theora twolame vorbis wavpack webp x264 x265 xvid"
for i in ${uses}; do
use ${i} && myconf+=( --enable-lib${i} )
diff --git a/media-video/libav/metadata.xml b/media-video/libav/metadata.xml
index 9277436519b1..222399a18306 100644
--- a/media-video/libav/metadata.xml
+++ b/media-video/libav/metadata.xml
@@ -20,6 +20,7 @@
<flag name="gpl">Build all GPL licensed code. Without this flag set the package is build under LGPL license.</flag>
<flag name="hardcoded-tables">Use pre-calculated tables rather than calculating them on the fly.</flag>
<flag name="network">Enable network streaming support.</flag>
+ <flag name="nvidia">Enable nvidia video codec hardware acceleration support.</flag>
<flag name="openssl">Prefer <pkg>dev-libs/openssl</pkg> over <pkg>net-libs/gnutls</pkg> to provide SSL/TLS support (notice: the resulting binaries are unredistributable).</flag>
<flag name="opus">Use the external opus library for encoding and decoding.</flag>
<flag name="pulseaudio">Enable pulseaudio input support.</flag>