Pipeline working, implements FFmpegSetupManager
This commit is contained in:
@@ -3,13 +3,18 @@ package com.github.gtache.autosubtitle;
|
||||
import com.github.gtache.autosubtitle.subtitle.SubtitleCollection;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Collection;
|
||||
|
||||
public interface VideoConverter {
|
||||
|
||||
Video addSoftSubtitles(final Video video, final Collection<SubtitleCollection> subtitles) throws IOException;
|
||||
|
||||
void addSoftSubtitles(final Video video, final Collection<SubtitleCollection> subtitles, final Path path) throws IOException;
|
||||
|
||||
Video addHardSubtitles(final Video video, final SubtitleCollection subtitles) throws IOException;
|
||||
|
||||
void addHardSubtitles(final Video video, final SubtitleCollection subtitles, final Path path) throws IOException;
|
||||
|
||||
Audio getAudio(final Video video) throws IOException;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,16 @@ public interface Subtitle {
|
||||
return Duration.ofMillis(end() - start());
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the subtitle is shown at the given time
|
||||
*
|
||||
* @param time the time
|
||||
* @return true if the subtitle is shown
|
||||
*/
|
||||
default boolean isShowing(final long time) {
|
||||
return time >= start() && time <= end();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the font of the subtitle
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user