use accessor methods for Encoding Options
[meviz.git] / src / main / java / eu / svjatoslav / meviz / encoder / CommandlineHandler.java
index ff4b8ec..d6282c2 100755 (executable)
@@ -28,7 +28,7 @@ public class CommandlineHandler {
 
        NullParameter testParameter = parser.add(
                        new NullParameter("Simulate file encoding.")).addAliases("-t",
-                                       "--test");
+                       "--test");
 
        NullParameter recursiveParameter = parser.add(
                        new NullParameter("Enable recursive mode.")).addAliases("-r",
@@ -36,7 +36,7 @@ public class CommandlineHandler {
 
        NullParameter forPortableParameter = parser.add(
                        new NullParameter("Encode for portable player.")).addAliases("-p",
-                                       "--portable");
+                       "--portable");
 
        StringParameters inputPatternParameter = parser
                        .add(new StringParameters("File input pattern."))
@@ -52,7 +52,7 @@ public class CommandlineHandler {
 
        BitrateParameter audioBitrateParameter = parser.add(
                        new BitrateParameter("Audio bitrate")).addAliases("-a",
-                                       "--audio-bitrate");
+                       "--audio-bitrate");
 
        /**
         * @return {@link EncodingOptions} if commandline arguments were
@@ -65,22 +65,22 @@ public class CommandlineHandler {
 
                parser.parse(args);
 
-               options.recursive = recursiveParameter.isParameterSpecified();
+               options.setRecursive(recursiveParameter.isParameterSpecified());
 
-               options.deinterlace = deinterlaceParameter.isParameterSpecified();
+               options.setDeinterlace(deinterlaceParameter.isParameterSpecified());
 
-               options.testOnly = testParameter.isParameterSpecified();
+               options.setTestOnly(testParameter.isParameterSpecified());
 
                if (outputFormatParameter.isParameterSpecified())
-                       options.outputFormats.addAll(outputFormatParameter.getValue());
+                       options.getOutputFormats().addAll(outputFormatParameter.getValue());
 
                if (workingDirectoryParameter.isParameterSpecified())
-                       options.workingDirectory = workingDirectoryParameter.getValue();
+                       options.setWorkingDirectory(workingDirectoryParameter.getValue());
 
                if (inputPatternParameter.isParameterSpecified())
-                       options.inputPatterns.addAll(inputPatternParameter.getValue());
+                       options.getInputPatterns().addAll(inputPatternParameter.getValue());
 
-               options.forPortablePlayer = forPortableParameter.isParameterSpecified();
+               options.setForPortablePlayer(forPortableParameter.isParameterSpecified());
 
                if (videoBitrateParameter.isParameterSpecified())
                        options.setVideoBitrate(videoBitrateParameter.getValue());