Simplifies and improves code. Removes some duplication
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:
@@ -7,6 +7,7 @@ public abstract class AbstractStream implements StreamObject {
|
||||
int absoluteIndex;
|
||||
int relativeIndex;
|
||||
String codecName;
|
||||
String language;
|
||||
|
||||
@Override
|
||||
public String getCodecName() {
|
||||
@@ -22,4 +23,10 @@ public abstract class AbstractStream implements StreamObject {
|
||||
public int getRelativeIndex() {
|
||||
return this.relativeIndex;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLanguage() {
|
||||
return this.language;
|
||||
}
|
||||
|
||||
}
|
@@ -4,7 +4,6 @@ package net.knarcraft.ffmpegconverter.streams;
|
||||
* This class represents an ffmpeg audio stream
|
||||
*/
|
||||
public class AudioStream extends AbstractStream implements StreamObject {
|
||||
private final String language;
|
||||
private final int channels;
|
||||
private final String title;
|
||||
|
||||
@@ -27,15 +26,6 @@ public class AudioStream extends AbstractStream implements StreamObject {
|
||||
this.channels = channels;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the language of the audio stream
|
||||
*
|
||||
* @return <p>The language of the audio stream.</p>
|
||||
*/
|
||||
public String getLanguage() {
|
||||
return this.language;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the number of channels for the audio stream
|
||||
*
|
||||
|
@@ -23,4 +23,11 @@ public interface StreamObject {
|
||||
*/
|
||||
int getRelativeIndex();
|
||||
|
||||
/**
|
||||
* Gets the language of the audio stream
|
||||
*
|
||||
* @return <p>The language of the audio stream.</p>
|
||||
*/
|
||||
String getLanguage();
|
||||
|
||||
}
|
||||
|
@@ -4,7 +4,6 @@ package net.knarcraft.ffmpegconverter.streams;
|
||||
* An object representation of a subtitle stream in a media file
|
||||
*/
|
||||
public class SubtitleStream extends AbstractStream implements StreamObject {
|
||||
final private String language;
|
||||
final private String title;
|
||||
final private String file;
|
||||
final private boolean isFullSubtitle;
|
||||
@@ -32,15 +31,6 @@ public class SubtitleStream extends AbstractStream implements StreamObject {
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the language of the subtitle stream
|
||||
*
|
||||
* @return <p>The language of the subtitle stream.</p>
|
||||
*/
|
||||
public String getLanguage() {
|
||||
return this.language;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the title of the subtitle stream
|
||||
*
|
||||
|
Reference in New Issue
Block a user