summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-11-24 14:04:53 +0100
committerwm4 <wm4@nowhere>2017-11-24 14:12:10 +0100
commit386e8cd16d0b9740433ece4bf2744da055d513da (patch)
tree5ec774de41b76182190a5060ff5769fc89d70a9e /player
parentefbb91999796a33c91761d2c206d0f42beb4954c (diff)
downloadmpv-386e8cd16d0b9740433ece4bf2744da055d513da.tar.bz2
mpv-386e8cd16d0b9740433ece4bf2744da055d513da.tar.xz
player: change 3 remaining GPL-only code pieces to LGPL
There has been no new developments or agreements, but I was uncertain about the copyright status of them. Thus this part of code was marked as being potentially GPL, and was not built in LGPL mode. Now I've taken a close look again, and decided that these can be relicensed using the existing relicensing agreements. OSD level 3 was introduced in commit 8d190244, with the author being unreachable. As I decided in commit 6ddd95fd, OSD level 3 itself can be kept, but the "osd" command had to go, and the "rendering" of OSD level 3 (the HAVE_GPL code in osd.c) was uncertain. But the code for this was rewritten: instead of duplicating the time/percent formatting code, it was changed to use common code, and some weird extra logic was removed. The code inside of the "if" is exactly the same as the code that formats the OSD status line (covered by LGPL relicensing). The current commands for adding/removing sub/audio tracks more or less originated from commit 2f376d1b39, with the author being unreachable. But the original code was very different, mostly due to MPlayer's incredibly messy handling of subtitles in general. Nothing of this remains in the current code. Even the command declarations were rewritten. The commands (as seen from the user side) are rather similar in naming and semantics, but we don't consider this copyrightable. So it doesn't look like anything copyrightable is left. The add/cycle commands were more or less based on step_property, introduced in commit 7a71da01d6, with the patch author disagreeing with the LGPL relicensing. But all code original to the patch has been replaced in later mpv changes, and the original code was mostly copied from MP_CMD_SET_PROPERTY anyway. The underlying property interface was completely changed, the error handling was redone, and all of this is very similar to the changes that were done on SET_PROPERTY. The command declarations are completely different in the first place, because the semantic change from step to add/cycle. The commit also seems to have been co-authored by reimar to some degree. He also had the idea to change the original patch from making the command modify a specific property to making it generic. (The error message line, especially with its %g formatting, might contain some level of originality, so change that just to be sure. This commit Copies and adapts the error message for SET_PROPERTY.) Although I'm a bit on the fence with all the above things, it really doesn't look like there's anything substantial that would cause issues. I thus claim that there is no problem with changing the license to LGPL for the above things. It's probably still slightly below the standard that was usually applied in the code relicensing in mpv, but probably still far above to the usual in open source relicensing (and above commercial standards as well, if you look what certain tech giants do).
Diffstat (limited to 'player')
-rw-r--r--player/command.c11
-rw-r--r--player/osd.c5
2 files changed, 1 insertions, 15 deletions
diff --git a/player/command.c b/player/command.c
index b5317e1470..c89f6a7f6f 100644
--- a/player/command.c
+++ b/player/command.c
@@ -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.
*/
#include <stdlib.h>
@@ -5002,8 +5000,6 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
break;
}
-#if HAVE_GPL
- // Possibly GPL due to 7a71da01d64374ce22b430590f3df32c881288bd.
case MP_CMD_ADD:
case MP_CMD_CYCLE:
{
@@ -5033,14 +5029,12 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
return -1;
} else if (r <= 0) {
set_osd_msg(mpctx, osdl, osd_duration,
- "Failed to increment property '%s' by %g",
- property, s.inc);
+ "Failed to change property '%s'", property);
return -1;
}
}
break;
}
-#endif
case MP_CMD_MULTIPLY: {
char *property = cmd->args[0].v.s;
@@ -5331,8 +5325,6 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
break;
}
-#if HAVE_GPL
- // Possibly GPL due to 2f376d1b39913e8ff4c4499e7cf7148ec331d4db.
case MP_CMD_SUB_ADD:
case MP_CMD_AUDIO_ADD: {
if (!mpctx->playing)
@@ -5384,7 +5376,6 @@ 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: {
diff --git a/player/osd.c b/player/osd.c
index 70dbd1640a..1453c9b599 100644
--- a/player/osd.c
+++ b/player/osd.c
@@ -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.
*/
#include <stddef.h>
@@ -431,14 +429,11 @@ static void sadd_osd_status(char **buffer, struct MPContext *mpctx, int level)
talloc_free(text);
} else {
sadd_hhmmssff(buffer, get_playback_time(mpctx), fractions);
-#if HAVE_GPL
- // Potentially GPL due to 8d190244d21a4d40bb9e8f7d51aa09ca1888de09.
if (level == 3) {
saddf(buffer, " / ");
sadd_hhmmssff(buffer, get_time_length(mpctx), fractions);
sadd_percentage(buffer, get_percent_pos(mpctx));
}
-#endif
}
}
}