0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

command: add video-rotate property

This commit is contained in:
wm4 2014-10-21 13:28:28 +02:00
parent f8e254864c
commit cdbc865ad0
2 changed files with 15 additions and 0 deletions

View File

@ -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.

View File

@ -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),