From dc2c7371f17df42fb75d541b6adb9a11a33c5874 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 27 May 2015 18:08:02 +0200 Subject: [PATCH] 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. --- DOCS/interface-changes.rst | 1 + DOCS/man/input.rst | 2 +- input/cmd_list.c | 1 - input/cmd_list.h | 1 - player/command.c | 34 ---------------------------------- 5 files changed, 2 insertions(+), 37 deletions(-) diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 26e9538224..c1980940bf 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -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) diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 8268345cc4..fb80007eb9 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -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 ~~~~~ diff --git a/input/cmd_list.c b/input/cmd_list.c index 5f69878fb7..5838bff066 100644 --- a/input/cmd_list.c +++ b/input/cmd_list.c @@ -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", { diff --git a/input/cmd_list.h b/input/cmd_list.h index 86f24f2edb..fad635f0b2 100644 --- a/input/cmd_list.h +++ b/input/cmd_list.h @@ -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, diff --git a/player/command.c b/player/command.c index e36c9f8fe2..b95343712c 100644 --- a/player/command.c +++ b/player/command.c @@ -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;