mirror of
https://github.com/mpv-player/mpv
synced 2024-12-20 05:42:19 +00:00
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.
This commit is contained in:
parent
54e2b1e9f3
commit
dcd4528d21
@ -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},
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user