From 3d87ca6b5ef1a25438cf05c685817a9b2d8de19e Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 22 May 2013 23:19:57 +0200 Subject: m_option, vf: add label support Can be used to refer to filters by name. Intended to be used when the filter chain is changed at runtime. A label can be assigned to a filter by prefixing it with '@name:', where 'name' is an user-chosen identifier. For example, a filter added with '-vf-add @label1:gradfun=123' can be removed with '-vf-del @label1'. If a filter with an already existing label is added, the existing filter is replaced with the new filter (this happens for both -vf-add and -vf-pre). If a filter is replaced, the new filter takes the position of the old filter, instead of being appended/prepended to the filter chain as usual. For -vf-toggle, labels are compared if at least one of the filters has a label; otherwise they are compared by filter name and arguments (like before). This means two filters are never considered equal if one has a label and the other one does not. --- DOCS/man/en/input.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'DOCS/man') diff --git a/DOCS/man/en/input.rst b/DOCS/man/en/input.rst index 671e05bf05..59d48f5a28 100644 --- a/DOCS/man/en/input.rst +++ b/DOCS/man/en/input.rst @@ -260,6 +260,11 @@ vf set|add|toggle|del "filter1=params,filter2,..." indexes start from the last filter, and ``-1`` denotes the last filter. + You can assign labels to filter by prefixing them with ``@name:`` (where + ``name`` is a user-chosen arbitrary identifiers). Labels can be used to + refer to filters by name in all of the filter chain modification commands. + For ``add``, using an already used label will replace the existing filter. + *EXAMPLE for input.conf*: - ``a vf set flip`` turn video upside-down on the ``a`` key -- cgit v1.2.3