Fixes subtitle mapping for video with only external subtitles
All checks were successful
KnarCraft/FFmpegConvert/pipeline/head This commit looks good
All checks were successful
KnarCraft/FFmpegConvert/pipeline/head This commit looks good
This commit is contained in:
@ -9,19 +9,21 @@ public class SubtitleStream extends AbstractStream implements StreamObject {
|
||||
final private String file;
|
||||
final private boolean isFullSubtitle;
|
||||
final private boolean isImageSubtitle;
|
||||
final private boolean isInternalStream;
|
||||
|
||||
/**
|
||||
* Instantiates a new subtitle stream
|
||||
*
|
||||
* @param codecName <p>The name of the codec for the subtitle stream.</p>
|
||||
* @param absoluteIndex <p>The index of the subtitle stream.</p>
|
||||
* @param relativeIndex <p>The index of the subtitle stream relative to other subtitle streams.</p>
|
||||
* @param language <p>The language of the subtitle stream.</p>
|
||||
* @param title <p>The title of the subtitle stream.</p>
|
||||
* @param file <p>The file containing the subtitle.</p>
|
||||
* @param codecName <p>The name of the codec for the subtitle stream.</p>
|
||||
* @param absoluteIndex <p>The index of the subtitle stream.</p>
|
||||
* @param relativeIndex <p>The index of the subtitle stream relative to other subtitle streams.</p>
|
||||
* @param language <p>The language of the subtitle stream.</p>
|
||||
* @param title <p>The title of the subtitle stream.</p>
|
||||
* @param file <p>The file containing the subtitle.</p>
|
||||
* @param isInternalStream <p>Whether this subtitle stream is in the video file itself</p>
|
||||
*/
|
||||
public SubtitleStream(String codecName, int absoluteIndex, int relativeIndex, String language, String title,
|
||||
String file) {
|
||||
String file, boolean isInternalStream) {
|
||||
this.codecName = codecName;
|
||||
this.absoluteIndex = absoluteIndex;
|
||||
this.language = language;
|
||||
@ -29,6 +31,7 @@ public class SubtitleStream extends AbstractStream implements StreamObject {
|
||||
this.isFullSubtitle = isFullSubtitle();
|
||||
this.relativeIndex = relativeIndex;
|
||||
this.isImageSubtitle = isImageSubtitle();
|
||||
this.isInternalStream = isInternalStream;
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
@ -50,6 +53,15 @@ public class SubtitleStream extends AbstractStream implements StreamObject {
|
||||
return this.file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether this subtitle stream is an internal stream, not an external one
|
||||
*
|
||||
* @return <p>True if this stream is an internal stream</p>
|
||||
*/
|
||||
public boolean isInternalSubtitle() {
|
||||
return this.isInternalStream;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether the subtitle is an image subtitle
|
||||
*
|
||||
|
Reference in New Issue
Block a user