/*
* Meviz - Various tools collection to work with multimedia.
* Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public License
* as published by the Free Software Foundation.
// handle directory
for (final File subFile : sourceFile.listFiles())
if (subFile.isDirectory()) {
- if (encodingOptions.recursive)
+ if (encodingOptions.isRecursive())
compileEncodingPlan(subFile);
} else
compileEncodingPlan(subFile);
.getFileExtension(sourceFile);
// encode source file into every desired target format
- for (final String targetFormat : encodingOptions.outputFormats) {
+ for (final String targetFormat : encodingOptions.getOutputFormats()) {
// construct target file
final File targetFile = getTargetFile(sourceFile,
+ targetFormat
+ " format.");
else {
- final AbstractConverter chosenFormat = formats.get(0);
+ final AbstractConverter chosenFormat = formats
+ .get(0);
final EncodingTask encodingTask = new EncodingTask(
- sourceFile, targetFile, chosenFormat);
+ sourceFile, targetFile, chosenFormat,
+ targetFormat);
if (chosenFormat.isTerminalMandatory())
encodingTask.setUseTerminal(true);
public boolean fileMatchesInputPattern(final File file) {
final String fileName = file.getName().toLowerCase();
- for (final String inputPattern : encodingOptions.inputPatterns)
+ for (final String inputPattern : encodingOptions.getInputPatterns())
if (WildCardMatcher.match(fileName, inputPattern.toLowerCase()))
return true;
encodingPlan = new EncodingPlan();
- compileEncodingPlan(encodingOptions.workingDirectory);
+ compileEncodingPlan(encodingOptions.getWorkingDirectory());
- if (!encodingOptions.testOnly)
+ if (!encodingOptions.isTestOnly())
try {
encodingPlan.execute(encodingOptions);
} catch (final Exception exception) {