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 List getValidFormats(); /** * Converts the given file * * @param file

The file to convert.

* @throws IOException

If the file cannot be converted.

*/ void convert(@NotNull File file) throws IOException; /** * Generates a command for a ProcessBuilder. * * @param executable

The executable file for ffmpeg

* @param probeResult

The result of probing the input file

* @param outFile

The output file

* @return

A list of commands

*/ @Nullable FFMpegCommand generateConversionCommand(@NotNull String executable, @NotNull StreamProbeResult probeResult, @NotNull String outFile); }