Improves converters to remove some code duplication
This commit is contained in:
@ -1,7 +1,10 @@
|
||||
package net.knarcraft.ffmpegconverter.converter;
|
||||
|
||||
import net.knarcraft.ffmpegconverter.streams.StreamObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This interface describes a file converter
|
||||
@ -15,4 +18,15 @@ public interface Converter {
|
||||
* @throws IOException <p>If the file cannot be converted.</p>
|
||||
*/
|
||||
void convert(File file) throws IOException;
|
||||
|
||||
/**
|
||||
* Generates a command for a ProcessBuilder.
|
||||
*
|
||||
* @param executable <p>The executable file for ffmpeg.</p>
|
||||
* @param file <p>The input file.</p>
|
||||
* @param streams <p>A list of ffprobe streams.</p>
|
||||
* @param outFile <p>The output file.</p>
|
||||
* @return <p>A list of commands</p>
|
||||
*/
|
||||
String[] builderCommand(String executable, File file, List<StreamObject> streams, String outFile);
|
||||
}
|
||||
|
Reference in New Issue
Block a user