-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
~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"
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}] )
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
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} )
<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>
# This file requires >=portage-2.1.1
+# Luca Barbato <lu_zero@gentoo.org> (22 Jan 2017)
+# cuda is not available on x86 nvidia-video-codec depends on it
+media-video/libav nvidia
+
# Ilya Tumaykin <itumaykin+gentoo@gmail.com> (19 Jan 2017)
# Requires yet unavailable >=media-video/ffmpeg-3.3.
>=media-video/mpv-0.23.0 cuda