/*
* 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.
private boolean useTerminal;
- public EncodingTask(final File source, final File destination,
- final eu.svjatoslav.meviz.encoder.converters.AbstractConverter converter) {
+ private final String targetFormat;
+
+ public EncodingTask(final File source, final File target, final AbstractConverter converter,
+ final String targetFormat) {
this.source = source;
- target = destination;
+ this.target = target;
this.converter = converter;
-
+ this.targetFormat = targetFormat;
}
/**
System.out.println("Executing command: " + command);
- final Runtime run = Runtime.getRuntime();
- Process pr;
- pr = run.exec(new String[] { "/bin/bash", "-c", command });
+ final Runtime runtime = Runtime.getRuntime();
+ final Process process = runtime.exec(new String[] { "/bin/bash", "-c", command });
- pr.waitFor();
+ process.waitFor();
} catch (final Exception e) {
System.out.println(e.toString());
}
public String getCommand(final EncodingOptions encodingOptions) {
- return converter.getCommand(source, target, encodingOptions);
+ return converter.getCommand(source, target, encodingOptions, targetFormat);
}
/**