Package org.mp4parser.boxes.sampleentry
Class TextSampleEntry
- java.lang.Object
-
- org.mp4parser.BasicContainer
-
- org.mp4parser.support.AbstractContainerBox
-
- org.mp4parser.boxes.sampleentry.AbstractSampleEntry
-
- org.mp4parser.boxes.sampleentry.TextSampleEntry
-
- All Implemented Interfaces:
Box,SampleEntry,Container,ParsableBox
public class TextSampleEntry extends AbstractSampleEntry
4cc = ""tx3g""
Entry type for timed text samples defined in the timed text specification (ISO/IEC 14496-17).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTextSampleEntry.BoxRecordstatic classTextSampleEntry.StyleRecord
-
Field Summary
Fields Modifier and Type Field Description static StringTYPE_ENCRYPTEDstatic StringTYPE1-
Fields inherited from class org.mp4parser.boxes.sampleentry.AbstractSampleEntry
dataReferenceIndex
-
Fields inherited from class org.mp4parser.support.AbstractContainerBox
largeBox, type
-
-
Constructor Summary
Constructors Constructor Description TextSampleEntry()TextSampleEntry(String type)
-
Method Summary
Modifier and Type Method Description int[]getBackgroundColorRgba()voidgetBox(WritableByteChannel writableByteChannel)Writes the complete box - size | 4-cc | content - to the givenwritableByteChannel.TextSampleEntry.BoxRecordgetBoxRecord()intgetHorizontalJustification()longgetSize()TextSampleEntry.StyleRecordgetStyleRecord()intgetVerticalJustification()booleanisContinuousKaraoke()booleanisFillTextRegion()booleanisScrollDirection()booleanisScrollIn()booleanisScrollOut()booleanisWriteTextVertically()voidparse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser)Parses the box excluding the already parsed header (size, 4cc, [long-size], [user-type]).voidsetBackgroundColorRgba(int[] backgroundColorRgba)voidsetBoxRecord(TextSampleEntry.BoxRecord boxRecord)voidsetContinuousKaraoke(boolean continuousKaraoke)voidsetFillTextRegion(boolean fillTextRegion)voidsetHorizontalJustification(int horizontalJustification)voidsetScrollDirection(boolean scrollOutIn)voidsetScrollIn(boolean scrollIn)voidsetScrollOut(boolean scrollOutIn)voidsetStyleRecord(TextSampleEntry.StyleRecord styleRecord)voidsetType(String type)voidsetVerticalJustification(int verticalJustification)voidsetWriteTextVertically(boolean writeTextVertically)StringtoString()-
Methods inherited from class org.mp4parser.boxes.sampleentry.AbstractSampleEntry
getDataReferenceIndex, setDataReferenceIndex
-
Methods inherited from class org.mp4parser.support.AbstractContainerBox
getHeader, getType, setParent
-
Methods inherited from class org.mp4parser.BasicContainer
addBox, getBoxes, getBoxes, getBoxes, getContainerSize, initContainer, setBoxes, writeContainer
-
-
-
-
Field Detail
-
TYPE1
public static final String TYPE1
- See Also:
- Constant Field Values
-
TYPE_ENCRYPTED
public static final String TYPE_ENCRYPTED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TextSampleEntry
public TextSampleEntry()
-
TextSampleEntry
public TextSampleEntry(String type)
-
-
Method Detail
-
setType
public void setType(String type)
-
parse
public void parse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException
Description copied from interface:ParsableBoxParses the box excluding the already parsed header (size, 4cc, [long-size], [user-type]). The remaining size of the box is thecontentSize,contentSizenumber of bytes should be read from the box source (readableByteChannel). If you need theheaderbuffer at a later stage you have to create a copy.- Specified by:
parsein interfaceParsableBox- Specified by:
parsein classAbstractSampleEntry- Parameters:
dataSource- the source for this boxheader- the box' already parsed header (create copy if you need it later as it will be overwritten)contentSize- remaining bytes of this boxboxParser- use it to parse sub-boxes.- Throws:
IOException- in case of an error during a read operation
-
getBox
public void getBox(WritableByteChannel writableByteChannel) throws IOException
Description copied from interface:BoxWrites the complete box - size | 4-cc | content - to the givenwritableByteChannel.- Specified by:
getBoxin interfaceBox- Specified by:
getBoxin classAbstractSampleEntry- Parameters:
writableByteChannel- the box's sink- Throws:
IOException- in case of problems with theChannel
-
toString
public String toString()
- Overrides:
toStringin classBasicContainer
-
getBoxRecord
public TextSampleEntry.BoxRecord getBoxRecord()
-
setBoxRecord
public void setBoxRecord(TextSampleEntry.BoxRecord boxRecord)
-
getStyleRecord
public TextSampleEntry.StyleRecord getStyleRecord()
-
setStyleRecord
public void setStyleRecord(TextSampleEntry.StyleRecord styleRecord)
-
isScrollIn
public boolean isScrollIn()
-
setScrollIn
public void setScrollIn(boolean scrollIn)
-
isScrollOut
public boolean isScrollOut()
-
setScrollOut
public void setScrollOut(boolean scrollOutIn)
-
isScrollDirection
public boolean isScrollDirection()
-
setScrollDirection
public void setScrollDirection(boolean scrollOutIn)
-
isContinuousKaraoke
public boolean isContinuousKaraoke()
-
setContinuousKaraoke
public void setContinuousKaraoke(boolean continuousKaraoke)
-
isWriteTextVertically
public boolean isWriteTextVertically()
-
setWriteTextVertically
public void setWriteTextVertically(boolean writeTextVertically)
-
isFillTextRegion
public boolean isFillTextRegion()
-
setFillTextRegion
public void setFillTextRegion(boolean fillTextRegion)
-
getHorizontalJustification
public int getHorizontalJustification()
-
setHorizontalJustification
public void setHorizontalJustification(int horizontalJustification)
-
getVerticalJustification
public int getVerticalJustification()
-
setVerticalJustification
public void setVerticalJustification(int verticalJustification)
-
getBackgroundColorRgba
public int[] getBackgroundColorRgba()
-
setBackgroundColorRgba
public void setBackgroundColorRgba(int[] backgroundColorRgba)
-
getSize
public long getSize()
- Specified by:
getSizein interfaceBox- Overrides:
getSizein classAbstractContainerBox
-
-