summaryrefslogtreecommitdiffstats
path: root/options/m_property.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-02-24 20:10:26 +0100
committerwm4 <wm4@nowhere>2014-02-24 22:50:23 +0100
commit91f752f43f1f38223902cd1dadd272da5aab1ce9 (patch)
tree83373fab5993eefaa2760668f71dc9c815a4866c /options/m_property.h
parente94bab5a998ea35ee196a9296a30636a0a008554 (diff)
downloadmpv-91f752f43f1f38223902cd1dadd272da5aab1ce9.tar.bz2
mpv-91f752f43f1f38223902cd1dadd272da5aab1ce9.tar.xz
m_property: add mechanism to access properties as mpv_node
Allows retrieving properties by their native values (or something close to it), rather than having to go through string conversion. The caller could actually just copy the value itself and then use the m_option functions to convert it to mpv_node, but maybe it's more flexible this way.
Diffstat (limited to 'options/m_property.h')
-rw-r--r--options/m_property.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/options/m_property.h b/options/m_property.h
index 460f8a986c..6fc27301b5 100644
--- a/options/m_property.h
+++ b/options/m_property.h
@@ -68,6 +68,14 @@ enum mp_property_action {
// arg: char*
M_PROPERTY_SET_STRING,
+ // Set a mpv_node value.
+ // arg: mpv_node*
+ M_PROPERTY_GET_NODE,
+
+ // Get a mpv_node value.
+ // arg: mpv_node*
+ M_PROPERTY_SET_NODE,
+
// Pass down an action to a sub-property.
// arg: struct m_property_action_arg*
M_PROPERTY_KEY_ACTION,
@@ -102,6 +110,9 @@ enum mp_property_return {
// Returned when asking for a property that doesn't exist.
M_PROPERTY_UNKNOWN = -3,
+
+ // When trying to set invalid or incorrectly formatted data.
+ M_PROPERTY_INVALID_FORMAT = -4,
};
// Access a property.