added webm support
[meviz.git] / src / main / java / eu / svjatoslav / meviz / encoder / EncodingTask.java
index 535f8f7..816fba7 100755 (executable)
@@ -1,7 +1,7 @@
 /*
  * 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.
@@ -29,13 +29,18 @@ public class EncodingTask {
 
        private boolean useTerminal;
 
-       public EncodingTask(final File source, final File destination,
-                       final eu.svjatoslav.meviz.encoder.converters.AbstractConverter converter) {
+       private String targetFormat;
+
+       public EncodingTask(
+                       final File source,
+                       final File destination,
+                       final eu.svjatoslav.meviz.encoder.converters.AbstractConverter converter,
+                       String targetFormat) {
 
                this.source = source;
                target = destination;
                this.converter = converter;
-
+               this.targetFormat = targetFormat;
        }
 
        /**
@@ -82,7 +87,8 @@ public class EncodingTask {
        }
 
        public String getCommand(final EncodingOptions encodingOptions) {
-               return converter.getCommand(source, target, encodingOptions);
+               return converter.getCommand(source, target, encodingOptions,
+                               targetFormat);
        }
 
        /**