Skip to content

Commit

Permalink
build: add preliminary LGPL mode
Browse files Browse the repository at this point in the history
See "Copyright" file for caveats.

This changes the remaining "almost LGPL" files to LGPL, because we think
that the conditions the author set for these was finally fulfilled.
  • Loading branch information
wm4 committed Sep 21, 2017
1 parent fdb300b commit bfa9b62
Show file tree
Hide file tree
Showing 19 changed files with 183 additions and 389 deletions.
309 changes: 51 additions & 258 deletions Copyright

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions audio/filter/af.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include <sys/types.h>

#include "config.h"
#if !HAVE_LIBAF
#error "libaf disabled"
#if !(HAVE_LIBAF && HAVE_GPL)
#error "libaf/GPL disabled"
#endif

#include "options/options.h"
Expand Down
16 changes: 7 additions & 9 deletions common/av_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,18 @@
*
* This file is part of mpv.
*
* mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* mpv is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* 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
* with mpv. If not, see <http://www.gnu.org/licenses/>.
*
* Almost LGPL.
* You should have received a copy of the GNU Lesser General Public
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/

#include <stdlib.h>
Expand Down
16 changes: 7 additions & 9 deletions common/msg.c
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
/*
* This file is part of mpv.
*
* mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* mpv is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* 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
* with mpv. If not, see <http://www.gnu.org/licenses/>.
*
* Almost LGPL.
* You should have received a copy of the GNU Lesser General Public
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/

#include <stdio.h>
Expand Down
16 changes: 7 additions & 9 deletions demux/demux_lavf.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
*
* This file is part of mpv.
*
* mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* mpv is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* 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
* with mpv. If not, see <http://www.gnu.org/licenses/>.
*
* Almost LGPL.
* You should have received a copy of the GNU Lesser General Public
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/

#include <stdlib.h>
Expand Down
2 changes: 2 additions & 0 deletions input/cmd_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,12 @@ const struct mp_cmd_def mp_cmds[] = {
{ MP_CMD_KEYDOWN, "keydown", { ARG_STRING } },
{ MP_CMD_KEYUP, "keyup", { OARG_STRING("") } },

#if HAVE_GPL
{ MP_CMD_AUDIO_ADD, "audio-add", { ARG_STRING,
OARG_CHOICE(0, ({"select", 0}, {"auto", 1}, {"cached", 2})),
OARG_STRING(""), OARG_STRING("") } },
{ MP_CMD_AUDIO_REMOVE, "audio-remove", { OARG_INT(-1) } },
#endif
{ MP_CMD_AUDIO_RELOAD, "audio-reload", { OARG_INT(-1) } },

{ MP_CMD_RESCAN_EXTERNAL_FILES, "rescan-external-files", {
Expand Down
16 changes: 7 additions & 9 deletions options/m_option.c
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
/*
* This file is part of mpv.
*
* mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* mpv is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* 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
* with mpv. If not, see <http://www.gnu.org/licenses/>.
*
* Almost LGPL.
* You should have received a copy of the GNU Lesser General Public
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/

/// \file
Expand Down
2 changes: 0 additions & 2 deletions player/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,6 @@ static int decode_new_frame(struct ao_chain *ao_c)
}
}

#if HAVE_GPL
/* Try to get at least minsamples decoded+filtered samples in outbuf
* (total length including possible existing data).
* Return 0 on success, or negative AD_* error code.
Expand Down Expand Up @@ -1064,7 +1063,6 @@ static int filter_audio(struct MPContext *mpctx, struct mp_audio_buffer *outbuf,

return res;
}
#endif

void reload_audio_output(struct MPContext *mpctx)
{
Expand Down
2 changes: 0 additions & 2 deletions player/command.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*
* Parts under HAVE_GPL are licensed under GNU General Public License.
*/

#ifndef MPLAYER_COMMAND_H
Expand Down
16 changes: 7 additions & 9 deletions video/decode/dec_video.c
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
/*
* This file is part of mpv.
*
* mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* mpv is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* 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
* with mpv. If not, see <http://www.gnu.org/licenses/>.
*
* Almost LGPL.
* You should have received a copy of the GNU Lesser General Public
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/

#include <stdio.h>
Expand Down
16 changes: 7 additions & 9 deletions video/decode/dec_video.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
/*
* This file is part of mpv.
*
* mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* mpv is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* 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
* with mpv. If not, see <http://www.gnu.org/licenses/>.
*
* Almost LGPL.
* You should have received a copy of the GNU Lesser General Public
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef MPLAYER_DEC_VIDEO_H
Expand Down
28 changes: 14 additions & 14 deletions video/decode/vd_lavc.c
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
/*
* This file is part of mpv.
*
* mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* mpv is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* 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
* with mpv. If not, see <http://www.gnu.org/licenses/>.
*
* Almost LGPLv3+.
* You should have received a copy of the GNU Lesser General Public
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*
* The parts potentially making this file LGPL v3 (instead of v2.1 or later) are:
* 376e3abf5c7d2 xvmc use get_format for IDCT/MC recognition
Expand Down Expand Up @@ -261,16 +259,11 @@ static const struct vd_lavc_hwdec *const hwdec_list[] = {
#endif
#if HAVE_VDPAU_HWACCEL
&mp_vd_lavc_vdpau,
&mp_vd_lavc_vdpau_copy,
#endif
#if HAVE_VIDEOTOOLBOX_HWACCEL
&mp_vd_lavc_videotoolbox,
&mp_vd_lavc_videotoolbox_copy,
#endif
#if HAVE_VAAPI_HWACCEL
&mp_vd_lavc_vaapi,
&mp_vd_lavc_vaapi_copy,
#endif
#if HAVE_D3D_HWACCEL
&mp_vd_lavc_d3d11va,

Expand All @@ -290,6 +283,13 @@ static const struct vd_lavc_hwdec *const hwdec_list[] = {
&mp_vd_lavc_cuda_old,
#endif
&mp_vd_lavc_cuda_copy,
#endif
#if HAVE_VDPAU_HWACCEL
&mp_vd_lavc_vdpau_copy,
#endif
#if HAVE_VAAPI_HWACCEL
&mp_vd_lavc_vaapi,
&mp_vd_lavc_vaapi_copy,
#endif
&mp_vd_lavc_crystalhd,
NULL
Expand Down
9 changes: 5 additions & 4 deletions video/filter/vf.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,25 @@ extern const vf_info_t vf_info_d3d11vpp;

// list of available filters:
static const vf_info_t *const filter_list[] = {
#if HAVE_GPL
&vf_info_crop,
&vf_info_expand,
&vf_info_scale,
&vf_info_format,
&vf_info_noformat,
&vf_info_flip,

&vf_info_mirror,
&vf_info_lavfi,
&vf_info_lavfi_bridge,
&vf_info_rotate,
&vf_info_gradfun,
&vf_info_pullup,
&vf_info_yadif,
&vf_info_stereo3d,

&vf_info_dsize,
&vf_info_sub,
#endif

&vf_info_lavfi,
&vf_info_lavfi_bridge,
&vf_info_buffer,
#if HAVE_VAPOURSYNTH_CORE && HAVE_VAPOURSYNTH
&vf_info_vapoursynth,
Expand Down
16 changes: 7 additions & 9 deletions video/mp_image.c
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
/*
* This file is part of mpv.
*
* mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* mpv is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* 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
* with mpv. If not, see <http://www.gnu.org/licenses/>.
*
* Almost LGPL.
* You should have received a copy of the GNU Lesser General Public
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/

#include <limits.h>
Expand Down
16 changes: 7 additions & 9 deletions video/mp_image.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
/*
* This file is part of mpv.
*
* mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* mpv is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* 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
* with mpv. If not, see <http://www.gnu.org/licenses/>.
*
* Almost LGPL.
* You should have received a copy of the GNU Lesser General Public
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef MPLAYER_MP_IMAGE_H
Expand Down
16 changes: 7 additions & 9 deletions video/sws_utils.c
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
/*
* This file is part of mpv.
*
* mpv is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* mpv is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* mpv is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* 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
* with mpv. If not, see <http://www.gnu.org/licenses/>.
*
* Almost LGPL.
* You should have received a copy of the GNU Lesser General Public
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/

#include <assert.h>
Expand Down
1 change: 0 additions & 1 deletion waftools/generators/headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def __add_mpv_defines__(ctx):
ctx.define("CONFIGURATION", " ".join(argv))
ctx.define("MPV_CONFDIR", ctx.env.CONFLOADDIR)
ctx.define("FULLCONFIG", __escape_c_string(__get_features_string__(ctx)))
ctx.define("HAVE_GPL", 1)

def configure(ctx):
__add_mpv_defines__(ctx)
Expand Down
Loading

0 comments on commit bfa9b62

Please sign in to comment.