diff options
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 9 | ||||
-rw-r--r-- | player/main.c | 27 |
2 files changed, 36 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c index 379ce07edb..b2ca9c0360 100644 --- a/player/command.c +++ b/player/command.c @@ -5481,7 +5481,16 @@ void mp_notify(struct MPContext *mpctx, int event, void *arg) mp_client_broadcast_event(mpctx, event, arg); } +extern const struct m_sub_options gl_video_conf; + void mp_notify_property(struct MPContext *mpctx, const char *property) { + struct m_config_option *co = m_config_get_co(mpctx->mconfig, bstr0(property)); + if (co) { + if (m_config_is_in_group(mpctx->mconfig, &gl_video_conf, co)) { + if (mpctx->video_out) + vo_control(mpctx->video_out, VOCTRL_UPDATE_RENDER_OPTS, NULL); + } + } mp_client_property_change(mpctx, property); } diff --git a/player/main.c b/player/main.c index b60c522cb0..5f20ae9891 100644 --- a/player/main.c +++ b/player/main.c @@ -134,6 +134,16 @@ static const char def_config[] = "osc=no\n" "framedrop=no\n" #endif + "\n" + "[opengl-hq]\n" + "scale=spline36\n" + "cscale=spline36\n" + "dscale=mitchell\n" + "dither-depth=auto\n" + "correct-downscaling=yes\n" + "sigmoid-upscaling=yes\n" + "deband=yes\n" + "opengl-es=no\n" ; static pthread_mutex_t terminal_owner_lock = PTHREAD_MUTEX_INITIALIZER; @@ -314,6 +324,21 @@ static bool handle_help_options(struct MPContext *mpctx) return opt_exit; } +static void handle_deprecated_options(struct MPContext *mpctx) +{ + struct MPOpts *opts = mpctx->opts; + struct m_obj_settings *vo = opts->vo->video_driver_list; + if (vo && vo->name && strcmp(vo->name, "opengl-hq") == 0) { + MP_WARN(mpctx, + "--vo=opengl-hq is deprecated! Use --profile=opengl-hq instead.\n"); + // Fudge it. This will replace the --vo option too, which is why we + // unset/safe it, and later restore it. + talloc_free(vo->name); + vo->name = talloc_strdup(NULL, "opengl"); + m_config_set_profile(mpctx->mconfig, "opengl-hq", 0); + } +} + static int cfg_include(void *ctx, char *filename, int flags) { struct MPContext *mpctx = ctx; @@ -425,6 +450,8 @@ int mp_initialize(struct MPContext *mpctx, char **options) if (handle_help_options(mpctx)) return -2; + handle_deprecated_options(mpctx); + if (!print_libav_versions(mp_null_log, 0)) { // Using mismatched libraries can be legitimate, but even then it's // a bad idea. We don't acknowledge its usefulness and stability. |