Package org.mp4parser.boxes.apple
Class TimeCodeBox
- java.lang.Object
-
- org.mp4parser.support.AbstractBox
-
- org.mp4parser.boxes.apple.TimeCodeBox
-
- All Implemented Interfaces:
Box,SampleEntry,Container,ParsableBox
public class TimeCodeBox extends AbstractBox implements SampleEntry, Container
4cc = ""tmcd""
-
-
Field Summary
-
Fields inherited from class org.mp4parser.support.AbstractBox
content, type
-
-
Constructor Summary
Constructors Constructor Description TimeCodeBox()
-
Method Summary
Modifier and Type Method Description protected void_parseDetails(ByteBuffer content)Parse the box's fields and child boxes if any.List<Box>getBoxes()Gets all child boxes.<T extends Box>
List<T>getBoxes(Class<T> clazz)Gets all child boxes of the given type.<T extends Box>
List<T>getBoxes(Class<T> clazz, boolean recursive)Gets all child boxes of the given type.protected voidgetContent(ByteBuffer bb)Write the box's content into the givenByteBuffer.protected longgetContentSize()Get the box's content size without its header.intgetDataReferenceIndex()longgetFlags()intgetFrameDuration()intgetNumberOfFrames()intgetReserved1()intgetReserved2()byte[]getRest()intgetTimeScale()voidsetBoxes(List<? extends Box> boxes)Sets all boxes and removes all previous child boxes.voidsetDataReferenceIndex(int dataReferenceIndex)voidsetFlags(long flags)voidsetFrameDuration(int frameDuration)voidsetNumberOfFrames(int numberOfFrames)voidsetReserved1(int reserved1)voidsetReserved2(int reserved2)voidsetRest(byte[] rest)voidsetTimeScale(int timeScale)StringtoString()voidwriteContainer(WritableByteChannel bb)-
Methods inherited from class org.mp4parser.support.AbstractBox
getBox, getSize, getType, getUserType, isParsed, parse, parseDetails
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.mp4parser.ParsableBox
parse
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getContentSize
protected long getContentSize()
Description copied from class:AbstractBoxGet the box's content size without its header. This must be the exact number of bytes thatgetContent(ByteBuffer)writes.- Specified by:
getContentSizein classAbstractBox- Returns:
- Gets the box's content size in bytes
- See Also:
AbstractBox.getContent(java.nio.ByteBuffer)
-
getContent
protected void getContent(ByteBuffer bb)
Description copied from class:AbstractBoxWrite the box's content into the givenByteBuffer. This must include flags and version in case of a full box.byteBufferhas been initialized withgetSize()bytes.- Specified by:
getContentin classAbstractBox- Parameters:
bb- the sink for the box's content
-
_parseDetails
protected void _parseDetails(ByteBuffer content)
Description copied from class:AbstractBoxParse the box's fields and child boxes if any.- Specified by:
_parseDetailsin classAbstractBox- Parameters:
content- the box's raw content beginning after the 4-cc field.
-
getDataReferenceIndex
public int getDataReferenceIndex()
- Specified by:
getDataReferenceIndexin interfaceSampleEntry
-
setDataReferenceIndex
public void setDataReferenceIndex(int dataReferenceIndex)
- Specified by:
setDataReferenceIndexin interfaceSampleEntry
-
getTimeScale
public int getTimeScale()
-
setTimeScale
public void setTimeScale(int timeScale)
-
getFrameDuration
public int getFrameDuration()
-
setFrameDuration
public void setFrameDuration(int frameDuration)
-
getNumberOfFrames
public int getNumberOfFrames()
-
setNumberOfFrames
public void setNumberOfFrames(int numberOfFrames)
-
getReserved1
public int getReserved1()
-
setReserved1
public void setReserved1(int reserved1)
-
getReserved2
public int getReserved2()
-
setReserved2
public void setReserved2(int reserved2)
-
getFlags
public long getFlags()
-
setFlags
public void setFlags(long flags)
-
getRest
public byte[] getRest()
-
setRest
public void setRest(byte[] rest)
-
getBoxes
public List<Box> getBoxes()
Description copied from interface:ContainerGets all child boxes. May not returnnull.
-
setBoxes
public void setBoxes(List<? extends Box> boxes)
Description copied from interface:ContainerSets all boxes and removes all previous child boxes.
-
getBoxes
public <T extends Box> List<T> getBoxes(Class<T> clazz)
Description copied from interface:ContainerGets all child boxes of the given type. May not returnnull.
-
getBoxes
public <T extends Box> List<T> getBoxes(Class<T> clazz, boolean recursive)
Description copied from interface:ContainerGets all child boxes of the given type. May not returnnull.
-
writeContainer
public void writeContainer(WritableByteChannel bb) throws IOException
- Specified by:
writeContainerin interfaceContainer- Throws:
IOException
-
-