vaapi: change license to LGPL

Originally mpv vaapi support was based on the MPlayer-vaapi patches.
These were never merged in upstream MPlayer. The license headers
indicated they were GPL-only. Although the actual author agreed to
relicensing, the company employing him to write this code did not, so
the original code is unusable to us.

Fortunately, vaapi support was refactored and rewritten several times,
meaning little code is actually left. The previous commits removed or
moved that to GPL-only code. Namely, vo_vaapi.c remains GPL-only. The
other code went away or became unnecessary mainly because libavcodec
itself gained the ability to manage the hw decoder, and libavutil
provides code to manage vaapi surfaces. We also changed to mainly using
EGL interop, making any of the old rendering code unnecessary.

hwdec_vaglx.c is still GPL. It's possibly relicensable, because much of
it was changed, but I'm not too sure and further investigation would be
required. Also, this has been disabled by default for a while now, so
bothering with this is a waste of time. This commit simply disables it
at compile time as well in LGPL mode.
This commit is contained in:
wm4 2017-09-29 18:44:47 +02:00
parent 6a69e897ff
commit e544c3f7b3
6 changed files with 19 additions and 20 deletions

View File

@ -40,7 +40,7 @@ a number of useful features, some of them quite central:
- Linux X11 video output - Linux X11 video output
- Linux audio output via ALSA (PulseAudio works) - Linux audio output via ALSA (PulseAudio works)
- BSD audio output via OSS - BSD audio output via OSS
- Linux hardware decoding (vaapi, vdpau) - NVIDIA/Linux hardware decoding (vdpau, although CUDA usually works)
- many builtin video filters (use libavfilter instead) - many builtin video filters (use libavfilter instead)
- automatic rotation and stereoscopic video handling - automatic rotation and stereoscopic video handling
- Linux TV input - Linux TV input
@ -119,7 +119,6 @@ The following files are still GPL:
video/out/vo_x11.c probably impossible video/out/vo_x11.c probably impossible
video/out/vo_xv.c probably impossible video/out/vo_xv.c probably impossible
video/out/x11_common.* probably impossible video/out/x11_common.* probably impossible
video/vaapi.* hard (GPL-only parts must be ifdefed)
video/vdpau.c hard (GPL-only parts must be ifdefed) video/vdpau.c hard (GPL-only parts must be ifdefed)
video/vdpau.h unknown video/vdpau.h unknown
video/vdpau_mixer.* actual code must be rewritten video/vdpau_mixer.* actual code must be rewritten

View File

@ -86,7 +86,7 @@ const struct vo_driver *const video_out_drivers[] =
#if HAVE_SDL2 #if HAVE_SDL2
&video_out_sdl, &video_out_sdl,
#endif #endif
#if HAVE_VAAPI_X11 #if HAVE_VAAPI_X11 && HAVE_GPL
&video_out_vaapi, &video_out_vaapi,
#endif #endif
#if HAVE_X11 #if HAVE_X11

View File

@ -1,18 +1,18 @@
/* /*
* This file is part of mpv. * This file is part of mpv.
* *
* mpv is free software; you can redistribute it and/or modify * mpv is free software; you can redistribute it and/or
* it under the terms of the GNU General Public License as published by * modify it under the terms of the GNU Lesser General Public
* the Free Software Foundation; either version 2 of the License, or * License as published by the Free Software Foundation; either
* (at your option) any later version. * version 2.1 of the License, or (at your option) any later version.
* *
* mpv is distributed in the hope that it will be useful, * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU Lesser General Public License for more details.
* *
* You should have received a copy of the GNU General Public License along * You should have received a copy of the GNU Lesser General Public
* with mpv. If not, see <http://www.gnu.org/licenses/>. * License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <assert.h> #include <assert.h>

View File

@ -1,18 +1,18 @@
/* /*
* This file is part of mpv. * This file is part of mpv.
* *
* mpv is free software; you can redistribute it and/or modify * mpv is free software; you can redistribute it and/or
* it under the terms of the GNU General Public License as published by * modify it under the terms of the GNU Lesser General Public
* the Free Software Foundation; either version 2 of the License, or * License as published by the Free Software Foundation; either
* (at your option) any later version. * version 2.1 of the License, or (at your option) any later version.
* *
* mpv is distributed in the hope that it will be useful, * mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU Lesser General Public License for more details.
* *
* You should have received a copy of the GNU General Public License along * You should have received a copy of the GNU Lesser General Public
* with mpv. If not, see <http://www.gnu.org/licenses/>. * License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef MPV_VAAPI_H #ifndef MPV_VAAPI_H

View File

@ -700,7 +700,7 @@ video_output_features = [
}, { }, {
'name': '--vaapi', 'name': '--vaapi',
'desc': 'VAAPI acceleration', 'desc': 'VAAPI acceleration',
'deps': 'gpl && libdl && (x11 || wayland || egl-drm)', 'deps': 'libdl && (x11 || wayland || egl-drm)',
'func': check_pkg_config('libva', '>= 0.36.0'), 'func': check_pkg_config('libva', '>= 0.36.0'),
}, { }, {
'name': '--vaapi-x11', 'name': '--vaapi-x11',
@ -720,7 +720,7 @@ video_output_features = [
}, { }, {
'name': '--vaapi-glx', 'name': '--vaapi-glx',
'desc': 'VAAPI GLX', 'desc': 'VAAPI GLX',
'deps': 'vaapi-x11 && gl-x11', 'deps': 'gpl && vaapi-x11 && gl-x11',
'func': check_true, 'func': check_true,
}, { }, {
'name': '--vaapi-x-egl', 'name': '--vaapi-x-egl',

View File

@ -436,7 +436,7 @@ def build(ctx):
( "video/out/vo_opengl_cb.c", "gl" ), ( "video/out/vo_opengl_cb.c", "gl" ),
( "video/out/vo_sdl.c", "sdl2" ), ( "video/out/vo_sdl.c", "sdl2" ),
( "video/out/vo_tct.c" ), ( "video/out/vo_tct.c" ),
( "video/out/vo_vaapi.c", "vaapi-x11" ), ( "video/out/vo_vaapi.c", "vaapi-x11 && gpl" ),
( "video/out/vo_vdpau.c", "vdpau" ), ( "video/out/vo_vdpau.c", "vdpau" ),
( "video/out/vo_wayland.c", "wayland" ), ( "video/out/vo_wayland.c", "wayland" ),
( "video/out/vo_x11.c" , "x11" ), ( "video/out/vo_x11.c" , "x11" ),