Package org.mp4parser.boxes.apple
Class QuicktimeTextSampleEntry
java.lang.Object
org.mp4parser.BasicContainer
org.mp4parser.support.AbstractContainerBox
org.mp4parser.boxes.sampleentry.AbstractSampleEntry
org.mp4parser.boxes.apple.QuicktimeTextSampleEntry
- All Implemented Interfaces:
Box,SampleEntry,Container,ParsableBox
4cc = ""text""
Entry type for timed text samples defined in the timed text specification (ISO/IEC 14496-17).-
Field Summary
FieldsFields inherited from class org.mp4parser.support.AbstractContainerBox
largeBox, type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAddboxto the container and sets the parent correctly.intintintvoidgetBox(WritableByteChannel writableByteChannel) Writes the complete box - size | 4-cc | content - to the givenwritableByteChannel.longintshortshortintintintlongbyteshortlonggetSize()intvoidparse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) Parses the box excluding the already parsed header (size, 4cc, [long-size], [user-type]).voidsetBackgroundB(int backgroundB) voidsetBackgroundG(int backgroundG) voidsetBackgroundR(int backgroundR) voidSets all boxes and removes all previous child boxes.voidsetDefaultTextBox(long defaultTextBox) voidsetDisplayFlags(int displayFlags) voidsetFontFace(short fontFace) voidsetFontName(String fontName) voidsetFontNumber(short fontNumber) voidsetForegroundB(int foregroundB) voidsetForegroundG(int foregroundG) voidsetForegroundR(int foregroundR) voidsetReserved1(long reserved1) voidsetReserved2(byte reserved2) voidsetReserved3(short reserved3) voidsetTextJustification(int textJustification) Methods inherited from class org.mp4parser.boxes.sampleentry.AbstractSampleEntry
getDataReferenceIndex, setDataReferenceIndexMethods inherited from class org.mp4parser.support.AbstractContainerBox
getHeader, getType, setParentMethods inherited from class org.mp4parser.BasicContainer
getBoxes, getBoxes, getBoxes, getContainerSize, initContainer, toString, writeContainerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.mp4parser.Container
getBoxes, getBoxes, getBoxes, writeContainer
-
Field Details
-
TYPE
- See Also:
-
-
Constructor Details
-
QuicktimeTextSampleEntry
public QuicktimeTextSampleEntry()
-
-
Method Details
-
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
-
setBoxes
Description copied from interface:ContainerSets all boxes and removes all previous child boxes.- Specified by:
setBoxesin interfaceContainer- Overrides:
setBoxesin classBasicContainer- Parameters:
boxes- the new list of children
-
addBox
Description copied from class:BasicContainerAddboxto the container and sets the parent correctly. Ifboxisnullnochange will be performed and no error thrown.- Overrides:
addBoxin classBasicContainer- Parameters:
box- will be added to the container
-
getBox
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
-
getSize
public long getSize()- Specified by:
getSizein interfaceBox- Overrides:
getSizein classAbstractContainerBox
-
getDisplayFlags
public int getDisplayFlags() -
setDisplayFlags
public void setDisplayFlags(int displayFlags) -
getTextJustification
public int getTextJustification() -
setTextJustification
public void setTextJustification(int textJustification) -
getBackgroundR
public int getBackgroundR() -
setBackgroundR
public void setBackgroundR(int backgroundR) -
getBackgroundG
public int getBackgroundG() -
setBackgroundG
public void setBackgroundG(int backgroundG) -
getBackgroundB
public int getBackgroundB() -
setBackgroundB
public void setBackgroundB(int backgroundB) -
getDefaultTextBox
public long getDefaultTextBox() -
setDefaultTextBox
public void setDefaultTextBox(long defaultTextBox) -
getReserved1
public long getReserved1() -
setReserved1
public void setReserved1(long reserved1) -
getFontNumber
public short getFontNumber() -
setFontNumber
public void setFontNumber(short fontNumber) -
getFontFace
public short getFontFace() -
setFontFace
public void setFontFace(short fontFace) -
getReserved2
public byte getReserved2() -
setReserved2
public void setReserved2(byte reserved2) -
getReserved3
public short getReserved3() -
setReserved3
public void setReserved3(short reserved3) -
getForegroundR
public int getForegroundR() -
setForegroundR
public void setForegroundR(int foregroundR) -
getForegroundG
public int getForegroundG() -
setForegroundG
public void setForegroundG(int foregroundG) -
getForegroundB
public int getForegroundB() -
setForegroundB
public void setForegroundB(int foregroundB) -
getFontName
-
setFontName
-