Makes it possible to enable debug mode
Some checks failed
KnarCraft/FFmpegConvert/pipeline/head There was a failure building this commit

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
This commit is contained in:
2024-04-17 15:35:09 +02:00
parent f0e75eb440
commit 4ebd29b358
29 changed files with 492 additions and 177 deletions

View File

@ -9,6 +9,7 @@ import net.knarcraft.ffmpegconverter.converter.module.mapping.NthAudioStreamModu
import net.knarcraft.ffmpegconverter.converter.module.output.SetOutputFileModule;
import net.knarcraft.ffmpegconverter.utility.FFMpegHelper;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.List;
@ -25,13 +26,14 @@ public class AudioConverter extends AbstractConverter {
* @param ffmpegPath <p>Path/command to ffmpeg.</p>
* @param newExtension <p>The extension of the new file.</p>
*/
public AudioConverter(String ffprobePath, String ffmpegPath, String newExtension) {
public AudioConverter(@NotNull String ffprobePath, @NotNull String ffmpegPath, @NotNull String newExtension) {
super(newExtension);
this.ffprobePath = ffprobePath;
this.ffmpegPath = ffmpegPath;
}
@Override
@Nullable
public FFMpegCommand generateConversionCommand(@NotNull String executable, @NotNull StreamProbeResult probeResult,
@NotNull String outFile) {
FFMpegCommand command = FFMpegHelper.getFFMpegGeneralFileCommand(executable, probeResult.parsedFiles());
@ -50,7 +52,8 @@ public class AudioConverter extends AbstractConverter {
}
@Override
public String[] getValidFormats() {
@NotNull
public List<String> getValidFormats() {
return audioFormats;
}