aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2017-06-19 13:02:35 +0200
committerGravatar wm4 <wm4@nowhere>2017-06-19 13:28:19 +0200
commit2e84934be7d419da91c2bc0682d71087439d66ad (patch)
treeedae221bc812247cb3f1003afd2dc10f4418fc20
parentab19b3c9d31c5bcff41bab9bf9c39c022e8edf9e (diff)
input: change license to LGPL
cehoyos adds the step_property command in 7a71da01d, and it could be argued that copyright of this still applies to the later add/cycle commands (a668ae0ff90c4). While I'm not sure if this is really the case, stay conservative for now and mark these commands as GPL-only. Mark the command.c code too, although that is not being relicensed yet. I'm leaving the MP_CMD_* enum items, as they are obviously different. In commit 116ca0c7682, "veal" (essentially an anonymous author) adds an "osd_show_property_text" command (well, the commit message says "based on" that person's code, so it's not clear how much is from him or from albeu, who agreed to LGPL). This was later merged again with the "osd_show_text" command, and then all original code was removed in commit 58cc0f637f, so I claim that no copyright applies anymore. (Though technically the input.conf addition still might be copyrighted, so I'm just dropping it to get rid of the thought.) "kiriuja" added 2f376d1b39 (sub_load etc.) and be54f4813 (switch_audio). The latter is gone. I would argue that the former is fully rewritten with commits b7052b431c9 and 0f155921b0. But like in the step_property case, I will be overly conservative for now, and mark them as GPL-only, as this is potentially shaky and should be thought through first. (Not bothering with the command define/enum in the header, as it will be unused in LGPL mode anyway.) keycodes.c/h can be GPL, except for commit 2b1f95dcc2f8, which is a patch by someone who wasn't asked yet. Before doing something radical, I will wait for a reply.
-rw-r--r--Copyright6
-rw-r--r--etc/input.conf1
-rw-r--r--etc/restore-old-bindings.conf4
-rw-r--r--input/cmd_list.c20
-rw-r--r--input/cmd_list.h14
-rw-r--r--input/cmd_parse.c14
-rw-r--r--input/cmd_parse.h14
-rw-r--r--input/input.c14
-rw-r--r--input/input.h14
-rw-r--r--player/command.c4
10 files changed, 59 insertions, 46 deletions
diff --git a/Copyright b/Copyright
index 5dfd6a8a01..905f485b12 100644
--- a/Copyright
+++ b/Copyright
@@ -154,13 +154,13 @@ x demux/demux.* complications (at least Denes' changes)
demux/packet.* LGPL
demux/stheader.h LGPL
demux/timeline.* LGPL
-x input/cmd_* unknown, probably easy except some commands
+ input/cmd_* LGPL
input/event.* LGPL
-x input/input.* potentially hard
+ input/input.* LGPL
input/ipc.c LGPL
input/ipc-unix.c LGPL
input/ipc-win.c LGPL
-x input/keycodes.* potentially hard
+x input/keycodes.* (pending)
input/pipe-win32.c LGPL
libmpv/*.* LGPL
misc/*.* LGPL
diff --git a/etc/input.conf b/etc/input.conf
index 674f38f72d..983c2d5e04 100644
--- a/etc/input.conf
+++ b/etc/input.conf
@@ -82,7 +82,6 @@
#O no-osd cycle-values osd-level 3 1 # cycle through OSD mode
#o show-progress
#P show-progress
-#I show-text "${filename}" # display filename in osd
#z add sub-delay -0.1 # subtract 100 ms delay from subs
#x add sub-delay +0.1 # add
#ctrl++ add audio-delay 0.100 # this changes audio/video sync
diff --git a/etc/restore-old-bindings.conf b/etc/restore-old-bindings.conf
index af8933896f..e2aef8a551 100644
--- a/etc/restore-old-bindings.conf
+++ b/etc/restore-old-bindings.conf
@@ -9,6 +9,10 @@
#
# Older installations use ~/.mpv/input.conf instead.
+# changed in mpv 0.25.0
+
+I show-text "${filename}" # display filename in osd
+
# changed in mpv 0.24.0
L cycle-values loop "inf" "no"
diff --git a/input/cmd_list.c b/input/cmd_list.c
index 07dd924cbf..4b64dce29b 100644
--- a/input/cmd_list.c
+++ b/input/cmd_list.c
@@ -1,22 +1,24 @@
/*
* 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/>.
+ * 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>
+#include "config.h"
+
#include "common/common.h"
#include "common/msg.h"
#include "options/m_option.h"
@@ -100,10 +102,12 @@ const struct mp_cmd_def mp_cmds[] = {
.allow_auto_repeat = true},
{ MP_CMD_EXPAND_TEXT, "expand-text", { ARG_STRING } },
{ MP_CMD_SHOW_PROGRESS, "show-progress", .allow_auto_repeat = true},
+#if HAVE_GPL
{ MP_CMD_SUB_ADD, "sub-add", { ARG_STRING,
OARG_CHOICE(0, ({"select", 0}, {"auto", 1}, {"cached", 2})),
OARG_STRING(""), OARG_STRING("") } },
{ MP_CMD_SUB_REMOVE, "sub-remove", { OARG_INT(-1) } },
+#endif
{ MP_CMD_SUB_RELOAD, "sub-reload", { OARG_INT(-1) } },
{ MP_CMD_TV_LAST_CHANNEL, "tv-last-channel", },
@@ -148,6 +152,7 @@ const struct mp_cmd_def mp_cmds[] = {
{ MP_CMD_RUN, "run", { ARG_STRING, ARG_STRING }, .vararg = true },
{ MP_CMD_SET, "set", { ARG_STRING, ARG_STRING } },
+#if HAVE_GPL
{ MP_CMD_ADD, "add", { ARG_STRING, OARG_DOUBLE(1) },
.allow_auto_repeat = true,
.scalable = true,
@@ -159,6 +164,7 @@ const struct mp_cmd_def mp_cmds[] = {
.allow_auto_repeat = true,
.scalable = true,
},
+#endif
{ MP_CMD_MULTIPLY, "multiply", { ARG_STRING, ARG_DOUBLE },
.allow_auto_repeat = true},
diff --git a/input/cmd_list.h b/input/cmd_list.h
index cf881af2bb..5d456c033e 100644
--- a/input/cmd_list.h
+++ b/input/cmd_list.h
@@ -1,18 +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/>.
+ * 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 MP_COMMAND_LIST_H
diff --git a/input/cmd_parse.c b/input/cmd_parse.c
index 0af9665cf0..66a7cfe4b0 100644
--- a/input/cmd_parse.c
+++ b/input/cmd_parse.c
@@ -1,18 +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/>.
+ * 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 <stddef.h>
diff --git a/input/cmd_parse.h b/input/cmd_parse.h
index 252dde4fac..295aa3b2e7 100644
--- a/input/cmd_parse.h
+++ b/input/cmd_parse.h
@@ -1,18 +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/>.
+ * 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 MP_PARSE_COMMAND_H
diff --git a/input/input.c b/input/input.c
index c859e5e3db..ee58709017 100644
--- a/input/input.c
+++ b/input/input.c
@@ -1,18 +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/>.
+ * 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 "config.h"
diff --git a/input/input.h b/input/input.h
index c2933e8bd3..ea8460889c 100644
--- a/input/input.h
+++ b/input/input.h
@@ -1,18 +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/>.
+ * 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_INPUT_H
diff --git a/player/command.c b/player/command.c
index 4c15d17ca1..742b1fa91a 100644
--- a/player/command.c
+++ b/player/command.c
@@ -4945,6 +4945,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
break;
}
+#if HAVE_GPL
case MP_CMD_ADD:
case MP_CMD_CYCLE:
{
@@ -4981,6 +4982,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
}
break;
}
+#endif
case MP_CMD_MULTIPLY: {
char *property = cmd->args[0].v.s;
@@ -5286,6 +5288,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
break;
}
+#if HAVE_GPL
case MP_CMD_SUB_ADD:
case MP_CMD_AUDIO_ADD: {
if (!mpctx->playing)
@@ -5337,6 +5340,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
print_track_list(mpctx, "Track removed:");
break;
}
+#endif
case MP_CMD_SUB_RELOAD:
case MP_CMD_AUDIO_RELOAD: {