Class ValueArgument

  • All Implemented Interfaces:
    EncodingArgument

    public class ValueArgument
    extends java.lang.Object
    implements EncodingArgument
    A ValueArgument is an EncodingArgument that is optionally present based on the presence of the provided valueGetter.
    • Field Detail

      • argumentType

        private final ArgType argumentType
      • argumentName

        private final java.lang.String argumentName
      • valueGetter

        private final java.util.function.Function<EncodingAttributes,​java.util.Optional<java.lang.String>> valueGetter
    • Constructor Detail

      • ValueArgument

        public ValueArgument​(ArgType argType,
                             java.lang.String argumentName,
                             java.util.function.Function<EncodingAttributes,​java.util.Optional<java.lang.String>> valueGetter)
    • 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.
      • getName

        private java.lang.String getName()
      • getValue

        private java.util.Optional<java.lang.String> getValue​(EncodingAttributes context)