Rework to avoid using preferences object to retrieve options

This commit is contained in:
Guillaume Tâche
2024-09-22 21:59:10 +02:00
parent 7f99c48e2c
commit c59619da2d
115 changed files with 2294 additions and 765 deletions

View File

@@ -1,5 +1,6 @@
package com.github.gtache.autosubtitle;
import com.github.gtache.autosubtitle.subtitle.ExportOptions;
import com.github.gtache.autosubtitle.subtitle.SubtitleCollection;
import java.io.IOException;
@@ -16,40 +17,44 @@ public interface VideoConverter {
*
* @param video The video
* @param subtitles The subtitles collections to add
* @param options The export options for the subtitles
* @return The modified video
* @throws IOException If an I/O error occurs
*/
Video addSoftSubtitles(final Video video, final Collection<? extends SubtitleCollection<?>> subtitles) throws IOException;
Video addSoftSubtitles(final Video video, final Collection<? extends SubtitleCollection<?>> subtitles, final ExportOptions options) throws IOException;
/**
* Adds soft subtitles to the given video
*
* @param video The video
* @param subtitles The subtitles collections to add
* @param options The export options for the subtitles
* @param path The output path
* @throws IOException If an I/O error occurs
*/
void addSoftSubtitles(final Video video, final Collection<? extends SubtitleCollection<?>> subtitles, final Path path) throws IOException;
void addSoftSubtitles(final Video video, final Collection<? extends SubtitleCollection<?>> subtitles, final ExportOptions options, final Path path) throws IOException;
/**
* Adds hard subtitles to the given video
*
* @param video The video
* @param subtitles The subtitle collection to add
* @param options The export options for the subtitles
* @return The modified video
* @throws IOException If an I/O error occurs
*/
Video addHardSubtitles(final Video video, final SubtitleCollection<?> subtitles) throws IOException;
Video addHardSubtitles(final Video video, final SubtitleCollection<?> subtitles, final ExportOptions options) throws IOException;
/**
* Adds hard subtitles to the given video
*
* @param video The video
* @param subtitles The subtitle collection to add
* @param options The export options for the subtitles
* @param path The output path
* @throws IOException If an I/O error occurs
*/
void addHardSubtitles(final Video video, final SubtitleCollection<?> subtitles, final Path path) throws IOException;
void addHardSubtitles(final Video video, final SubtitleCollection<?> subtitles, final ExportOptions options, final Path path) throws IOException;
/**
* Extracts the audio from the given video