Package bdsup2sub.supstream.bd
Class SupBDParser
java.lang.Object
bdsup2sub.supstream.bd.SupBDParser
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FileBuffer
private static final Configuration
private int
private static final Logger
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private List<SubPictureBD>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private int
private PGSCompositionState
int
private boolean
Retrieve palette (only) update flag from PCS segmentprivate void
parse()
private boolean
parseODS
(SupBDParser.PCSSegment pcsSegment, SubPictureBD subPictureBD, StringBuffer message) private void
parsePCS
(SupBDParser.PCSSegment segment, SubPictureBD subPictureBD, StringBuffer message) parse an PCS packet which contains width/height infoprivate int
parsePDS
(SupBDParser.PCSSegment pcsSegment, SubPictureBD subPictureBD, StringBuffer message) private void
parseWDS
(SupBDParser.PCSSegment pcsSegment, SubPictureBD subPictureBD) private SupBDParser.PCSSegment
readPCSSegment
(int offset) private void
removeLastFrameIfInvalid
(int odsCounter, int pdsCounter)
-
Field Details
-
configuration
-
logger
-
PGSSUP_FILE_MAGIC
private static final int PGSSUP_FILE_MAGIC- See Also:
-
PGSSUP_PALETTE_SEGMENT
private static final int PGSSUP_PALETTE_SEGMENT- See Also:
-
PGSSUP_PICTURE_SEGMENT
private static final int PGSSUP_PICTURE_SEGMENT- See Also:
-
PGSSUP_PRESENTATION_SEGMENT
private static final int PGSSUP_PRESENTATION_SEGMENT- See Also:
-
PGSSUP_WINDOW_SEGMENT
private static final int PGSSUP_WINDOW_SEGMENT- See Also:
-
PGSSUP_DISPLAY_SEGMENT
private static final int PGSSUP_DISPLAY_SEGMENT- See Also:
-
buffer
-
subPictures
-
forcedFrameCount
private int forcedFrameCount
-
-
Constructor Details
-
SupBDParser
- Throws:
CoreException
-
-
Method Details
-
parse
- Throws:
CoreException
-
removeLastFrameIfInvalid
private void removeLastFrameIfInvalid(int odsCounter, int pdsCounter) -
countForcedFrames
private void countForcedFrames() -
readPCSSegment
- Throws:
FileBufferException
CoreException
-
getCompositionNumber
- Throws:
FileBufferException
-
getCompositionState
private PGSCompositionState getCompositionState(SupBDParser.PCSSegment segment) throws FileBufferException - Throws:
FileBufferException
-
getPaletteUpdateFlag
Retrieve palette (only) update flag from PCS segment- Returns:
- true: this is only a palette update - ignore ODS
- Throws:
FileBufferException
-
parsePCS
private void parsePCS(SupBDParser.PCSSegment segment, SubPictureBD subPictureBD, StringBuffer message) throws FileBufferException parse an PCS packet which contains width/height info- Parameters:
segment
- object containing info about the current segmentsubPictureBD
- SubPicture object containing info about the current captionmessage
-- Throws:
FileBufferException
-
parseWDS
private void parseWDS(SupBDParser.PCSSegment pcsSegment, SubPictureBD subPictureBD) throws FileBufferException - Throws:
FileBufferException
-
parseODS
private boolean parseODS(SupBDParser.PCSSegment pcsSegment, SubPictureBD subPictureBD, StringBuffer message) throws FileBufferException - Throws:
FileBufferException
-
parsePDS
private int parsePDS(SupBDParser.PCSSegment pcsSegment, SubPictureBD subPictureBD, StringBuffer message) throws FileBufferException - Throws:
FileBufferException
-
getBuffer
-
getSubPictures
-
getForcedFrameCount
public int getForcedFrameCount()
-