Class Filter

    • Constructor Summary

      Constructors 
      Constructor Description
      Filter​(java.lang.String name)
      Create a filter with the specified name with no input/output labels or arguments.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Filter addInputLabel​(java.lang.String... label)
      Add an input label to the list of input labels for this filter
      Filter addNamedArgument​(java.lang.String name, java.lang.String value)
      Add a named argument to the set of named arguments for this filter
      Filter addOrderedArgument​(java.lang.String... arg)
      Add an ordered argument to the list of arguments for this filter
      Filter addOutputLabel​(java.lang.String... label)
      Add an output label to the list of output labels for this filter
      protected java.lang.String escapingPath​(java.lang.String filePath)
      escaping special characters for file path.
      private java.lang.String formatArguments()  
      private static java.lang.String formatLinkLabels​(java.util.List<java.lang.String> labels)  
      java.lang.String getExpression()
      The expression to be used in the video filter argument to ffmpeg
      void setQuoteCharacter​(java.lang.String quoteCharacter)
      Set quoteCharacter of arguments for this filter, Default is double quote.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • inputLinkLabels

        private final java.util.List<java.lang.String> inputLinkLabels
      • name

        private final java.lang.String name
      • orderedArguments

        private final java.util.List<java.lang.String> orderedArguments
      • namedArguments

        private final java.util.Map<java.lang.String,​java.lang.String> namedArguments
      • outputLinkLabels

        private final java.util.List<java.lang.String> outputLinkLabels
      • quoteCharacter

        private java.lang.String quoteCharacter
    • Constructor Detail

      • Filter

        public Filter​(java.lang.String name)
        Create a filter with the specified name with no input/output labels or arguments.
        Parameters:
        name - The name of the filter.
    • Method Detail

      • addInputLabel

        public Filter addInputLabel​(java.lang.String... label)
        Add an input label to the list of input labels for this filter
        Parameters:
        label - The name of the input label(s)
        Returns:
        this Filter for builder pattern magic
      • addOrderedArgument

        public Filter addOrderedArgument​(java.lang.String... arg)
        Add an ordered argument to the list of arguments for this filter
        Parameters:
        arg - Any number of ordered arguments
        Returns:
        this Filter for builder pattern magic
      • addNamedArgument

        public Filter addNamedArgument​(java.lang.String name,
                                       java.lang.String value)
        Add a named argument to the set of named arguments for this filter
        Parameters:
        name - The name of the argument
        value - The value for the argument
        Returns:
        this Filter for builder pattern magic
      • addOutputLabel

        public Filter addOutputLabel​(java.lang.String... label)
        Add an output label to the list of output labels for this filter
        Parameters:
        label - The name of the input label
        Returns:
        this Filter for builder pattern magic
      • getExpression

        public java.lang.String getExpression()
        Description copied from interface: VideoFilter
        The expression to be used in the video filter argument to ffmpeg
        Specified by:
        getExpression in interface VideoFilter
        Returns:
        A string that will be placed in the -vf or -filter_complex option to ffmpeg.
      • setQuoteCharacter

        public void setQuoteCharacter​(java.lang.String quoteCharacter)
        Set quoteCharacter of arguments for this filter, Default is double quote.
        Parameters:
        quoteCharacter - The quoteCharacter of arguments
      • formatLinkLabels

        private static java.lang.String formatLinkLabels​(java.util.List<java.lang.String> labels)
      • formatArguments

        private java.lang.String formatArguments()
      • escapingPath

        protected java.lang.String escapingPath​(java.lang.String filePath)
        escaping special characters for file path. Notes on file url escaping
        Parameters:
        filePath - unescaped file path
        Returns:
        escaped file path