package net.knarcraft.ffmpegconverter.converter; import net.knarcraft.ffmpegconverter.container.FFMpegCommand; import net.knarcraft.ffmpegconverter.container.StreamProbeResult; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.io.File; import java.io.IOException; import java.util.List; /** * This interface describes a file converter */ public interface Converter { /** * Gets all valid input formats for the converter * * @return
A list of valid input formats
*/ @NotNull ListThe file to convert.
* @throws IOExceptionIf the file cannot be converted.
*/ void convert(@NotNull File file) throws IOException; /** * Generates a command for a ProcessBuilder. * * @param executableThe executable file for ffmpeg
* @param probeResultThe result of probing the input file
* @param outFileThe output file
* @returnA list of commands
*/ @Nullable FFMpegCommand generateConversionCommand(@NotNull String executable, @NotNull StreamProbeResult probeResult, @NotNull String outFile); }