EpicKnarvik97 4ebd29b358
Some checks failed
KnarCraft/FFmpegConvert/pipeline/head There was a failure building this commit
Makes it possible to enable debug mode
Debug mode is now enabled if the property `debug = true` is set in `conf/config.properties`
Changes code for reading internal configurations
Changes many primitive lists to List<>
Adds some missing annotations
Renames the main class
2024-04-17 15:35:09 +02:00

46 lines
1.3 KiB
Java

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 <p>A list of valid input formats</p>
*/
@NotNull
List<String> getValidFormats();
/**
* Converts the given file
*
* @param file <p>The file to convert.</p>
* @throws IOException <p>If the file cannot be converted.</p>
*/
void convert(@NotNull File file) throws IOException;
/**
* Generates a command for a ProcessBuilder.
*
* @param executable <p>The executable file for ffmpeg</p>
* @param probeResult <p>The result of probing the input file</p>
* @param outFile <p>The output file</p>
* @return <p>A list of commands</p>
*/
@Nullable
FFMpegCommand generateConversionCommand(@NotNull String executable, @NotNull StreamProbeResult probeResult,
@NotNull String outFile);
}