From 91f752f43f1f38223902cd1dadd272da5aab1ce9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 24 Feb 2014 20:10:26 +0100 Subject: 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. --- options/m_property.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'options/m_property.h') 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. -- cgit v1.2.3