Adds tests for API

This commit is contained in:
Guillaume Tâche
2024-08-09 21:18:47 +02:00
parent 155b011c2b
commit 428edcd806
17 changed files with 515 additions and 41 deletions

View File

@@ -6,15 +6,57 @@ import java.io.IOException;
import java.nio.file.Path;
import java.util.Collection;
/**
* Operates on videos
*/
public interface VideoConverter {
/**
* Adds soft subtitles to the given video
*
* @param video The video
* @param subtitles The subtitles collections to add
* @return The modified video
* @throws IOException If an I/O error occurs
*/
Video addSoftSubtitles(final Video video, final Collection<SubtitleCollection> subtitles) throws IOException;
/**
* Adds soft subtitles to the given video
*
* @param video The video
* @param subtitles The subtitles collections to add
* @param path The output path
* @throws IOException If an I/O error occurs
*/
void addSoftSubtitles(final Video video, final Collection<SubtitleCollection> subtitles, final Path path) throws IOException;
/**
* Adds hard subtitles to the given video
*
* @param video The video
* @param subtitles The subtitle collection to add
* @return The modified video
* @throws IOException If an I/O error occurs
*/
Video addHardSubtitles(final Video video, final SubtitleCollection subtitles) throws IOException;
/**
* Adds hard subtitles to the given video
*
* @param video The video
* @param subtitles The subtitle collection to add
* @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;
/**
* Extracts the audio from the given video
*
* @param video The video
* @return The audio
* @throws IOException If an I/O error occurs
*/
Audio getAudio(final Video video) throws IOException;
}