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 void
getContent(ByteBuffer bb)
Write the box's content into the givenByteBuffer
.protected long
getContentSize()
Get the box's content size without its header.int
getDataReferenceIndex()
long
getFlags()
int
getFrameDuration()
int
getNumberOfFrames()
int
getReserved1()
int
getReserved2()
byte[]
getRest()
int
getTimeScale()
void
setBoxes(List<? extends Box> boxes)
Sets all boxes and removes all previous child boxes.void
setDataReferenceIndex(int dataReferenceIndex)
void
setFlags(long flags)
void
setFrameDuration(int frameDuration)
void
setNumberOfFrames(int numberOfFrames)
void
setReserved1(int reserved1)
void
setReserved2(int reserved2)
void
setRest(byte[] rest)
void
setTimeScale(int timeScale)
String
toString()
void
writeContainer(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:AbstractBox
Get the box's content size without its header. This must be the exact number of bytes thatgetContent(ByteBuffer)
writes.- Specified by:
getContentSize
in 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:AbstractBox
Write the box's content into the givenByteBuffer
. This must include flags and version in case of a full box.byteBuffer
has been initialized withgetSize()
bytes.- Specified by:
getContent
in classAbstractBox
- Parameters:
bb
- the sink for the box's content
-
_parseDetails
protected void _parseDetails(ByteBuffer content)
Description copied from class:AbstractBox
Parse the box's fields and child boxes if any.- Specified by:
_parseDetails
in classAbstractBox
- Parameters:
content
- the box's raw content beginning after the 4-cc field.
-
getDataReferenceIndex
public int getDataReferenceIndex()
- Specified by:
getDataReferenceIndex
in interfaceSampleEntry
-
setDataReferenceIndex
public void setDataReferenceIndex(int dataReferenceIndex)
- Specified by:
setDataReferenceIndex
in 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:Container
Gets all child boxes. May not returnnull
.
-
setBoxes
public void setBoxes(List<? extends Box> boxes)
Description copied from interface:Container
Sets all boxes and removes all previous child boxes.
-
getBoxes
public <T extends Box> List<T> getBoxes(Class<T> clazz)
Description copied from interface:Container
Gets 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:Container
Gets all child boxes of the given type. May not returnnull
.
-
writeContainer
public void writeContainer(WritableByteChannel bb) throws IOException
- Specified by:
writeContainer
in interfaceContainer
- Throws:
IOException
-
-