Package ws.schild.jave.filters
Class FilterChain
- java.lang.Object
-
- ws.schild.jave.filters.FilterChain
-
- All Implemented Interfaces:
VideoFilter
public class FilterChain extends java.lang.Object implements VideoFilter
A filterchain as described by FFMPEG Documentation.A filterchain is a comma separated series of filters.
-
-
Constructor Summary
Constructors Constructor Description FilterChain()Create an empty filterchain.FilterChain(Filter... filters)Create a filterchain with the specified filters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FilterChainaddFilter(Filter filter)Add one Filter to this filterchainjava.lang.StringgetExpression()The expression to be used in the video filter argument to ffmpegFilterChainprependFilter(Filter filter)FilterChainsetInputLabel(java.lang.String label)Adds an input label to the first filter in this chain.FilterChainsetOutputLabel(java.lang.String label)Adds an output label to the first filter in this chain.
-
-
-
Field Detail
-
filters
private final java.util.List<Filter> filters
-
-
Constructor Detail
-
FilterChain
public FilterChain()
Create an empty filterchain.
-
FilterChain
public FilterChain(Filter... filters)
Create a filterchain with the specified filters- Parameters:
filters- The ordered list of filters in this chain
-
-
Method Detail
-
addFilter
public FilterChain addFilter(Filter filter)
Add one Filter to this filterchain- Parameters:
filter- The Filter to add to this chain.- Returns:
- this FilterChain for builder pattern magic
-
prependFilter
public FilterChain prependFilter(Filter filter)
-
setInputLabel
public FilterChain setInputLabel(java.lang.String label)
Adds an input label to the first filter in this chain.- Parameters:
label- The label to use for the input label for the first filter in this chain- Returns:
- this FilterChain for builder pattern magic
- Throws:
java.lang.IndexOutOfBoundsException- if there are no filters in this chain.
-
setOutputLabel
public FilterChain setOutputLabel(java.lang.String label)
Adds an output label to the first filter in this chain.- Parameters:
label- The label to use for the output label for the last filter in this chain- Returns:
- this FilterChain for builder pattern magic
- Throws:
java.lang.IndexOutOfBoundsException- if there are no filters in this chain.
-
getExpression
public java.lang.String getExpression()
Description copied from interface:VideoFilterThe expression to be used in the video filter argument to ffmpeg- Specified by:
getExpressionin interfaceVideoFilter- Returns:
- A string that will be placed in the -vf or -filter_complex option to ffmpeg.
-
-