User:Gzarkadas/Experiments/FilterDefinition1

From Avisynth

Jump to: navigation, search

Contents

[edit] A filter definition template

[edit] Template code

{{{1}}}

[edit] Usage with singleline definitions

example(clip, int)

[edit] Usage with multiline definitions (AviSource definition)

AviSource(string filename [, ... ], [bool audio = true], [string pixel_type = YV12], [string fourCC])<br/>OpenDMLSource(string filename [, ... ], [bool audio = true], [string pixel_type = YV12], [string fourCC])<br/>AviFileSource(string filename [, ... ], [bool audio = true], [string pixel_type = YV12], [string fourCC])<br/>WavSource(string filename [, ... ])

[edit] Usage with multiline definitions (a simple example)

first line
second line
third line
fourth line

[edit] Discussion

Multiline is hard to achieve with filter definitions because of the effect of ()[]= on the interpretation of the parameter. Using the nowiki tag is necessary, but then line breaks do not work. Also this produces more typing.

The best solution seems to incorporate the nowiki tag to the template and use multiple template versions, one for each number of lines. This is not so difficult since in general there will not be more than 5 lines for a definition.

Note: Actually, it is the = character inside the template parameter string
(see AviSource definition) that creates the difficulty. 
In order to get by, one should use the "& # 61 ;" sequence instead (remove spaces inside), 
which is a valid HTML character reference and thus portable to other formats also.
Personal tools