Generic data storage. More...
#include <client.h>
Public Attributes | |
union { | |
char * string | |
int flag | |
valid if format==MPV_FORMAT_STRING More... | |
int64_t int64 | |
valid if format==MPV_FORMAT_FLAG More... | |
double double_ | |
valid if format==MPV_FORMAT_INT64 More... | |
struct mpv_node_list * list | |
valid if format==MPV_FORMAT_DOUBLE More... | |
struct mpv_byte_array * ba | |
valid if format==MPV_FORMAT_BYTE_ARRAY More... | |
} | u |
mpv_format | format |
Type of the data stored in this struct. More... | |
Generic data storage.
If mpv writes this struct (e.g. via mpv_get_property()), you must not change the data. In some cases (mpv_get_property()), you have to free it with mpv_free_node_contents(). If you fill this struct yourself, you're also responsible for freeing it, and you must not call mpv_free_node_contents().
struct mpv_byte_array* mpv_node::ba |
mpv_format mpv_node::format |
Type of the data stored in this struct.
This value rules what members in the given union can be accessed. The following formats are currently defined to be allowed in mpv_node:
MPV_FORMAT_STRING (u.string) MPV_FORMAT_FLAG (u.flag) MPV_FORMAT_INT64 (u.int64) MPV_FORMAT_DOUBLE (u.double_) MPV_FORMAT_NODE_ARRAY (u.list) MPV_FORMAT_NODE_MAP (u.list) MPV_FORMAT_BYTE_ARRAY (u.ba) MPV_FORMAT_NONE (no member)
If you encounter a value you don't know, you must not make any assumptions about the contents of union u.
struct mpv_node_list* mpv_node::list |
union { ... } mpv_node::u |