1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-08 16:10:29 +00:00

m_option: format mpv_node as json

Useful for debugging and informational purposes. Not sure if it's sane
in any form.
This commit is contained in:
wm4 2014-10-23 14:54:13 +02:00
parent dd77f0d37e
commit 4590ac2082

View File

@ -41,6 +41,7 @@
#include "common/common.h"
#include "common/msg.h"
#include "common/msg_control.h"
#include "misc/json.h"
#include "m_option.h"
#include "m_config.h"
@ -3041,7 +3042,12 @@ static int parse_node(struct mp_log *log, const m_option_t *opt,
static char *print_node(const m_option_t *opt, const void *val)
{
return NULL;
char *t = talloc_strdup(NULL, "");
if (json_write(&t, &VAL(val)) < 0) {
talloc_free(t);
t = NULL;
}
return t;
}
static void dup_node(void *ta_parent, struct mpv_node *node)