command: remove deprecated get_property command

This command has been deprecated in the 0.8.x and 0.9.x releases - get
rid of it. Its only point ever was MPlayer compatibility, which broke
years ago anyway.
This commit is contained in:
wm4 2015-05-27 18:08:02 +02:00
parent e8a1d35e9c
commit dc2c7371f1
5 changed files with 2 additions and 37 deletions

View File

@ -20,6 +20,7 @@ Interface changes
::
--- mpv 0.10.0 will be released ---
- remove "get_property" command
- remove --slave-broken
- add vo opengl custom shader suboptions (source-shader, scale-shader,
pre-shaders, post-shaders)

View File

@ -647,7 +647,7 @@ Input Commands that are Possibly Subject to Change
is freed as soon as the result node is freed.
Undocumented commands: ``tv_last_channel`` (TV/DVB only),
``get_property`` (deprecated), ``ao_reload`` (experimental/internal).
``ao_reload`` (experimental/internal).
Hooks
~~~~~

View File

@ -146,7 +146,6 @@ const struct mp_cmd_def mp_cmds[] = {
{ MP_CMD_RUN, "run", { ARG_STRING, ARG_STRING }, .vararg = true },
{ MP_CMD_SET, "set", { ARG_STRING, ARG_STRING } },
{ MP_CMD_GET_PROPERTY, "get-property", { ARG_STRING } },
{ MP_CMD_ADD, "add", { ARG_STRING, OARG_DOUBLE(0) },
.allow_auto_repeat = true},
{ MP_CMD_CYCLE, "cycle", {

View File

@ -65,7 +65,6 @@ enum mp_command_type {
MP_CMD_SUB_REMOVE,
MP_CMD_SUB_RELOAD,
MP_CMD_SET,
MP_CMD_GET_PROPERTY,
MP_CMD_PRINT_TEXT,
MP_CMD_SHOW_TEXT,
MP_CMD_SHOW_PROGRESS,

View File

@ -3797,21 +3797,6 @@ static void show_property_osd(MPContext *mpctx, const char *name, int osd_mode)
}
}
static const char *property_error_string(int error_value)
{
switch (error_value) {
case M_PROPERTY_ERROR:
return "ERROR";
case M_PROPERTY_UNAVAILABLE:
return "PROPERTY_UNAVAILABLE";
case M_PROPERTY_NOT_IMPLEMENTED:
return "NOT_IMPLEMENTED";
case M_PROPERTY_UNKNOWN:
return "PROPERTY_UNKNOWN";
}
return "UNKNOWN";
}
static bool reinit_filters(MPContext *mpctx, enum stream_type mediatype)
{
switch (mediatype) {
@ -4328,25 +4313,6 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
break;
}
case MP_CMD_GET_PROPERTY: {
char *tmp;
int r = mp_property_do(cmd->args[0].v.s, M_PROPERTY_GET_STRING,
&tmp, mpctx);
if (r <= 0) {
MP_WARN(mpctx, "Failed to get value of property '%s'.\n",
cmd->args[0].v.s);
MP_INFO(mpctx, "ANS_ERROR=%s\n", property_error_string(r));
return -1;
}
MP_INFO(mpctx, "ANS_%s=%s\n", cmd->args[0].v.s, tmp);
talloc_free(tmp);
MP_WARN(mpctx, "The get_property command is deprecated and "
"will be removed in the next release.\n"
"Use libmpv or the JSON IPC. "
"(Or print_text, if you must.)");
break;
}
case MP_CMD_FRAME_STEP:
if (!mpctx->playback_initialized)
return -1;