|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
deadbeef.SupTools.Core
public class Core
This class contains the core functionality of BDSup2Sub.
It's meant to be used from the command line as well as from the GUI.
Nested Class Summary | |
---|---|
static class |
Core.InputMode
Enumeration of input modes |
static class |
Core.MoveModeX
Enumeration of modes for moving of captions in X direction |
static class |
Core.MoveModeY
Enumeration of modes for moving of captions in Y direction |
static class |
Core.OutputMode
Enumeration of output modes |
static class |
Core.PaletteMode
Enumeration of palette modes |
static class |
Core.Resolution
Enumeration of supported resolutions |
static class |
Core.RunType
Enumeration of functionalities executed in the started thread |
static class |
Core.ScalingFilters
Enumeration of filters that can be applied for scaling |
static class |
Core.SetState
Enumeration for set/clear/keep states |
static class |
Core.State
Enumeration of run states (used for threaded reading/converting) |
static class |
Core.StreamID
Enumeration of input stream identifiers |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static double |
FPS_23_975
Frames per seconds for wrong 24P (23.975) |
static double |
FPS_24HZ
Frames per seconds for 24Hz (24.0) |
static double |
FPS_24P
Frames per seconds for 24p (23.976) |
static double |
FPS_NTSC
Frames per seconds for NTSC progressive (29.97) |
static double |
FPS_NTSC_I
Frames per seconds for NTSC interlaced (59.94) |
static double |
FPS_PAL
Frames per seconds for PAL progressive (25.0) |
static double |
FPS_PAL_I
Frames per seconds for PAL interlaced (50.0) |
static double |
maxScale
Maximum value for free scaling factor |
static double |
minScale
Minimum value for free scaling factor |
static Props |
props
Class used to load/store properties persistently |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
Core()
|
Method Summary | |
---|---|
static void |
addRecent(java.lang.String s)
Add a new entry to the list of recently loaded files |
static void |
cancel()
Force Core to cancel current operation. |
static void |
close()
Reset the core, close all files |
static void |
convertSup(int index,
int displayNum,
int displayMax)
Convert source subpicture image to target subpicture image. |
static void |
convertSup(int index,
int displayNum,
int displayMax,
boolean skipScaling)
Convert source subpicture image to target subpicture image. |
static void |
createSubThreaded(java.lang.String fname,
javax.swing.JFrame parent)
Write a VobSub or BD-SUP in a thread and display the progress dialog. |
static void |
exit()
Shut down the Core (write properties, close files etc.). |
static int |
getAlphaCrop()
Get alpha threshold for cropping. |
static int |
getAlphaThr()
Get alpha threshold. |
static boolean |
getApplyFreeScale()
Report whether free scaling is active or not. |
static boolean |
getApplyFreeScaleDefault()
get default value for applying of free scaling |
static java.lang.String |
getAuthorDate()
Get author and date info. |
static boolean |
getConvertFPS()
Get flag that tells whether or not to convert the frame rate. |
static boolean |
getConvertFPSdefault()
get default value for frame rate conversion |
static boolean |
getConvertResolution()
Get flag that tells whether or not to convert the resolution. |
static boolean |
getConvertResolutionDefault()
get default value for resolution conversion |
static int |
getCropOfsY()
Get Y coordinate cropping offset. |
static Palette |
getCurrentDVDPalette()
Get current DVD palette. |
static Core.StreamID |
getCurrentStreamID()
Get current input stream ID. |
static Palette |
getCurSrcDVDPalette()
Get modified imported palette if input is DVD format. |
static Palette |
getDefaultDVDPalette()
Get default DVD palette. |
static double |
getDefaultFPS(Core.Resolution r)
Get default frame rate for given resolution. |
static Palette |
getDefSrcDVDPalette()
Get imported palette if input is DVD format. |
static int |
getDelayPTS()
Get delay to add to time stamps. |
static int |
getDelayPTSdefault()
get default value for delay |
static int |
getErrors()
Get the number of errors. |
static boolean |
getExportForced()
Get flag that tells whether or not to export only forced subtitles. |
static boolean |
getFixShortFrames()
Set flag that tells whether to fix frames shorter than minTimePTS. |
static boolean |
getFixShortFramesDefault()
get default value for fixing short frame |
static boolean |
getFixZeroAlpha()
Get: fix completely invisibly subtitles due to alpha=0 (SUB/IDX and SUP/IFO import only). |
static Core.SetState |
getForceAll()
Request setting of forced flag for all captions |
static double |
getFPS(java.lang.String s)
Convert a string containing a frame rate to a double representation. |
static double |
getFPSSrc()
Get source frame rate. |
static boolean |
getFpsSrcCertain()
Get: source frame rate is certain |
static double |
getFpsSrcDefault()
get default value for source frame rate |
static double |
getFPSTrg()
Get target frame rate. |
static double |
getFpsTrgDefault()
get default value for target frame rate |
static int[] |
getFrameAlpha(int index)
Return frame alpha values of given subtitle. |
static int[] |
getFramePal(int index)
Return frame palette of given subtitle. |
static double |
getFreeScaleX()
Get free scaling factor. |
static double |
getFreeScaleXdefault()
get default value for free x scaling factor |
static double |
getFreeScaleY()
Get free scaling factor. |
static double |
getFreeScaleYdefault()
get default value for free y scaling factor |
static Core.InputMode |
getInputMode()
Get input mode. |
static boolean |
getKeepFps()
Get: use source fps for target fps if possible. |
static int |
getLanguageIdx()
Get language index for VobSub (and XML) export. |
static java.lang.String[][] |
getLanguages()
Get two dimensional array with languages where [i][0] is full name, [i][1] is two character short name. |
static int[] |
getLumThr()
Get luminance thresholds. |
static deadbeef.GUI.MainFrame |
getMainFrame()
Get reference to the main frame. |
static int |
getMergePTSdiff()
Get maximum time difference for merging captions. |
static int |
getMinTimePTS()
Get minimum frame duration in 90kHz resolution. |
static int |
getMinTimePTSdefault()
get default value for minimum display time |
static boolean |
getMoveCaptions()
Get: keep move settings after loading a new stream |
static Core.MoveModeX |
getMoveModeX()
Get: move mode in X direction |
static Core.MoveModeY |
getMoveModeY()
Get: move mode in Y direction |
static int |
getMoveOffsetX()
Get: Additional x offset to consider when moving |
static int |
getMoveOffsetY()
Get: Additional y offset to consider when moving |
static int |
getNumForcedFrames()
Get number of forced subtitles. |
static int |
getNumFrames()
Get number of subtitles. |
static int[] |
getOriginalFrameAlpha(int index)
Return original frame alpha values of given subtitle. |
static int[] |
getOriginalFramePal(int index)
Return original frame palette of given subtitle. |
static java.lang.String |
getOutputFormatName(Core.OutputMode m)
Get string representation of output mode. |
static Core.OutputMode |
getOutputMode()
Get output mode. |
static Core.Resolution |
getOutputResolution()
Get output resolution. |
static Core.PaletteMode |
getPaletteMode()
Get palette creation mode. |
static java.lang.String |
getPaletteModeName(Core.PaletteMode m)
Return name string for given palette creation mode. |
static java.lang.String |
getProgName()
Get program name (excluding version). |
static java.lang.String |
getProgVerName()
Get program name (including version). |
static java.util.ArrayList<java.lang.String> |
getRecentFiles()
Return list of recently loaded files |
static int[] |
getResolution(Core.Resolution r)
Get width and height for given resolution. |
static Core.Resolution |
getResolution(int w,
int h)
Find the most fitting resolution for the given width and height |
static Core.Resolution |
getResolutionDefault()
get default target resolution |
static java.lang.String |
getResolutionName(Core.Resolution r)
Get Idx string representation of resolution. |
static java.lang.String |
getResolutionNameXml(Core.Resolution r)
Get Xml string representation of resolution. |
static Core.ScalingFilters |
getScalingFilter()
Get current scaling filter. |
static java.lang.String |
getScalingFilterName(Core.ScalingFilters f)
Get name for scaling filter. |
static java.awt.image.BufferedImage |
getSrcImage()
Get source image as BufferedImage. |
static java.awt.image.BufferedImage |
getSrcImage(int idx)
Get source image as BufferedImage. |
static java.lang.String |
getSrcInfoStr(int index)
Create info string for source subtitle. |
static Core.State |
getStatus()
Get Core state. |
static Core.StreamID |
getStreamID(byte[] id)
Identifies a stream by examining the first two bytes. |
static SubPicture |
getSubPictureSrc(int index)
Get source subpicture. |
static SubPicture |
getSubPictureTrg(int index)
Get target subpicture. |
static boolean |
getSwapCrCb()
Get flag that defines whether to swap Cr/Cb components when loading a SUP. |
static boolean |
getTrgExcluded(int index)
Get exclude (from export) state of target. |
static int |
getTrgHeight(int index)
Get screen height of target. |
static java.awt.image.BufferedImage |
getTrgImage()
Get target image as BufferedImage. |
static java.awt.image.BufferedImage |
getTrgImagePatched(SubPicture pic)
Get target image as BufferedImage. |
static int |
getTrgImgHeight(int index)
Get subtitle height of target. |
static int |
getTrgImgWidth(int index)
Get subtitle width of target. |
static java.lang.String |
getTrgInfoStr(int index)
Create info string for target subtitle. |
static int |
getTrgOfsX(int index)
Get subtitle x offset of target. |
static int |
getTrgOfsY(int index)
Get subtitle y offset of target. |
static int |
getTrgWidth(int index)
Get screen width of target. |
static boolean |
getVerbatim()
Get verbatim console output mode. |
static int |
getWarnings()
Get the number of warnings. |
static boolean |
getWritePGCEditPal()
Get: write PGCEdit palette file on export. |
static void |
init(java.lang.Object c)
Initialize the Core - call this before calling readSub or other Core functionality. |
static boolean |
isCancelled()
Get cancel state. |
static boolean |
isReady()
Get Core ready state. |
static void |
loadedHook()
Hook to be called when the first file was loaded via the GUI |
static void |
moveAllThreaded(javax.swing.JFrame parent)
Move all subpictures into or outside given bounds in a thread and display the progress dialog. |
static void |
moveAllToBounds()
Move all subpictures into or outside given bounds. |
static void |
moveToBounds(SubPicture pic,
int idx,
double barFactor,
int offsetX,
int offsetY,
Core.MoveModeX mmx,
Core.MoveModeY mmy,
int cropOffsetY)
Move subpicture into or outside given bounds. |
static void |
print(java.lang.String s)
Print string to console or console window (only printed in verbatim mode). |
static void |
printErr(java.lang.String s)
Print error string to console or console window (always printed). |
static void |
printWarn(java.lang.String s)
Print warning string to console or console window (always printed). |
static void |
printX(java.lang.String s)
Print string to console or console window (always printed). |
static void |
readDVDSubstream(java.lang.String fname,
boolean isVobSub)
Read VobSub or SUP/IFO. |
static void |
readStreamThreaded(java.lang.String fname,
javax.swing.JFrame parent,
Core.StreamID sid)
Read a subtitle stream in a thread and display the progress dialog. |
static void |
readSup(java.lang.String fname)
Read BD-SUP or HD-DVD-SUP. |
static void |
readSupIfo(java.lang.String fname)
Read SUP/IFO. |
static void |
readVobSub(java.lang.String fname)
Read VobSub. |
static void |
readXml(java.lang.String fname)
Read Sony BDN XML file. |
static void |
reScanSubtitles(Core.Resolution resOld,
double fpsTrgOld,
int delayOld,
boolean convertFpsOld,
double fsXOld,
double fsYOld)
Same as scanSubtitles, but consider existing frame copies. |
static void |
resetErrors()
Reset the number of errors. |
static void |
resetWarnings()
Reset the number of warnings. |
static boolean |
restoreApplyFreeScale()
restore value for applying of free scaling |
static boolean |
restoreConvertFPS()
restore value for frame rate conversion |
static boolean |
restoreConvertResolution()
restore value for resolution conversion |
static int |
restoreDelayPTS()
restore value for delay |
static boolean |
restoreFixShortFrames()
restore value for fixing short frame |
static double |
restoreFpsSrc()
restore value for source frame rate |
static double |
restoreFpsTrg()
restore value for target frame rate |
static double |
restoreFreeScaleX()
restore value for free x scaling factor |
static double |
restoreFreeScaleY()
restore value for free y scaling factor |
static int |
restoreMinTimePTS()
restore value for minimum display time |
static Core.Resolution |
restoreResolution()
restore default target resolution |
void |
run()
Thread used for threaded import/export. |
static void |
scanSubtitles()
Create a copy of the loaded subpicture information frames. |
static void |
setAlphaCrop(int a)
Set alpha threshold for cropping. |
static void |
setAlphaThr(int at)
Set alpha threshold. |
static void |
setApplyFreeScale(boolean f)
Enable/disable free scaling |
static void |
setCineBarFactor(double f)
Set: factor of cinemascope bars (needed for moving after cropping). |
static void |
setConvertFPS(boolean b)
Set flag that tells whether or not to convert the frame rate. |
static void |
setConvertResolution(boolean b)
Set flag that tells whether or not to convert the resolution. |
static void |
setCropOfsY(int ofs)
Set Y coordinate cropping offset. |
static void |
setCurrentDVDPalette(Palette pal)
Set current DVD palette. |
static void |
setCurrentStreamID(Core.StreamID sid)
Set current input stream ID. |
static void |
setCurSrcDVDPalette(Palette pal)
Set modified imported palette. |
static void |
setDelayPTS(int delay)
Set delay to add to time stamps. |
static void |
setExportForced(boolean b)
Set flag that tells whether or not to export only forced subtitles. |
static void |
setFixShortFrames(boolean b)
Set flag that tells whether to fix frames shorter than minTimePTS. |
static void |
setFixZeroAlpha(boolean e)
Set: fix completely invisibly subtitles due to alpha=0 (SUB/IDX and SUP/IFO import only). |
static void |
setForceAll()
Apply the state of forceAll to all captions |
static void |
setForceAll(Core.SetState f)
Request setting of forced flag for all captions |
static void |
setFPSSrc(double src)
Set source frame rate. |
static void |
setFpsSrcCertain(boolean c)
Set: source frame rate is certain |
static void |
setFPSTrg(double trg)
Set target frame rate. |
static void |
setFreeScale(double x,
double y)
Set free scaling factor. |
static void |
setKeepFps(boolean e)
Set: use source fps for target fps if possible. |
static void |
setLanguageIdx(int idx)
Set language index for VobSub (and XML) export. |
static void |
setLumThr(int[] lt)
Set luminance thresholds. |
static void |
setMainFrame(deadbeef.GUI.MainFrame mf)
Set reference to the main frame. |
static void |
setMergePTSdiff(int d)
Set maximum time difference for merging captions. |
static void |
setMinTimePTS(int t)
Set minimum frame duration in 90kHz resolution. |
static void |
setMoveCaptions(boolean m)
Set: keep move settings after loading a new stream |
static void |
setMoveModeX(Core.MoveModeX m)
Set: move mode in X direction |
static void |
setMoveModeY(Core.MoveModeY m)
Set: move mode in Y direction |
static void |
setMoveOffsetX(int ofs)
Set: Additional x offset to consider when moving |
static void |
setMoveOffsetY(int ofs)
Set: Additional y offset to consider when moving |
static void |
setOutputMode(Core.OutputMode m)
Set output mode. |
static void |
setOutputResolution(Core.Resolution r)
Set output resolution. |
static void |
setPaletteMode(Core.PaletteMode m)
Set palette creation mode. |
static void |
setProgress(int p)
Set progress in progress bar. |
static void |
setProgressMax(int max)
Set internal maximum for progress bar. |
static void |
setReady(boolean r)
Set Core ready state. |
static void |
setScalingFilter(Core.ScalingFilters f)
Set filter to be used for scaling. |
static void |
setSwapCrCb(boolean b)
Set flag that defines whether to swap Cr/Cb components when loading a SUP. |
static void |
setVerbatim(boolean e)
Set verbatim console output mode. |
static void |
setWritePGCEditPal(boolean e)
Set: write PGCEdit palette file on export. |
static void |
storeApplyFreeScale(boolean f)
Store: Enable/disable free scaling |
static void |
storeConvertFPS(boolean b)
Store flag that tells whether or not to convert the frame rate. |
static void |
storeConvertResolution(boolean b)
Store flag that tells whether or not to convert the resolution. |
static void |
storeDelayPTS(int delay)
Store delay to add to time stamps. |
static void |
storeFixShortFrames(boolean b)
Store flag that tells whether to fix frames shorter than minTimePTS. |
static void |
storeFPSSrc(double src)
Store source frame rate. |
static void |
storeFPSTrg(double trg)
Store target frame rate. |
static void |
storeFreeScale(double x,
double y)
Store free scaling factor. |
static void |
storeMinTimePTS(int t)
Store minimum frame duration in 90kHz resolution. |
static void |
storeOutputResolution(Core.Resolution r)
Store output resolution. |
static void |
storeProps()
Write properties |
static long |
syncTimePTS(long t,
double fps)
Synchronizes a time stamp in 90kHz resolution to the given frame rate. |
static boolean |
updateTrgPic(int index)
Update width, height and offsets of target SubPicture. |
static boolean |
usesBT601()
Get: use of BT.601 color model instead of BT.709. |
static void |
writePGCEditPal(java.lang.String fname,
Palette p)
Create PGCEdit palette file from given Palette. |
static void |
writeSub(java.lang.String fname)
Create BD-SUP or VobSub or Xml. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final double FPS_24P
public static final double FPS_23_975
public static final double FPS_24HZ
public static final double FPS_PAL
public static final double FPS_NTSC
public static final double FPS_PAL_I
public static final double FPS_NTSC_I
public static final double minScale
public static final double maxScale
public static Props props
Constructor Detail |
---|
public Core()
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public static void init(java.lang.Object c)
c
- Main object - needed to determine name of jar and path of ini filepublic static void loadedHook()
public static void close()
public static void exit()
public static void storeProps()
public static void addRecent(java.lang.String s)
s
- public static java.util.ArrayList<java.lang.String> getRecentFiles()
public static Core.StreamID getStreamID(byte[] id)
id
- Byte array holding four bytes at minimum
public static long syncTimePTS(long t, double fps)
t
- Time stamp in 90kHz resolutionfps
- Frame rate
public static void readStreamThreaded(java.lang.String fname, javax.swing.JFrame parent, Core.StreamID sid) throws java.lang.Exception
fname
- File name of subtitle stream to readparent
- Parent frame (needed for progress dialog)sid
- stream identifier
java.lang.Exception
public static void createSubThreaded(java.lang.String fname, javax.swing.JFrame parent) throws java.lang.Exception
fname
- File name of subtitle stream to createparent
- Parent frame (needed for progress dialog)
java.lang.Exception
public static void readSup(java.lang.String fname) throws CoreException
fname
- File name
CoreException
public static void readXml(java.lang.String fname) throws CoreException
fname
- File name
CoreException
public static void readVobSub(java.lang.String fname) throws CoreException
fname
- File name
CoreException
public static void readSupIfo(java.lang.String fname) throws CoreException
fname
- File name
CoreException
public static void readDVDSubstream(java.lang.String fname, boolean isVobSub) throws CoreException
fname
- File nameisVobSub
- True if SUB/IDX, false if SUP/IFO
CoreException
public static boolean updateTrgPic(int index)
index
- Index of caption
public static void setForceAll()
public static void scanSubtitles()
public static void reScanSubtitles(Core.Resolution resOld, double fpsTrgOld, int delayOld, boolean convertFpsOld, double fsXOld, double fsYOld)
resOld
- Resolution of existing framesfpsTrgOld
- Target fps of existing framesdelayOld
- Delay of existing framesconvertFpsOld
- ConverFPS setting for existing framesfsXOld
- Old free scaling factor in X directionfsYOld
- Old free scaling factor in Y directionpublic static void convertSup(int index, int displayNum, int displayMax) throws CoreException
index
- Index of subtitle to convertdisplayNum
- Subtitle number to display (needed for forced subs)displayMax
- Maximum subtitle number to display (needed for forced subs)
CoreException
public static void convertSup(int index, int displayNum, int displayMax, boolean skipScaling) throws CoreException
index
- Index of subtitle to convertdisplayNum
- Subtitle number to display (needed for forced subs)displayMax
- Maximum subtitle number to display (needed for forced subs)skipScaling
- true: skip bitmap scaling and palette transformation (used for moving captions)
CoreException
public static void writeSub(java.lang.String fname) throws CoreException
fname
- File name of SUP/SUB/XML to create
CoreException
public static double getDefaultFPS(Core.Resolution r)
r
- Output resolution
public static double getFPS(java.lang.String s)
s
- String containing a frame
public static void moveAllThreaded(javax.swing.JFrame parent) throws java.lang.Exception
parent
- Parent frame (needed for progress dialog)
java.lang.Exception
public static void moveAllToBounds() throws CoreException
CoreException
public static void moveToBounds(SubPicture pic, int idx, double barFactor, int offsetX, int offsetY, Core.MoveModeX mmx, Core.MoveModeY mmy, int cropOffsetY)
pic
- SubPicture object containing coordinates and sizeidx
- Index (only used for display)barFactor
- Factor to calculate cinemascope bar height from screen heightoffsetX
- X offset to consider when movingoffsetY
- Y offset to consider when movingmmx
- Move mode in X directionmmy
- Move mode in Y directioncropOffsetY
- Number of lines to crop from bottom and toppublic static void print(java.lang.String s)
s
- String containing message to printpublic static void printX(java.lang.String s)
s
- String containing message to printpublic static void printErr(java.lang.String s)
s
- String containing error message to printpublic static void printWarn(java.lang.String s)
s
- String containing warning message to printpublic static void writePGCEditPal(java.lang.String fname, Palette p) throws CoreException
fname
- File namep
- Palette
CoreException
public static int[] getLumThr()
public static void setLumThr(int[] lt)
lt
- Array of luminance thresholds ( 0: med/high, 1: low/med )public static int getAlphaThr()
public static void setAlphaThr(int at)
at
- Alpha thresholdpublic static boolean isReady()
public static void setReady(boolean r)
r
- true if the Core is readypublic static Core.Resolution getOutputResolution()
public static void setOutputResolution(Core.Resolution r)
r
- output resolutionpublic static void storeOutputResolution(Core.Resolution r)
r
- output resolutionpublic static boolean getConvertFPSdefault()
public static boolean getConvertResolutionDefault()
public static Core.Resolution getResolutionDefault()
public static double getFpsSrcDefault()
public static double getFpsTrgDefault()
public static int getDelayPTSdefault()
public static boolean getFixShortFramesDefault()
public static int getMinTimePTSdefault()
public static boolean getApplyFreeScaleDefault()
public static double getFreeScaleXdefault()
public static double getFreeScaleYdefault()
public static boolean restoreConvertFPS()
public static boolean restoreConvertResolution()
public static Core.Resolution restoreResolution()
public static double restoreFpsSrc()
public static double restoreFpsTrg()
public static int restoreDelayPTS()
public static boolean restoreFixShortFrames()
public static int restoreMinTimePTS()
public static boolean restoreApplyFreeScale()
public static double restoreFreeScaleX()
public static double restoreFreeScaleY()
public static Core.Resolution getResolution(int w, int h)
w
- screen widthh
- screen height
public static void cancel()
public static boolean isCancelled()
public static Core.State getStatus()
public static boolean getConvertFPS()
public static void setConvertFPS(boolean b)
b
- True: convert frame ratepublic static void storeConvertFPS(boolean b)
b
- True: convert frame ratepublic static boolean getConvertResolution()
public static void setConvertResolution(boolean b)
b
- True: convert resolutionpublic static void storeConvertResolution(boolean b)
b
- True: convert resolutionpublic static boolean getExportForced()
public static void setExportForced(boolean b)
b
- True: export only forced subtitlespublic static Core.SetState getForceAll()
public static void setForceAll(Core.SetState f)
f
- state to setpublic static double getFPSSrc()
public static void setFPSSrc(double src)
src
- Source frame ratepublic static void storeFPSSrc(double src)
src
- Source frame ratepublic static double getFPSTrg()
public static void setFPSTrg(double trg)
trg
- Target frame ratepublic static void storeFPSTrg(double trg)
trg
- Target frame ratepublic static int getDelayPTS()
public static void setDelayPTS(int delay)
delay
- Delay in 90kHz resolutionpublic static void storeDelayPTS(int delay)
delay
- Delay in 90kHz resolutionpublic static deadbeef.GUI.MainFrame getMainFrame()
public static void setMainFrame(deadbeef.GUI.MainFrame mf)
mf
- Reference to the main framepublic static int getErrors()
public static void resetErrors()
public static int getWarnings()
public static void resetWarnings()
public static void setProgress(int p)
p
- Subtitle index processedpublic static java.lang.String getOutputFormatName(Core.OutputMode m)
m
- Output mode
public static Core.OutputMode getOutputMode()
public static void setOutputMode(Core.OutputMode m)
m
- Output modepublic static Core.InputMode getInputMode()
public static java.awt.image.BufferedImage getSrcImage()
public static java.awt.image.BufferedImage getSrcImage(int idx) throws CoreException
idx
- Index of subtitle
CoreException
public static java.awt.image.BufferedImage getTrgImage()
public static java.awt.image.BufferedImage getTrgImagePatched(SubPicture pic)
pic
- SubPicture to use for applying erase patches
public static int getTrgWidth(int index)
index
- Subtitle index
public static int getTrgHeight(int index)
index
- Subtitle index
public static int getTrgImgWidth(int index)
index
- Subtitle index
public static int getTrgImgHeight(int index)
index
- Subtitle index
public static boolean getTrgExcluded(int index)
index
- Subtitle index
public static int getTrgOfsX(int index)
index
- Subtitle index
public static int getTrgOfsY(int index)
index
- Subtitle index
public static int getNumFrames()
public static int getNumForcedFrames()
public static java.lang.String getTrgInfoStr(int index)
index
- Index of subtitle
public static java.lang.String getSrcInfoStr(int index)
index
- Index of subtitle
public static int[] getResolution(Core.Resolution r)
r
- Resolution
public static java.lang.String getResolutionName(Core.Resolution r)
r
- Resolution
public static java.lang.String getResolutionNameXml(Core.Resolution r)
r
- Resolution
public static Palette getCurrentDVDPalette()
public static void setCurrentDVDPalette(Palette pal)
pal
- DVD palettepublic static Palette getDefaultDVDPalette()
public static int getLanguageIdx()
public static void setLanguageIdx(int idx)
idx
- Language index for VobSub (and XML) exportpublic static boolean getFixShortFrames()
public static void setFixShortFrames(boolean b)
b
- True: fix short framespublic static void storeFixShortFrames(boolean b)
b
- True: fix short framespublic static int getMinTimePTS()
public static void setMinTimePTS(int t)
t
- Minimum frame duration in 90kHz resolutionpublic static void storeMinTimePTS(int t)
t
- Minimum frame duration in 90kHz resolutionpublic static SubPicture getSubPictureTrg(int index)
index
- Index of subpicture
public static SubPicture getSubPictureSrc(int index)
index
- Index of subpicture
public static boolean getSwapCrCb()
public static void setSwapCrCb(boolean b)
b
- True: swap cr/cbpublic static java.lang.String getProgName()
public static java.lang.String getProgVerName()
public static java.lang.String getAuthorDate()
public static java.lang.String[][] getLanguages()
public static void setCropOfsY(int ofs)
ofs
- Cropping Offset (number of lines to crop symmetrically from bottom and top)public static int getCropOfsY()
public static boolean usesBT601()
public static Core.PaletteMode getPaletteMode()
public static void setPaletteMode(Core.PaletteMode m)
m
- Palette creation modepublic static java.lang.String getPaletteModeName(Core.PaletteMode m)
m
- Palette creation mode
public static boolean getVerbatim()
public static void setVerbatim(boolean e)
e
- True: verbatim console output modepublic static void setProgressMax(int max)
max
- Internal maximum for progress bar (e.g. number of subtitles)public static boolean getKeepFps()
public static void setKeepFps(boolean e)
e
- True if source fps should be used for targetpublic static boolean getFpsSrcCertain()
public static void setFpsSrcCertain(boolean c)
c
- true if source frame rate is certainpublic static Core.ScalingFilters getScalingFilter()
public static void setScalingFilter(Core.ScalingFilters f)
f
- Scaling Filterpublic static java.lang.String getScalingFilterName(Core.ScalingFilters f)
f
- Scaling filter
public static int getMergePTSdiff()
public static void setMergePTSdiff(int d)
d
- Maximum time difference for merging captionspublic static int getAlphaCrop()
public static void setAlphaCrop(int a)
a
- Alpha threshold for croppingpublic static boolean getApplyFreeScale()
public static void setApplyFreeScale(boolean f)
f
- true: free scaling is appliedpublic static void storeApplyFreeScale(boolean f)
f
- true: free scaling is appliedpublic static double getFreeScaleX()
public static double getFreeScaleY()
public static void setFreeScale(double x, double y)
x
- Free X scaling factor (limited to 0.5 .. 2.0)y
- Free Y scaling factor (limited to 0.5 .. 2.0)public static void storeFreeScale(double x, double y)
x
- Free X scaling factor (limited to 0.5 .. 2.0)y
- Free Y scaling factor (limited to 0.5 .. 2.0)public static void setMoveModeY(Core.MoveModeY m)
m
- Move modepublic static Core.MoveModeY getMoveModeY()
public static void setMoveModeX(Core.MoveModeX m)
m
- Move modepublic static Core.MoveModeX getMoveModeX()
public static void setCineBarFactor(double f)
f
- Factor of cinemascope barspublic static void setMoveOffsetY(int ofs)
ofs
- Y offsetpublic static int getMoveOffsetY()
public static void setMoveOffsetX(int ofs)
ofs
- Y offsetpublic static int getMoveOffsetX()
public static boolean getMoveCaptions()
public static void setMoveCaptions(boolean m)
m
- true: keep settings, false; ignore settingspublic static Core.StreamID getCurrentStreamID()
public static void setCurrentStreamID(Core.StreamID sid)
sid
- Stream IDpublic static boolean getWritePGCEditPal()
public static void setWritePGCEditPal(boolean e)
e
- True: writepublic static boolean getFixZeroAlpha()
public static void setFixZeroAlpha(boolean e)
e
- True: verbatim text modepublic static Palette getDefSrcDVDPalette()
public static Palette getCurSrcDVDPalette()
public static void setCurSrcDVDPalette(Palette pal)
pal
- Modified imported palettepublic static int[] getFramePal(int index)
index
- Index of subtitle
public static int[] getFrameAlpha(int index)
index
- Index of subtitle
public static int[] getOriginalFramePal(int index)
index
- Index of subtitle
public static int[] getOriginalFrameAlpha(int index)
index
- Index of subtitle
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |