summaryrefslogtreecommitdiffstats
path: root/misc/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/node.c')
-rw-r--r--misc/node.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/misc/node.c b/misc/node.c
index 1ea8ea7da5..73e95e61b0 100644
--- a/misc/node.c
+++ b/misc/node.c
@@ -63,3 +63,18 @@ void node_map_add_string(struct mpv_node *dst, const char *key, const char *val)
entry->format = MPV_FORMAT_STRING;
entry->u.string = talloc_strdup(dst->u.list, val);
}
+
+void node_map_add_int64(struct mpv_node *dst, const char *key, int64_t v)
+{
+ node_map_add(dst, key, MPV_FORMAT_INT64)->u.int64 = v;
+}
+
+void node_map_add_double(struct mpv_node *dst, const char *key, double v)
+{
+ node_map_add(dst, key, MPV_FORMAT_DOUBLE)->u.double_ = v;
+}
+
+void node_map_add_flag(struct mpv_node *dst, const char *key, bool v)
+{
+ node_map_add(dst, key, MPV_FORMAT_FLAG)->u.flag = v;
+}