summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-06-23 15:09:21 +0200
committerwm4 <wm4@nowhere>2017-06-23 15:09:21 +0200
commitdcd4528d219962d692b0108c42a2fbd028db0244 (patch)
tree031271d7154d6ee40b285fd584f4b5e77c50cc2e /player
parent54e2b1e9f3e64c1724b2ed52c177508e9b23a404 (diff)
downloadmpv-dcd4528d219962d692b0108c42a2fbd028db0244.tar.bz2
mpv-dcd4528d219962d692b0108c42a2fbd028db0244.tar.xz
player: disable deinterlace property for WIP LGPL mode
cehoyos has not agreed to the LGPL relicensing. He added the deinterlace property in commit 7b25afd7. Make it GPL-only for now. The still working parts of the --deinterlace option are not affected by his copyright.
Diffstat (limited to 'player')
-rw-r--r--player/command.c5
-rw-r--r--player/video.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c
index c84007eb0d..07631ffb08 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2486,6 +2486,8 @@ static int mp_property_hwdec_interop(void *ctx, struct m_property *prop,
return m_property_strdup_ro(action, arg, name);
}
+#if HAVE_GPL
+// Possibly GPL due to 7b25afd7423e9056782993cbd1b32ead64ac1462.
static int mp_property_deinterlace(void *ctx, struct m_property *prop,
int action, void *arg)
{
@@ -2505,6 +2507,7 @@ static int mp_property_deinterlace(void *ctx, struct m_property *prop,
}
return mp_property_generic_option(mpctx, prop, action, arg);
}
+#endif
/// Helper to set vo flags.
/** \ingroup PropertyImplHelper
@@ -3959,7 +3962,9 @@ static const struct m_property mp_properties_base[] = {
// Video
{"fullscreen", mp_property_fullscreen},
+#if HAVE_GPL
{"deinterlace", mp_property_deinterlace},
+#endif
{"taskbar-progress", mp_property_taskbar_progress},
{"ontop", mp_property_ontop},
{"border", mp_property_border},
diff --git a/player/video.c b/player/video.c
index ab7c6f281d..20229a9267 100644
--- a/player/video.c
+++ b/player/video.c
@@ -158,6 +158,7 @@ static bool check_output_format(struct vo_chain *vo_c, int imgfmt)
static int probe_deint_filters(struct vo_chain *vo_c)
{
+#if HAVE_GPL
// Usually, we prefer inserting/removing deint filters. But If there's VO
// support, or the user inserted a filter that supports swichting deint and
// that has no VF_DEINTERLACE_LABEL, or if the filter was auto-inserted
@@ -165,6 +166,7 @@ static int probe_deint_filters(struct vo_chain *vo_c)
// use the runtime switching method.
if (video_vf_vo_control(vo_c, VFCTRL_SET_DEINTERLACE, &(int){1}) == CONTROL_OK)
return 0;
+#endif
if (check_output_format(vo_c, IMGFMT_VDPAU)) {
char *args[5] = {"deint", "yes"};
@@ -210,9 +212,11 @@ static void filter_reconfig(struct MPContext *mpctx, struct vo_chain *vo_c)
return;
}
+#if HAVE_GPL
// Make sure to reset this even if runtime deint switching is used.
if (mpctx->opts->deinterlace >= 0)
video_vf_vo_control(vo_c, VFCTRL_SET_DEINTERLACE, &(int){0});
+#endif
if (params.rotate) {
if (!(vo_c->vo->driver->caps & VO_CAP_ROTATE90) || params.rotate % 90) {
@@ -251,8 +255,10 @@ int get_deinterlacing(struct MPContext *mpctx)
{
struct vo_chain *vo_c = mpctx->vo_chain;
int enabled = 0;
+#if HAVE_GPL
if (video_vf_vo_control(vo_c, VFCTRL_GET_DEINTERLACE, &enabled) != CONTROL_OK)
enabled = -1;
+#endif
if (enabled < 0) {
// vf_lavfi doesn't support VFCTRL_GET_DEINTERLACE
if (vf_find_by_label(vo_c->vf, VF_DEINTERLACE_LABEL))