command: export mpv configure arguments as property

It seems strange that a client API user can't get this string, other
than analyzing the mpv log output.
This commit is contained in:
wm4 2014-11-13 16:18:40 +01:00
parent 0f30803172
commit 23e0682dd4
2 changed files with 11 additions and 0 deletions

View File

@ -1422,6 +1422,10 @@ Property list
Return the mpv version/copyright string. Depending on how the binary was
built, it might contain either a release version, or just a git hash.
``mpv-configuration``
Return the configuration arguments which were passed to the build system
(typically the way ``./waf configure ...`` was invoked).
``options/<name>`` (RW)
Read-only access to value of option ``--<name>``. Most options can be
changed at runtime by writing to this property. Note that many options

View File

@ -2932,6 +2932,12 @@ static int mp_property_version(void *ctx, struct m_property *prop,
return m_property_strdup_ro(action, arg, mpv_version);
}
static int mp_property_configuration(void *ctx, struct m_property *prop,
int action, void *arg)
{
return m_property_strdup_ro(action, arg, CONFIGURATION);
}
static int mp_property_alias(void *ctx, struct m_property *prop,
int action, void *arg)
{
@ -3232,6 +3238,7 @@ static const struct m_property mp_properties[] = {
{"display-names", mp_property_display_names},
{"mpv-version", mp_property_version},
{"mpv-configuration", mp_property_configuration},
{"options", mp_property_options},
{"file-local-options", mp_property_local_options},