Class Configuration

java.lang.Object
bdsup2sub.core.Configuration

public final class Configuration extends Object
  • Field Details

    • OK_BACKGROUND

      public static final Color OK_BACKGROUND
    • WARN_BACKGROUND

      public static final Color WARN_BACKGROUND
    • ERROR_BACKGROUND

      public static final Color 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

      public static final Resolution DEFAULT_TARGET_RESOLUTION
    • DEFAULT_FORCED_FLAG_STATE

      public static final ForcedFlagState 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

      public static final OutputMode 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

      private Resolution outputResolution
    • languageIdx

      private int languageIdx
    • exportForced

      private boolean exportForced
    • cropOffsetY

      private int cropOffsetY
    • forceAll

      private ForcedFlagState forceAll
    • swapCrCb

      private boolean swapCrCb
    • moveModeX

      private CaptionMoveModeX moveModeX
    • moveModeY

      private CaptionMoveModeY moveModeY
    • moveOffsetX

      private int moveOffsetX
    • moveOffsetY

      private int moveOffsetY
    • moveCaptions

      private boolean moveCaptions
    • cineBarFactor

      private double cineBarFactor
      Factor to calculate height of one cinemascope bar from screen height
    • currentStreamID

      private StreamID currentStreamID
    • keepFps

      private boolean keepFps
    • RECENT_FILE_COUNT

      private static final int RECENT_FILE_COUNT
      See Also:
    • CONFIG_FILE

      private static final String CONFIG_FILE
      See Also:
    • INSTANCE

      private static final Configuration INSTANCE
    • configFilePath

      private final String configFilePath
    • recentFiles

      private List<String> recentFiles
    • luminanceThreshold

      private int[] luminanceThreshold
    • alphaThreshold

      private int alphaThreshold
    • props

      private Props 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

      public static Configuration getInstance()
    • getConfigFilePath

      public String 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

      public ScalingFilter getScalingFilter()
    • setScalingFilter

      public void setScalingFilter(ScalingFilter filter)
    • getPaletteMode

      public PaletteMode getPaletteMode()
      Get palette creation mode.
    • setPaletteMode

      public void setPaletteMode(PaletteMode paletteMode)
    • getOutputMode

      public OutputMode getOutputMode()
    • setOutputMode

      public void setOutputMode(OutputMode outputMode)
    • getLoadPath

      public String getLoadPath()
    • setLoadPath

      public void setLoadPath(String loadPath)
    • getColorProfilePath

      public String getColorProfilePath()
    • setColorProfilePath

      public void setColorProfilePath(String colorProfilePath)
    • getMainWindowSize

      public Dimension getMainWindowSize()
    • setMainWindowSize

      public void setMainWindowSize(Dimension dimension)
    • getMainWindowLocation

      public Point getMainWindowLocation()
    • setMainWindowLocation

      public void setMainWindowLocation(Point location)
    • getRecentFiles

      public List<String> getRecentFiles()
    • addToRecentFiles

      public void addToRecentFiles(String filename)
    • 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

      public Resolution getOutputResolution()
    • setOutputResolution

      public void setOutputResolution(Resolution outputResolution)
    • loadOutputResolution

      public Resolution loadOutputResolution()
    • storeOutputResolution

      public void storeOutputResolution(Resolution outputResolution)
    • 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

      public ForcedFlagState getForceAll()
    • loadForceAll

      public ForcedFlagState loadForceAll()
    • setForceAll

      public void setForceAll(ForcedFlagState forceAll)
    • storeForceAll

      public void storeForceAll(ForcedFlagState forceAll)
    • isSwapCrCb

      public boolean isSwapCrCb()
    • setSwapCrCb

      public void setSwapCrCb(boolean swapCrCb)
    • setMoveModeY

      public void setMoveModeY(CaptionMoveModeY moveModeY)
    • getMoveModeY

      public CaptionMoveModeY getMoveModeY()
    • setMoveModeX

      public void setMoveModeX(CaptionMoveModeX moveModeX)
    • getMoveModeX

      public CaptionMoveModeX 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

      public StreamID getCurrentStreamID()
    • setCurrentStreamID

      public void setCurrentStreamID(StreamID currentStreamID)
    • isKeepFps

      public boolean isKeepFps()
    • setKeepFps

      public void setKeepFps(boolean keepFps)