diff options
author | wm4 <wm4@nowhere> | 2013-05-22 23:19:57 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-05-23 01:02:24 +0200 |
commit | 3d87ca6b5ef1a25438cf05c685817a9b2d8de19e (patch) | |
tree | 95b72f87a72037ff75d452396db695b84efd48f0 /core/m_option.h | |
parent | b2c2fe7a3782c1c47ba3bee6481b0c2f8d41ef22 (diff) | |
download | mpv-3d87ca6b5ef1a25438cf05c685817a9b2d8de19e.tar.bz2 mpv-3d87ca6b5ef1a25438cf05c685817a9b2d8de19e.tar.xz |
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.
Diffstat (limited to 'core/m_option.h')
-rw-r--r-- | core/m_option.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/m_option.h b/core/m_option.h index c94b170424..6a8bcfbf1a 100644 --- a/core/m_option.h +++ b/core/m_option.h @@ -110,6 +110,8 @@ typedef struct { typedef struct m_obj_settings { // Type of the object. char *name; + // Optional user-defined name. + char *label; // NULL terminated array of parameter/value pairs. char **attribs; } m_obj_settings_t; |