From cdbc865ad09531f733e95eb3e6a18b273910e0e7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 21 Oct 2014 13:28:28 +0200 Subject: command: add video-rotate property --- DOCS/man/input.rst | 3 +++ player/command.c | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index bc202d8d4c..074c98abea 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -1328,6 +1328,9 @@ Property list It's also possible to write the property using this format. +``video-rotate`` (RW) + See ``--video-rotate`` option. + ``seekable`` Return whether it's generally possible to seek in the current file. diff --git a/player/command.c b/player/command.c index d3d8fecbe6..60ce915a9a 100644 --- a/player/command.c +++ b/player/command.c @@ -2808,6 +2808,16 @@ static int mp_property_af(void *ctx, struct m_property *prop, return property_filter(prop, action, arg, ctx, STREAM_AUDIO); } +static int property_reinit_vf_helper(void *ctx, struct m_property *prop, + int action, void *arg) +{ + MPContext *mpctx = ctx; + int r = mp_property_generic_option(mpctx, prop, action, arg); + if (action == M_PROPERTY_SET && r == M_PROPERTY_OK) + reinit_video_filters(mpctx); + return r; +} + static int mp_property_alias(void *ctx, struct m_property *prop, int action, void *arg) { @@ -3048,6 +3058,8 @@ static const struct m_property mp_properties[] = { {"vf", mp_property_vf}, {"af", mp_property_af}, + {"video-rotate", property_reinit_vf_helper}, + #define PROPERTY_TV_COLOR(name, type) \ {name, mp_property_tv_color, (void *)(intptr_t)type} PROPERTY_TV_COLOR("tv-brightness", TV_COLOR_BRIGHTNESS), -- cgit v1.2.3