diff options
author | wm4 <wm4@nowhere> | 2017-08-22 17:01:35 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-08-22 17:01:35 +0200 |
commit | 03cf150ff3516789d581214177f291d46310aaf4 (patch) | |
tree | 2f352bf9c6d36e10001accdb72cef2d7683ab04a /player/command.c | |
parent | d67aa6da6bbd3cba9eabd12cda4703821fecc7a1 (diff) | |
download | mpv-03cf150ff3516789d581214177f291d46310aaf4.tar.bz2 mpv-03cf150ff3516789d581214177f291d46310aaf4.tar.xz |
video: redo video equalizer option handling
I really wouldn't care much about this, but some parts of the core code
are under HAVE_GPL, so there's some need to get rid of it. Simply turn
the video equalizer from its current fine-grained handling with vf/vo
fallbacks into global options. This makes updating them much simpler.
This removes any possibility of applying video equalizers in filters,
which affects vf_scale, and the previously removed vf_eq. Not a big
loss, since the preferred VOs have this builtin.
Remove video equalizer handling from vo_direct3d, vo_sdl, vo_vaapi, and
vo_xv. I'm not going to waste my time on these legacy VOs.
vo.eq_opts_cache exists _only_ to send a VOCTRL_SET_EQUALIZER, which
exists _only_ to trigger a redraw. This seems silly, but for now I feel
like this is less of a pain. The rest of the equalizer using code is
self-updating.
See commit 96b906a51d5 for how some video equalizer code was GPL only.
Some command line option names and ranges can probably be traced back to
a GPL only committer, but we don't consider these copyrightable.
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/player/command.c b/player/command.c index 80c0c970fa..d94f819992 100644 --- a/player/command.c +++ b/player/command.c @@ -2613,35 +2613,6 @@ static int mp_property_frame_count(void *ctx, struct m_property *prop, return m_property_int_ro(action, arg, frames); } -#if HAVE_GPL -static int mp_property_video_color(void *ctx, struct m_property *prop, - int action, void *arg) -{ - const char *name = prop->priv ? prop->priv : prop->name; - MPContext *mpctx = ctx; - if (!mpctx->vo_chain) - return mp_property_generic_option(mpctx, prop, action, arg); - - switch (action) { - case M_PROPERTY_SET: { - if (video_set_colors(mpctx->vo_chain, name, *(int *) arg) <= 0) - return M_PROPERTY_UNAVAILABLE; - break; - } - case M_PROPERTY_GET: - if (video_get_colors(mpctx->vo_chain, name, (int *)arg) <= 0) - return M_PROPERTY_UNAVAILABLE; - // Write new value to option variable - mp_property_generic_option(mpctx, prop, M_PROPERTY_SET, arg); - return M_PROPERTY_OK; - case M_PROPERTY_GET_NEUTRAL: - *(int *)arg = 0; - return M_PROPERTY_OK; - } - return mp_property_generic_option(mpctx, prop, action, arg); -} -#endif - /// Video codec tag (RO) static int mp_property_video_format(void *ctx, struct m_property *prop, int action, void *arg) @@ -4041,15 +4012,6 @@ static const struct m_property mp_properties_base[] = { {"ontop", mp_property_ontop}, {"border", mp_property_border}, {"on-all-workspaces", mp_property_all_workspaces}, -#if HAVE_GPL - {"gamma", mp_property_video_color}, - {"brightness", mp_property_video_color}, - {"contrast", mp_property_video_color}, - {"saturation", mp_property_video_color}, - {"hue", mp_property_video_color}, - {"video-output-levels", mp_property_video_color, - .priv = (void *)"output-levels"}, -#endif {"video-out-params", mp_property_vo_imgparams}, {"video-dec-params", mp_property_dec_imgparams}, {"video-params", mp_property_vd_imgparams}, |