mirror of
https://github.com/mpv-player/mpv
synced 2025-01-29 19:22:48 +00:00
command: remove an old compatibility hack
Was removed 3 releases ago and was spamming warning messages that it'll be dropped, so it's fine to remove it now.
This commit is contained in:
parent
98f871a261
commit
5532d8cffe
@ -80,6 +80,8 @@ Interface changes
|
||||
certain unreliable video metadata. Also flip the defaults of all builtin
|
||||
HW deinterlace filters to always deinterlace.
|
||||
- change vf_vavpp default to use the best deinterlace algorithm by default
|
||||
- remove a compatibility hack that allowed CLI aliases to be set as property
|
||||
(such as "sub-file"), deprecated in mpv 0.26.0
|
||||
--- mpv 0.28.0 ---
|
||||
- rename --hwdec=mediacodec option to mediacodec-copy, to reflect
|
||||
conventions followed by other hardware video decoding APIs
|
||||
|
@ -3605,37 +3605,6 @@ done:
|
||||
return mp_property_do(real_property, action, arg, ctx);
|
||||
}
|
||||
|
||||
static int mp_property_shitfuck(void *ctx, struct m_property *prop,
|
||||
int action, void *arg)
|
||||
{
|
||||
MPContext *mpctx = ctx;
|
||||
int flags = M_SETOPT_RUNTIME;
|
||||
const char *rname = prop->priv;
|
||||
|
||||
MP_WARN(mpctx, "Do not use %s, use %s, bug reports will be ignored.\n",
|
||||
prop->name, rname);
|
||||
|
||||
struct m_config_option *co = m_config_get_co_raw(mpctx->mconfig, bstr0(rname));
|
||||
if (!co)
|
||||
return M_PROPERTY_UNKNOWN;
|
||||
|
||||
switch (action) {
|
||||
case M_PROPERTY_GET_TYPE:
|
||||
*(struct m_option *)arg = *(co->opt);
|
||||
return M_PROPERTY_OK;
|
||||
case M_PROPERTY_GET:
|
||||
if (!co->data)
|
||||
return M_PROPERTY_NOT_IMPLEMENTED;
|
||||
m_option_copy(co->opt, arg, co->data);
|
||||
return M_PROPERTY_OK;
|
||||
case M_PROPERTY_SET:
|
||||
if (m_config_set_option_raw_direct(mpctx->mconfig, co, arg, flags) < 0)
|
||||
return M_PROPERTY_ERROR;
|
||||
return M_PROPERTY_OK;
|
||||
}
|
||||
return M_PROPERTY_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static int access_options(struct m_property_action_arg *ka, bool local,
|
||||
MPContext *mpctx)
|
||||
{
|
||||
@ -5600,8 +5569,7 @@ void command_init(struct MPContext *mpctx)
|
||||
for (int n = 0; n < num_opts; n++) {
|
||||
struct m_config_option *co = m_config_get_co_index(mpctx->mconfig, n);
|
||||
assert(co->name[0]);
|
||||
if ((co->opt->flags & M_OPT_NOPROP) &&
|
||||
co->opt->type != &m_option_type_cli_alias)
|
||||
if (co->opt->flags & M_OPT_NOPROP)
|
||||
continue;
|
||||
|
||||
struct m_property prop = {0};
|
||||
@ -5616,21 +5584,6 @@ void command_init(struct MPContext *mpctx)
|
||||
.priv = (void *)alias,
|
||||
.is_option = true,
|
||||
};
|
||||
} else if (co->opt->type == &m_option_type_cli_alias) {
|
||||
bstr rname = bstr0(co->opt->priv);
|
||||
for (int i = rname.len - 1; i >= 0; i--) {
|
||||
if (rname.start[i] == '-') {
|
||||
rname.len = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
prop = (struct m_property){
|
||||
.name = co->name,
|
||||
.call = mp_property_shitfuck,
|
||||
.priv = bstrto0(ctx, rname),
|
||||
.is_option = true,
|
||||
};
|
||||
} else {
|
||||
prop = (struct m_property){
|
||||
.name = co->name,
|
||||
|
Loading…
Reference in New Issue
Block a user