diff options
author | wm4 <wm4@nowhere> | 2014-10-23 14:55:58 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-23 15:13:05 +0200 |
commit | 7cf18a8db9f76cdf614448a657450db3a49be47a (patch) | |
tree | 1b8104b0f512a08938f172010c55e109b8f5bdb4 /player/client.c | |
parent | 4590ac20823815f1c0bff079f5eeae760af44819 (diff) | |
download | mpv-7cf18a8db9f76cdf614448a657450db3a49be47a.tar.bz2 mpv-7cf18a8db9f76cdf614448a657450db3a49be47a.tar.xz |
client API: print properties set with -v
Useful for debugging. Considered doing this in command.c, but it's
easier here.
Diffstat (limited to 'player/client.c')
-rw-r--r-- | player/client.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/player/client.c b/player/client.c index 17d315bc1d..a150271df0 100644 --- a/player/client.c +++ b/player/client.c @@ -967,6 +967,7 @@ static void setproperty_fn(void *arg) // do this, because it tries to be somewhat type-strict. But the client // needs a way to set everything by string. char *s = *(char **)req->data; + MP_VERBOSE(req->mpctx, "Set property string: %s='%s'\n", req->name, s); err = mp_property_do(req->name, M_PROPERTY_SET_STRING, s, req->mpctx); break; } @@ -982,6 +983,12 @@ static void setproperty_fn(void *arg) node.format = req->format; memcpy(&node.u, req->data, type->type->size); } + if (mp_msg_test(req->mpctx->log, MSGL_V)) { + struct m_option ot = {.type = &m_option_type_node}; + char *t = m_option_print(&ot, &node); + MP_VERBOSE(req->mpctx, "Set property: %s=%s\n", req->name, t ? t : "?"); + talloc_free(t); + } err = mp_property_do(req->name, M_PROPERTY_SET_NODE, &node, req->mpctx); break; } |