mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
command: export some option metadata
This might be interesting for GUIs and such. It's probably still a little bit insufficient. For example, the filter and audio/video output lists are not available through this.
This commit is contained in:
@@ -696,7 +696,7 @@ static char *print_choice(const m_option_t *opt, const void *val)
|
||||
}
|
||||
|
||||
const struct m_option_type m_option_type_choice = {
|
||||
.name = "String", // same as arbitrary strings in option list for now
|
||||
.name = "Choice",
|
||||
.size = sizeof(int),
|
||||
.parse = parse_choice,
|
||||
.print = print_choice,
|
||||
|
||||
@@ -189,6 +189,8 @@ struct m_sub_property {
|
||||
.type = {.type = CONF_TYPE_STRING}, .value = {.string = (char *)(s)}
|
||||
#define SUB_PROP_FLOAT(f) \
|
||||
.type = {.type = CONF_TYPE_FLOAT}, .value = {.float_ = (f)}
|
||||
#define SUB_PROP_DOUBLE(f) \
|
||||
.type = {.type = CONF_TYPE_DOUBLE}, .value = {.double_ = (f)}
|
||||
#define SUB_PROP_FLAG(f) \
|
||||
.type = {.type = CONF_TYPE_FLAG}, .value = {.flag = (f)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user