From ff37d7efeca2a53819104039348dfbe39c4aca98 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Wed, 8 Jun 2016 11:39:31 +0200 Subject: vo_opengl: refactor performance data properties Instead of having 9 different properties, requiring 18 different VOCTRLs to read them all, they are now exposed as a single property. This is not only cleaner (since they're all together) but also allows querying all 9 of them with only a single VOCTRL (by using mp.get_property_native). (The extra factor of 2 was due to an extra query being needed to get the type, which is now also unnecessary) This makes it much easier to access performance metrics from within a lua script, and also makes it easier to just show a readable, formatted version via show-text. --- options/m_property.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'options') diff --git a/options/m_property.h b/options/m_property.h index 93a4a73578..42fe1c7ecf 100644 --- a/options/m_property.h +++ b/options/m_property.h @@ -184,6 +184,8 @@ struct m_sub_property { // Convenience macros which can be used as part of a sub_property entry. #define SUB_PROP_INT(i) \ .type = {.type = CONF_TYPE_INT}, .value = {.int_ = (i)} +#define SUB_PROP_INT64(i) \ + .type = {.type = CONF_TYPE_INT64}, .value = {.int64 = (i)} #define SUB_PROP_STR(s) \ .type = {.type = CONF_TYPE_STRING}, .value = {.string = (char *)(s)} #define SUB_PROP_FLOAT(f) \ -- cgit v1.2.3