/*
- * 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.
+ * Meviz - Various tools collection to work with multimedia. Author: Svjatoslav Agejenko.
+ * This project is released under Creative Commons Zero (CC0) license.
*/
+
package eu.svjatoslav.meviz.encoder;
import eu.svjatoslav.commons.file.FilePathParser;
-import eu.svjatoslav.commons.string.WildCardMatcher;
+import eu.svjatoslav.commons.string.GlobMatcher;
import eu.svjatoslav.meviz.Module;
import eu.svjatoslav.meviz.encoder.converters.AbstractConverter;
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.");
* @param file single file candidate to potentially be encoded
* @return <code>true</code> 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())
- if (WildCardMatcher.match(fileName, inputPattern.toLowerCase()))
+ if (GlobMatcher.match(fileName, inputPattern.toLowerCase()))
return true;
return false;