From 508d236c9a2dfe1cead27510e0b604654f9d7c8b Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 14 Nov 2014 14:52:51 +0100 Subject: command: list filters/VOs/AOs with option-info Another special-case, but pretty simple after all. --- player/command.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/player/command.c b/player/command.c index 8881d1f845..522dd8ec5a 100644 --- a/player/command.c +++ b/player/command.c @@ -3037,6 +3037,17 @@ static int mp_property_option_info(void *ctx, struct m_property *prop, MP_TARRAY_APPEND(NULL, choices, num, alt->name); MP_TARRAY_APPEND(NULL, choices, num, NULL); } + if (opt->type == &m_option_type_obj_settings_list) { + struct m_obj_list *objs = opt->priv; + int num = 0; + for (int n = 0; ; n++) { + struct m_obj_desc desc = {0}; + if (!objs->get_desc(&desc, n)) + break; + MP_TARRAY_APPEND(NULL, choices, num, (char *)desc.name); + } + MP_TARRAY_APPEND(NULL, choices, num, NULL); + } struct m_sub_property props[] = { {"name", SUB_PROP_STR(co->name)}, -- cgit v1.2.3