summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--options/options.c2
-rw-r--r--player/command.c4
-rw-r--r--player/video.c4
3 files changed, 10 insertions, 0 deletions
diff --git a/options/options.c b/options/options.c
index adbb24fc05..44d9652cc6 100644
--- a/options/options.c
+++ b/options/options.c
@@ -564,6 +564,7 @@ const m_option_t mp_opts[] = {
.deprecation_message = "use Lua scripting instead"),
OPT_FLOAT("heartbeat-interval", heartbeat_interval, CONF_MIN, 0),
+#if HAVE_GPL
OPT_INTRANGE("brightness", gamma_brightness, 0, -100, 100),
OPT_INTRANGE("saturation", gamma_saturation, 0, -100, 100),
OPT_INTRANGE("contrast", gamma_contrast, 0, -100, 100),
@@ -571,6 +572,7 @@ const m_option_t mp_opts[] = {
OPT_INTRANGE("gamma", gamma_gamma, 0, -100, 100),
OPT_CHOICE_C("video-output-levels", video_output_levels, 0,
mp_csp_levels_names),
+#endif
OPT_FLAG("use-filedir-conf", use_filedir_conf, 0),
OPT_CHOICE("osd-level", osd_level, 0,
diff --git a/player/command.c b/player/command.c
index 07631ffb08..0c22efea29 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2618,6 +2618,7 @@ 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)
{
@@ -2644,6 +2645,7 @@ static int mp_property_video_color(void *ctx, struct m_property *prop,
}
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,
@@ -3969,6 +3971,7 @@ 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},
@@ -3976,6 +3979,7 @@ static const struct m_property mp_properties_base[] = {
{"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},
diff --git a/player/video.c b/player/video.c
index 20229a9267..62ed473dd4 100644
--- a/player/video.c
+++ b/player/video.c
@@ -68,6 +68,7 @@ static const char av_desync_help_text[] =
"position will not match to the video (see A-V status field).\n"
"\n";
+#if HAVE_GPL
int video_set_colors(struct vo_chain *vo_c, const char *item, int value)
{
vf_equalizer_t data;
@@ -96,6 +97,7 @@ int video_get_colors(struct vo_chain *vo_c, const char *item, int *value)
}
return 0;
}
+#endif
// Send a VCTRL, or if it doesn't work, translate it to a VOCTRL and try the VO.
int video_vf_vo_control(struct vo_chain *vo_c, int vf_cmd, void *data)
@@ -992,6 +994,7 @@ static void init_vo(struct MPContext *mpctx)
struct MPOpts *opts = mpctx->opts;
struct vo_chain *vo_c = mpctx->vo_chain;
+#if HAVE_GPL
if (opts->gamma_gamma != 0)
video_set_colors(vo_c, "gamma", opts->gamma_gamma);
if (opts->gamma_brightness != 0)
@@ -1003,6 +1006,7 @@ static void init_vo(struct MPContext *mpctx)
if (opts->gamma_hue != 0)
video_set_colors(vo_c, "hue", opts->gamma_hue);
video_set_colors(vo_c, "output-levels", opts->video_output_levels);
+#endif
mp_notify(mpctx, MPV_EVENT_VIDEO_RECONFIG, NULL);
}