- if (recursiveParameter.isParameterSpecified())
- options.recursive = true;
-
- if (terminalParameter.isParameterSpecified())
- options.terminal = true;
-
- if (testParameter.isParameterSpecified())
- options.testOnly = true;
-
- if (outputFormatParameter.isParameterSpecified()) {
- options.outputFormats.addAll(outputFormatParameter.getArgumentsAsStrings());
- }
-
- if (workingDirectoryParameter.isParameterSpecified()) {
- options.workingDirectory = workingDirectoryParameter.getArgumentsAsFiles().get(0);
- }
-
- if (inputPatternParameter.isParameterSpecified()) {
- options.inputPatterns.addAll(inputPatternParameter.getArgumentsAsStrings());
- }
-
- if (videoBitrateParameter.isParameterSpecified()) {
-
- try {
- options.videoBitrate = Bitrate.bitrate.valueOf(videoBitrateParameter.getArgumentAsString()
- .toUpperCase());
- } catch (final Exception e) {
- System.out.println("Invalid video bitrate. Valid values are: LOW, MEDIUM, HIGH.");
- return null;
- }
- }
-
- return options;
- }