Class WebVTTSampleEntry
- java.lang.Object
-
- org.mp4parser.BasicContainer
-
- org.mp4parser.support.AbstractContainerBox
-
- org.mp4parser.boxes.sampleentry.AbstractSampleEntry
-
- org.mp4parser.boxes.iso14496.part30.WebVTTSampleEntry
-
- All Implemented Interfaces:
Box,SampleEntry,Container,ParsableBox
public class WebVTTSampleEntry extends AbstractSampleEntry
Sample Entry for WebVTT subtitles.class WVTTSampleEntry() extends PlainTextSampleEntry (‘wvtt’){ WebVTTConfigurationBox config; WebVTTSourceLabelBox label; // recommended MPEG4BitRateBox (); // optional }
-
-
Field Summary
-
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 WebVTTSampleEntry()
-
Method Summary
Modifier and Type Method Description voidgetBox(WritableByteChannel writableByteChannel)Writes the complete box - size | 4-cc | content - to the givenwritableByteChannel.WebVTTConfigurationBoxgetConfig()WebVTTSourceLabelBoxgetSourceLabel()voidparse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser)Parses the box excluding the already parsed header (size, 4cc, [long-size], [user-type]).-
Methods inherited from class org.mp4parser.boxes.sampleentry.AbstractSampleEntry
getDataReferenceIndex, setDataReferenceIndex
-
Methods inherited from class org.mp4parser.support.AbstractContainerBox
getHeader, getSize, getType, setParent
-
Methods inherited from class org.mp4parser.BasicContainer
addBox, getBoxes, getBoxes, getBoxes, getContainerSize, initContainer, setBoxes, toString, writeContainer
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
-
getConfig
public WebVTTConfigurationBox getConfig()
-
getSourceLabel
public WebVTTSourceLabelBox getSourceLabel()
-
-