summaryrefslogtreecommitdiffstats
path: root/mpvcore/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'mpvcore/command.c')
-rw-r--r--mpvcore/command.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/mpvcore/command.c b/mpvcore/command.c
index 3dc813673b..e1c7e6e79e 100644
--- a/mpvcore/command.c
+++ b/mpvcore/command.c
@@ -1458,6 +1458,25 @@ static int mp_property_dheight(m_option_t *prop, int action, void *arg,
return property_vo_wh(prop, action, arg, mpctx, false);
}
+static int mp_property_osd_w(m_option_t *prop, int action, void *arg,
+ MPContext *mpctx)
+{
+ return m_property_int_ro(prop, action, arg, mpctx->osd->last_vo_res.w);
+}
+
+static int mp_property_osd_h(m_option_t *prop, int action, void *arg,
+ MPContext *mpctx)
+{
+ return m_property_int_ro(prop, action, arg, mpctx->osd->last_vo_res.w);
+}
+
+static int mp_property_osd_par(m_option_t *prop, int action, void *arg,
+ MPContext *mpctx)
+{
+ return m_property_double_ro(prop, action, arg,
+ mpctx->osd->last_vo_res.display_par);
+}
+
/// Video fps (RO)
static int mp_property_fps(m_option_t *prop, int action, void *arg,
MPContext *mpctx)
@@ -1880,6 +1899,10 @@ static const m_option_t mp_properties[] = {
{ "program", mp_property_program, CONF_TYPE_INT,
CONF_RANGE, -1, 65535, NULL },
+ { "osd-width", mp_property_osd_w, CONF_TYPE_INT },
+ { "osd-height", mp_property_osd_h, CONF_TYPE_INT },
+ { "osd-par", mp_property_osd_par, CONF_TYPE_DOUBLE },
+
// Subs
M_OPTION_PROPERTY_CUSTOM("sid", mp_property_sub),
M_OPTION_PROPERTY_CUSTOM("sub-delay", mp_property_sub_delay),