diff options
author | wm4 <wm4@nowhere> | 2018-04-21 13:18:03 +0200 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2018-04-29 02:21:32 +0300 |
commit | 4b32d51b962bc1950a7efeacdcfce5c45716bb67 (patch) | |
tree | f0d1ff25014656994680423071a67a047d61de51 /filters/f_auto_filters.c | |
parent | d8807ca8336ec7fa35504bd5313d598e32fcff8d (diff) | |
download | mpv-4b32d51b962bc1950a7efeacdcfce5c45716bb67.tar.bz2 mpv-4b32d51b962bc1950a7efeacdcfce5c45716bb67.tar.xz |
f_output_chain: log status of auto filters
Just so users don't think the filters do anything when they don't insert
any filters.
Diffstat (limited to 'filters/f_auto_filters.c')
-rw-r--r-- | filters/f_auto_filters.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/filters/f_auto_filters.c b/filters/f_auto_filters.c index 8071cb3712..3d4b650dd6 100644 --- a/filters/f_auto_filters.c +++ b/filters/f_auto_filters.c @@ -106,9 +106,21 @@ static void deint_destroy(struct mp_filter *f) TA_FREEP(&p->sub.filter); } +static bool deint_command(struct mp_filter *f, struct mp_filter_command *cmd) +{ + struct deint_priv *p = f->priv; + + if (cmd->type == MP_FILTER_COMMAND_IS_ACTIVE) { + cmd->is_active = !!p->sub.filter; + return true; + } + return false; +} + static const struct mp_filter_info deint_filter = { .name = "deint", .priv_size = sizeof(struct deint_priv), + .command = deint_command, .process = deint_process, .reset = deint_reset, .destroy = deint_destroy, @@ -220,9 +232,21 @@ static void rotate_destroy(struct mp_filter *f) TA_FREEP(&p->sub.filter); } +static bool rotate_command(struct mp_filter *f, struct mp_filter_command *cmd) +{ + struct rotate_priv *p = f->priv; + + if (cmd->type == MP_FILTER_COMMAND_IS_ACTIVE) { + cmd->is_active = !!p->sub.filter; + return true; + } + return false; +} + static const struct mp_filter_info rotate_filter = { .name = "autorotate", .priv_size = sizeof(struct rotate_priv), + .command = rotate_command, .process = rotate_process, .reset = rotate_reset, .destroy = rotate_destroy, @@ -291,6 +315,11 @@ static bool aspeed_command(struct mp_filter *f, struct mp_filter_command *cmd) return true; } + if (cmd->type == MP_FILTER_COMMAND_IS_ACTIVE) { + cmd->is_active = !!p->sub.filter; + return true; + } + return false; } |