X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fmeviz%2Fencoder%2FEncoder.java;h=9820f2b52aa5c0e7296df69964d5723575433688;hb=567410640f4e0428caf9de9fc83df4c73f0e5067;hp=fda023ea61198094076821b75f8bc0ed8044df36;hpb=1b742640af99284aae1cd10c259254137316ba7c;p=meviz.git diff --git a/src/main/java/eu/svjatoslav/meviz/encoder/Encoder.java b/src/main/java/eu/svjatoslav/meviz/encoder/Encoder.java index fda023e..9820f2b 100755 --- a/src/main/java/eu/svjatoslav/meviz/encoder/Encoder.java +++ b/src/main/java/eu/svjatoslav/meviz/encoder/Encoder.java @@ -1,11 +1,11 @@ /* * Meviz - Various tools collection to work with multimedia. - * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * Copyright (C) 2012 -- 2019, 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. - */ + * modify it under the terms of version 3 of the GNU Lesser General Public License + * or later as published by the Free Software Foundation. +*/ package eu.svjatoslav.meviz.encoder; @@ -19,20 +19,17 @@ import java.util.List; public class Encoder implements Module { - public FormatsRegistry encoderRegistry = new FormatsRegistry(); - - public EncodingOptions encodingOptions; - - public EncodingPlan encodingPlan; - - CommandlineHandler commandlineHandler = new CommandlineHandler(); + private final FormatsRegistry encoderRegistry = new FormatsRegistry(); + private final CommandlineHandler commandlineHandler = new CommandlineHandler(); + private EncodingOptions encodingOptions; + private EncodingPlan encodingPlan; /** * Generate encoding plan * * @param sourceFile Source directory of file */ - public void compileEncodingPlan(final File sourceFile) { + private void compileEncodingPlan(final File sourceFile) { if (!sourceFile.exists()) { System.out.println("Error: file \"" + sourceFile.getAbsolutePath() + "\" does not exist."); @@ -106,7 +103,7 @@ public class Encoder implements Module { * @param file single file candidate to potentially be encoded * @return true if file shall be encoded. */ - public boolean fileMatchesInputPattern(final File file) { + private boolean fileMatchesInputPattern(final File file) { final String fileName = file.getName().toLowerCase(); for (final String inputPattern : encodingOptions.getInputPatterns())