Class PredicateArgument

  • All Implemented Interfaces:
    EncodingArgument

    public class PredicateArgument
    extends java.lang.Object
    implements EncodingArgument
    A PredicateArgument is an EncodingArgument that adds its arguments based on the provided predicate
    • Field Detail

      • argumentType

        private final ArgType argumentType
      • arguments

        private final java.util.function.Supplier<java.util.stream.Stream<java.lang.String>> arguments
    • Constructor Detail

      • PredicateArgument

        public PredicateArgument​(ArgType argType,
                                 java.lang.String argument,
                                 java.util.function.Predicate<EncodingAttributes> predicate)
      • PredicateArgument

        public PredicateArgument​(ArgType argType,
                                 java.lang.String argument1,
                                 java.lang.String argument2,
                                 java.util.function.Predicate<EncodingAttributes> predicate)
    • Method Detail

      • getArguments

        public java.util.stream.Stream<java.lang.String> getArguments​(EncodingAttributes context)
        Description copied from interface: EncodingArgument
        Gets the Stream of arguments given the EncodingAttributes as context. Implementers must take care to return a new Stream on each successive call as doing otherwise will result in the stream already being operated on exceptions.
        Specified by:
        getArguments in interface EncodingArgument
        Parameters:
        context - The EncodingAttributes specified by the user. Use this in your closure to generate the arguments you'd like to pass to ffmpeg.
        Returns:
        A stream of arguments to pass to ffmpeg.