summaryrefslogtreecommitdiffstats
path: root/video/out/vo.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-11-25 21:00:39 +0100
committerwm4 <wm4@nowhere>2016-11-25 21:17:25 +0100
commit1a2319f3e4cc42c680e2fd3ba30022c7a9adf3fe (patch)
tree37261ccac2acc614777ba4c790cfed78b96fb58f /video/out/vo.c
parent98a257b3a871587a97f51ef1b09800959a94ed1e (diff)
downloadmpv-1a2319f3e4cc42c680e2fd3ba30022c7a9adf3fe.tar.bz2
mpv-1a2319f3e4cc42c680e2fd3ba30022c7a9adf3fe.tar.xz
options: remove deprecated sub-option handling for --vo and --ao
Long planned. Leads to some sanity. There still are some rather gross things. Especially g_groups is ugly, and a hack that can hopefully be removed. (There is a plan for it, but whether it's implemented depends on how much energy is left.)
Diffstat (limited to 'video/out/vo.c')
-rw-r--r--video/out/vo.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index cbd2ca87c8..72a47af227 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -176,8 +176,8 @@ static bool get_desc(struct m_obj_desc *dst, int index)
.priv_size = vo->priv_size,
.priv_defaults = vo->priv_defaults,
.options = vo->options,
+ .options_prefix = vo->options_prefix,
.global_opts = vo->global_opts,
- .legacy_prefix = vo->legacy_prefix,
.hidden = vo->encode || !strcmp(vo->name, "opengl-cb"),
.p = vo,
};
@@ -196,6 +196,7 @@ const struct m_obj_list vo_obj_list = {
.allow_unknown_entries = true,
.allow_trailer = true,
.disallow_positional_parameters = true,
+ .use_global_options = true,
};
static void dispatch_wakeup_cb(void *ptr)
@@ -214,7 +215,7 @@ static void dealloc_vo(struct vo *vo)
}
static struct vo *vo_create(bool probing, struct mpv_global *global,
- struct vo_extra *ex, char *name, char **args)
+ struct vo_extra *ex, char *name)
{
assert(ex->wakeup_cb);
@@ -254,11 +255,9 @@ static struct vo *vo_create(bool probing, struct mpv_global *global,
mp_input_set_mouse_transform(vo->input_ctx, NULL, NULL);
if (vo->driver->encode != !!vo->encode_lavc_ctx)
goto error;
- vo->config = m_config_from_obj_desc_and_args(vo, vo->log, global, &desc,
- name, vo->opts->vo_defs, args);
- if (!vo->config)
+ vo->priv = m_config_group_from_desc(vo, vo->log, global, &desc, name);
+ if (!vo->priv)
goto error;
- vo->priv = vo->config->optstruct;
if (pthread_create(&vo->in->thread, NULL, vo_thread, vo))
goto error;
@@ -283,8 +282,7 @@ struct vo *init_best_video_out(struct mpv_global *global, struct vo_extra *ex)
if (strlen(vo_list[n].name) == 0)
goto autoprobe;
bool p = !!vo_list[n + 1].name;
- struct vo *vo = vo_create(p, global, ex, vo_list[n].name,
- vo_list[n].attribs);
+ struct vo *vo = vo_create(p, global, ex, vo_list[n].name);
if (vo)
return vo;
}
@@ -296,7 +294,7 @@ autoprobe:
const struct vo_driver *driver = video_out_drivers[i];
if (driver == &video_out_null)
break;
- struct vo *vo = vo_create(true, global, ex, (char *)driver->name, NULL);
+ struct vo *vo = vo_create(true, global, ex, (char *)driver->name);
if (vo)
return vo;
}