Package ws.schild.jave.filters
Class FilterChain
java.lang.Object
ws.schild.jave.filters.FilterChain
- All Implemented Interfaces:
VideoFilter
A filterchain as described by FFMPEG Documentation.
A filterchain is a comma separated series of filters.
- Author:
- mressler
-
Constructor Summary
ConstructorsConstructorDescriptionCreate an empty filterchain.FilterChain(Filter... filters) Create a filterchain with the specified filters -
Method Summary
Modifier and TypeMethodDescriptionAdd one Filter to this filterchainThe expression to be used in the video filter argument to ffmpegprependFilter(Filter filter) setInputLabel(String label) Adds an input label to the first filter in this chain.setOutputLabel(String label) Adds an output label to the first filter in this chain.
-
Constructor Details
-
FilterChain
public FilterChain()Create an empty filterchain. -
FilterChain
Create a filterchain with the specified filters- Parameters:
filters- The ordered list of filters in this chain
-
-
Method Details
-
addFilter
Add one Filter to this filterchain- Parameters:
filter- The Filter to add to this chain.- Returns:
- this FilterChain for builder pattern magic
-
prependFilter
-
setInputLabel
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:
IndexOutOfBoundsException- if there are no filters in this chain.
-
setOutputLabel
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:
IndexOutOfBoundsException- if there are no filters in this chain.
-
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.
-