media-video/mpv: support Nvidia CUDA HW acceleration in 9999
authorIlya Tumaykin <itumaykin@gmail.com>
Mon, 16 Jan 2017 11:47:21 +0000 (14:47 +0300)
committerDavid Seifert <soap@gentoo.org>
Thu, 19 Jan 2017 10:31:32 +0000 (11:31 +0100)
Requires ffmpeg with e6464a44, which will be available in ffmpeg-3.3
and is already available in ffmpeg-9999. Not available in libav.

Many thanks to Alex (@fhlfibh) for testing.

Gentoo-Bug: 603974
Package-Manager: Portage-2.3.3, Repoman-2.3.1

media-video/mpv/metadata.xml
media-video/mpv/mpv-9999.ebuild

index e03b9736cefdbc68b88f29cb8123f6dbc17a903e..766481dfde9deffd3c4c5068f09ead5c0fc3e346 100644 (file)
@@ -17,8 +17,9 @@
                <flag name="archive">Enable support for various archive formats via <pkg>app-arch/libarchive</pkg></flag>
                <flag name="bluray">Enable playback of Blu-ray filesystems</flag>
                <flag name="bs2b">Enable Bauer stereophonic-to-binaural headphone filter</flag>
-               <flag name="cli">Build mpv CLI player</flag>
                <flag name="cdio">Enable CDDA support via <pkg>dev-libs/libcdio-paranoia</pkg></flag>
+               <flag name="cli">Build mpv CLI player</flag>
+               <flag name="cuda">Enable hardware video decoding via Nvidia CUDA</flag>
                <flag name="doc-pdf">Build documentation in pdf format</flag>
                <flag name="drm">Enable Kernel Mode Setting / Direct Rendering Manager based video output</flag>
                <flag name="egl">Enable support for various EGL-based video outputs</flag>
index a2b8798d425948af9e9b42468f519d0df40d2445..d426d7131699688a9e6079fd651459f10ac0bdb6 100644 (file)
@@ -28,15 +28,16 @@ DOCS+=( README.md )
 # See Copyright in sources and Gentoo bug 506946. Waf is BSD, libmpv is ISC.
 LICENSE="GPL-2+ BSD ISC"
 SLOT="0"
-IUSE="+alsa aqua archive bluray cdda +cli coreaudio doc drm dvb dvd +egl encode
-       gbm +iconv jack jpeg lcms +libass libav libcaca libmpv +lua luajit openal
-       +opengl oss pulseaudio raspberry-pi rubberband samba sdl selinux test tools
-       +uchardet v4l vaapi vdpau vf-dlopen wayland +X xinerama +xscreensaver +xv
-       zsh-completion"
+IUSE="+alsa aqua archive bluray cdda +cli coreaudio cuda doc drm dvb dvd +egl
+       encode gbm +iconv jack jpeg lcms +libass libav libcaca libmpv +lua luajit
+       openal +opengl oss pulseaudio raspberry-pi rubberband samba sdl selinux
+       test tools +uchardet v4l vaapi vdpau vf-dlopen wayland +X xinerama
+       +xscreensaver +xv zsh-completion"
 
 REQUIRED_USE="
        || ( cli libmpv )
        aqua? ( opengl )
+       cuda? ( !libav )
        egl? ( || ( gbm X wayland ) )
        gbm? ( drm egl )
        lcms? ( || ( opengl egl ) )
@@ -62,6 +63,7 @@ COMMON_DEPEND="
        archive? ( >=app-arch/libarchive-3.0.0:= )
        bluray? ( >=media-libs/libbluray-0.3.0 )
        cdda? ( dev-libs/libcdio-paranoia )
+       cuda? ( >=media-video/ffmpeg-3.3:0 )
        drm? ( x11-libs/libdrm )
        dvd? (
                >=media-libs/libdvdnav-4.2.0
@@ -122,6 +124,7 @@ DEPEND="${COMMON_DEPEND}
        zsh-completion? ( dev-lang/perl )
 "
 RDEPEND="${COMMON_DEPEND}
+       cuda? ( x11-drivers/nvidia-drivers[X] )
        selinux? ( sec-policy/selinux-mplayer )
        tools? ( ${PYTHON_DEPS} )
 "
@@ -241,7 +244,7 @@ src_configure() {
                # Automagic Video Toolbox HW acceleration. See Gentoo bug 577332.
                $(use_enable vaapi vaapi-hwaccel)
                $(use_enable vdpau vdpau-hwaccel)
-               --disable-cuda-hwaccel  # No support in ffmpeg. See Gentoo bug 595450.
+               $(use_enable cuda cuda-hwaccel)
 
                # TV features:
                $(use_enable v4l tv)