Package bdsup2sub.core
Class Configuration
java.lang.Object
bdsup2sub.core.Configuration
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
static final boolean
private boolean
private double
Factor to calculate height of one cinemascope bar from screen heightprivate boolean
private static final String
private final String
static final boolean
static final boolean
private boolean
private boolean
private int
private StreamID
static final int
static final int
static final int
static final ForcedFlagState
static final double
static final double
static final int
static final int
static final int
static final int
static final int
static final int
static final OutputMode
static final int
static final double
static final double
static final Resolution
private int
static final Color
private boolean
static final boolean
private boolean
private ForcedFlagState
private double
private boolean
private double
private double
private double
private static final Configuration
private boolean
private int
private int[]
static final double
static final double
private int
private boolean
private CaptionMoveModeX
private CaptionMoveModeY
private int
private int
static final Color
private Resolution
private Props
private static final int
private boolean
static final Color
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToRecentFiles
(String filename) int
Get alpha threshold for cropping.int
boolean
double
boolean
Get flag that tells whether or not to convert the frame rate.boolean
int
int
Get Delay to apply to target in 90kHz resolution.boolean
Set flag that tells whether to fix subpictures with a display time shorter than minTimePTS.boolean
Fix completely invisible subtitles due to alpha=0 (SUB/IDX and SUP/IFO import only).double
double
double
double
static Configuration
int
Index of language to be used for SUB/IDX export (also used for XML export)int[]
Array of luminance thresholds ( 0: med/high, 1: low/med )int
Get maximum time difference for merging captions.int
Get minimum display time for subpictures in 90kHz resolutionboolean
Get: keep move settings after loading a new streamint
int
Get palette creation mode.boolean
Write PGCEdit palette file on export.boolean
boolean
Flag that defines whether to export only subpictures marked as "forced"boolean
boolean
boolean
boolean
void
load()
boolean
private void
boolean
boolean
int
boolean
double
double
double
double
int
private void
private void
void
setAlphaCrop
(int alphaCrop) void
setAlphaThreshold
(int alphaThreshold) void
setApplyFreeScale
(boolean applyFreeScale) void
setCineBarFactor
(double cineBarFactor) void
setCliMode
(boolean cliMode) void
setColorProfilePath
(String colorProfilePath) void
setConvertFPS
(boolean convertFPS) void
setConvertResolution
(boolean convertResolution) void
setCropOffsetY
(int cropOffsetY) void
setCurrentStreamID
(StreamID currentStreamID) void
setDelayPTS
(int delayPTS) void
setExportForced
(boolean exportForced) void
setFixShortFrames
(boolean fixShortFrames) void
setFixZeroAlpha
(boolean fixZeroAlpha) void
setForceAll
(ForcedFlagState forceAll) void
setFpsSrc
(double fpsSrc) void
setFpsSrcCertain
(boolean fpsSrcCertain) void
setFpsTrg
(double fpsTrg) void
setFreeScaleFactor
(double x, double y) void
setKeepFps
(boolean keepFps) void
setLanguageIdx
(int languageIdx) void
setLoadPath
(String loadPath) void
setLuminanceThreshold
(int[] luminanceThreshold) void
setMainWindowLocation
(Point location) void
setMainWindowSize
(Dimension dimension) void
setMergePTSdiff
(int mergePTSdiff) void
setMinTimePTS
(int minTimePTS) void
setMoveCaptions
(boolean moveCaptions) Set: keep move settings after loading a new streamvoid
setMoveModeX
(CaptionMoveModeX moveModeX) void
setMoveModeY
(CaptionMoveModeY moveModeY) void
setMoveOffsetX
(int moveOffsetX) void
setMoveOffsetY
(int moveOffsetY) void
setOutputMode
(OutputMode outputMode) void
setOutputResolution
(Resolution outputResolution) void
setPaletteMode
(PaletteMode paletteMode) void
setScalingFilter
(ScalingFilter filter) void
setSwapCrCb
(boolean swapCrCb) void
setVerbose
(boolean verbose) void
setWritePGCEditPalette
(boolean writePGCEditPalette) void
storeApplyFreeScale
(boolean applyFreeScale) void
void
storeConvertFPS
(boolean convertFPS) void
storeConvertResolution
(boolean convertResolution) void
storeDelayPTS
(int delayPTS) void
storeFixShortFrames
(boolean fixShortFrames) void
storeForceAll
(ForcedFlagState forceAll) void
storeFPSSrc
(double fpsSrc) void
storeFpsTrg
(double fpsTrg) void
storeFreeScaleFactor
(double x, double y) void
storeMinTimePTS
(int minTimePTS) void
storeOutputResolution
(Resolution outputResolution)
-
Field Details
-
OK_BACKGROUND
-
WARN_BACKGROUND
-
ERROR_BACKGROUND
-
CONVERT_RESOLUTION_BY_DEFAULT
public static final boolean CONVERT_RESOLUTION_BY_DEFAULT- See Also:
-
CONVERT_FRAMERATE_BY_DEFAULT
public static final boolean CONVERT_FRAMERATE_BY_DEFAULT- See Also:
-
DEFAULT_PTS_DELAY
public static final int DEFAULT_PTS_DELAY- See Also:
-
FIX_SHORT_FRAMES_BY_DEFAULT
public static final boolean FIX_SHORT_FRAMES_BY_DEFAULT- See Also:
-
DEFAULT_MIN_DISPLAY_TIME_PTS
public static final int DEFAULT_MIN_DISPLAY_TIME_PTS- See Also:
-
APPLY_FREE_SCALE_BY_DEFAULT
public static final boolean APPLY_FREE_SCALE_BY_DEFAULT- See Also:
-
DEFAULT_FREE_SCALE_FACTOR_X
public static final double DEFAULT_FREE_SCALE_FACTOR_X- See Also:
-
DEFAULT_FREE_SCALE_FACTOR_Y
public static final double DEFAULT_FREE_SCALE_FACTOR_Y- See Also:
-
MIN_FREE_SCALE_FACTOR
public static final double MIN_FREE_SCALE_FACTOR- See Also:
-
MAX_FREE_SCALE_FACTOR
public static final double MAX_FREE_SCALE_FACTOR- See Also:
-
DEFAULT_SOURCE_FRAMERATE
public static final double DEFAULT_SOURCE_FRAMERATE -
DEFAULT_TARGET_FRAMERATE
public static final double DEFAULT_TARGET_FRAMERATE -
DEFAULT_TARGET_RESOLUTION
-
DEFAULT_FORCED_FLAG_STATE
-
DEFAULT_ALPHA_CROP_THRESHOLD
public static final int DEFAULT_ALPHA_CROP_THRESHOLD- See Also:
-
DEFAULT_ALPHA_THRESHOLD
public static final int DEFAULT_ALPHA_THRESHOLD- See Also:
-
DEFAULT_LUMINANCE_MED_HIGH_THRESHOLD
public static final int DEFAULT_LUMINANCE_MED_HIGH_THRESHOLD- See Also:
-
DEFAULT_LUMINANCE_LOW_MED_THRESHOLD
public static final int DEFAULT_LUMINANCE_LOW_MED_THRESHOLD- See Also:
-
DEFAULT_MOVE_Y_OFFSET
public static final int DEFAULT_MOVE_Y_OFFSET- See Also:
-
DEFAULT_MOVE_X_OFFSET
public static final int DEFAULT_MOVE_X_OFFSET- See Also:
-
DEFAULT_CROP_LINE_COUNT
public static final int DEFAULT_CROP_LINE_COUNT- See Also:
-
DEFAULT_MERGE_PTS_DIFF
public static final int DEFAULT_MERGE_PTS_DIFF- See Also:
-
DEFAULT_OUTPUT_MODE
-
convertResolution
private boolean convertResolution -
convertFPS
private boolean convertFPS -
delayPTS
private int delayPTS -
cliMode
private boolean cliMode -
fixShortFrames
private boolean fixShortFrames -
minTimePTS
private int minTimePTS -
applyFreeScale
private boolean applyFreeScale -
freeScaleFactorX
private double freeScaleFactorX -
freeScaleFactorY
private double freeScaleFactorY -
fpsSrc
private double fpsSrc -
fpsTrg
private double fpsTrg -
fpsSrcCertain
private boolean fpsSrcCertain -
outputResolution
-
languageIdx
private int languageIdx -
exportForced
private boolean exportForced -
cropOffsetY
private int cropOffsetY -
forceAll
-
swapCrCb
private boolean swapCrCb -
moveModeX
-
moveModeY
-
moveOffsetX
private int moveOffsetX -
moveOffsetY
private int moveOffsetY -
moveCaptions
private boolean moveCaptions -
cineBarFactor
private double cineBarFactorFactor to calculate height of one cinemascope bar from screen height -
currentStreamID
-
keepFps
private boolean keepFps -
RECENT_FILE_COUNT
private static final int RECENT_FILE_COUNT- See Also:
-
CONFIG_FILE
- See Also:
-
INSTANCE
-
configFilePath
-
recentFiles
-
luminanceThreshold
private int[] luminanceThreshold -
alphaThreshold
private int alphaThreshold -
props
-
-
Constructor Details
-
Configuration
private Configuration()
-
-
Method Details
-
load
public void load() -
readConfigFile
private void readConfigFile() -
loadConfig
private void loadConfig() -
storeConfig
public void storeConfig() -
loadRecentFiles
private void loadRecentFiles() -
getInstance
-
getConfigFilePath
-
isCliMode
public boolean isCliMode() -
setCliMode
public void setCliMode(boolean cliMode) -
isVerbose
public boolean isVerbose() -
setVerbose
public void setVerbose(boolean verbose) -
getWritePGCEditPalette
public boolean getWritePGCEditPalette()Write PGCEdit palette file on export. -
setWritePGCEditPalette
public void setWritePGCEditPalette(boolean writePGCEditPalette) -
getMergePTSdiff
public int getMergePTSdiff()Get maximum time difference for merging captions. -
setMergePTSdiff
public void setMergePTSdiff(int mergePTSdiff) -
getAlphaCrop
public int getAlphaCrop()Get alpha threshold for cropping. -
setAlphaCrop
public void setAlphaCrop(int alphaCrop) -
getFixZeroAlpha
public boolean getFixZeroAlpha()Fix completely invisible subtitles due to alpha=0 (SUB/IDX and SUP/IFO import only). -
setFixZeroAlpha
public void setFixZeroAlpha(boolean fixZeroAlpha) -
getScalingFilter
-
setScalingFilter
-
getPaletteMode
Get palette creation mode. -
setPaletteMode
-
getOutputMode
-
setOutputMode
-
getLoadPath
-
setLoadPath
-
getColorProfilePath
-
setColorProfilePath
-
getMainWindowSize
-
setMainWindowSize
-
getMainWindowLocation
-
setMainWindowLocation
-
getRecentFiles
-
addToRecentFiles
-
getConvertResolution
public boolean getConvertResolution() -
setConvertResolution
public void setConvertResolution(boolean convertResolution) -
loadConvertResolution
public boolean loadConvertResolution() -
storeConvertResolution
public void storeConvertResolution(boolean convertResolution) -
getConvertFPS
public boolean getConvertFPS()Get flag that tells whether or not to convert the frame rate. -
setConvertFPS
public void setConvertFPS(boolean convertFPS) -
loadConvertFPS
public boolean loadConvertFPS() -
storeConvertFPS
public void storeConvertFPS(boolean convertFPS) -
getDelayPTS
public int getDelayPTS()Get Delay to apply to target in 90kHz resolution. -
setDelayPTS
public void setDelayPTS(int delayPTS) -
loadDelayPTS
public int loadDelayPTS() -
storeDelayPTS
public void storeDelayPTS(int delayPTS) -
getFixShortFrames
public boolean getFixShortFrames()Set flag that tells whether to fix subpictures with a display time shorter than minTimePTS. -
setFixShortFrames
public void setFixShortFrames(boolean fixShortFrames) -
loadFixShortFrames
public boolean loadFixShortFrames() -
storeFixShortFrames
public void storeFixShortFrames(boolean fixShortFrames) -
getMinTimePTS
public int getMinTimePTS()Get minimum display time for subpictures in 90kHz resolution -
setMinTimePTS
public void setMinTimePTS(int minTimePTS) -
loadMinTimePTS
public int loadMinTimePTS() -
storeMinTimePTS
public void storeMinTimePTS(int minTimePTS) -
getApplyFreeScale
public boolean getApplyFreeScale() -
setApplyFreeScale
public void setApplyFreeScale(boolean applyFreeScale) -
loadApplyFreeScale
public boolean loadApplyFreeScale() -
storeApplyFreeScale
public void storeApplyFreeScale(boolean applyFreeScale) -
getFreeScaleFactorX
public double getFreeScaleFactorX() -
getFreeScaleFactorY
public double getFreeScaleFactorY() -
setFreeScaleFactor
public void setFreeScaleFactor(double x, double y) -
loadFreeScaleFactorX
public double loadFreeScaleFactorX() -
loadFreeScaleFactorY
public double loadFreeScaleFactorY() -
storeFreeScaleFactor
public void storeFreeScaleFactor(double x, double y) -
getFPSSrc
public double getFPSSrc() -
setFpsSrc
public void setFpsSrc(double fpsSrc) -
loadFpsSrc
public double loadFpsSrc() -
storeFPSSrc
public void storeFPSSrc(double fpsSrc) -
getFpsTrg
public double getFpsTrg() -
setFpsTrg
public void setFpsTrg(double fpsTrg) -
loadFpsTrg
public double loadFpsTrg() -
storeFpsTrg
public void storeFpsTrg(double fpsTrg) -
isFpsSrcCertain
public boolean isFpsSrcCertain() -
setFpsSrcCertain
public void setFpsSrcCertain(boolean fpsSrcCertain) -
getOutputResolution
-
setOutputResolution
-
loadOutputResolution
-
storeOutputResolution
-
getAlphaThreshold
public int getAlphaThreshold() -
setAlphaThreshold
public void setAlphaThreshold(int alphaThreshold) -
getLuminanceThreshold
public int[] getLuminanceThreshold()Array of luminance thresholds ( 0: med/high, 1: low/med ) -
setLuminanceThreshold
public void setLuminanceThreshold(int[] luminanceThreshold) -
getLanguageIdx
public int getLanguageIdx()Index of language to be used for SUB/IDX export (also used for XML export) -
setLanguageIdx
public void setLanguageIdx(int languageIdx) -
isExportForced
public boolean isExportForced()Flag that defines whether to export only subpictures marked as "forced" -
setExportForced
public void setExportForced(boolean exportForced) -
getCropOffsetY
public int getCropOffsetY() -
setCropOffsetY
public void setCropOffsetY(int cropOffsetY) -
getForceAll
-
loadForceAll
-
setForceAll
-
storeForceAll
-
isSwapCrCb
public boolean isSwapCrCb() -
setSwapCrCb
public void setSwapCrCb(boolean swapCrCb) -
setMoveModeY
-
getMoveModeY
-
setMoveModeX
-
getMoveModeX
-
setMoveOffsetY
public void setMoveOffsetY(int moveOffsetY) -
getMoveOffsetY
public int getMoveOffsetY() -
setMoveOffsetX
public void setMoveOffsetX(int moveOffsetX) -
getMoveOffsetX
public int getMoveOffsetX() -
getMoveCaptions
public boolean getMoveCaptions()Get: keep move settings after loading a new stream- Returns:
- true: keep settings, false: ignore settings
-
setMoveCaptions
public void setMoveCaptions(boolean moveCaptions) Set: keep move settings after loading a new stream- Parameters:
moveCaptions
- true: keep settings, false; ignore settings
-
getCineBarFactor
public double getCineBarFactor() -
setCineBarFactor
public void setCineBarFactor(double cineBarFactor) -
getCurrentStreamID
-
setCurrentStreamID
-
isKeepFps
public boolean isKeepFps() -
setKeepFps
public void setKeepFps(boolean keepFps)
-