com.coremedia.iso
Class IsoFile
java.lang.Object
com.coremedia.iso.boxes.AbstractBox
com.coremedia.iso.boxes.AbstractContainerBox
com.coremedia.iso.IsoFile
- All Implemented Interfaces:
- Box, ContainerBox
public class IsoFile
- extends AbstractContainerBox
The most upper container for ISO Boxes. It is a container box that is a file.
Uses IsoBufferWrapper to access the underlying file.
Methods inherited from class com.coremedia.iso.boxes.AbstractBox |
addWriteListener, getBox, getDeadBytes, getParent, getType, getUserType, isParsed, setDeadBytes, setParent, setParsed, setUserType, utf8StringLengthInBytes |
boxParser
protected BoxParser boxParser
originalIso
protected IsoBufferWrapper originalIso
IsoFile
public IsoFile(IsoBufferWrapper originalIso)
IsoFile
public IsoFile(IsoBufferWrapper originalIso,
BoxParser boxParser)
createBoxParser
protected BoxParser createBoxParser()
getDisplayName
public String getDisplayName()
- Description copied from class:
AbstractBox
- Returns the human readable name of the box.
- Specified by:
getDisplayName
in class AbstractBox
- Returns:
- a display string
parse
public void parse(IsoBufferWrapper in,
long size,
BoxParser boxParser,
Box lastMovieFragmentBox)
throws IOException
- Description copied from class:
AbstractBox
- Pareses the given IsoBufferWrapper and returns the remaining bytes.
- Overrides:
parse
in class AbstractContainerBox
- Parameters:
in
- the (part of the) iso file to parsesize
- expected size of the boxboxParser
- creates inner boxeslastMovieFragmentBox
- latest of previously found moof boxes
- Throws:
IOException
- in case of an I/O error.
parse
public void parse()
throws IOException
- Throws:
IOException
parseMdats
public void parseMdats()
throws IOException
- Throws:
IOException
toString
public String toString()
- Overrides:
toString
in class AbstractContainerBox
fourCCtoBytes
public static byte[] fourCCtoBytes(String fourCC)
bytesToFourCC
public static String bytesToFourCC(byte[] type)
getTrack
public List<Sample<? extends TrackMetaDataContainer>> getTrack(long trackId)
- Returns the track with the given id as list of
Sample
. It unifies the track if it is spread over more
than one MediaDataBox
.
- Parameters:
trackId
- as stated in ISO 14496-13
- Returns:
- the track's list of
Sample
.
getNumOfBytesToFirstChild
public long getNumOfBytesToFirstChild()
- Description copied from interface:
ContainerBox
- Returns the number of bytes from the start of the box to start of the first child.
- Specified by:
getNumOfBytesToFirstChild
in interface ContainerBox
- Overrides:
getNumOfBytesToFirstChild
in class AbstractContainerBox
- Returns:
- offset of first child from box start
getSize
public long getSize()
- Specified by:
getSize
in interface Box
- Overrides:
getSize
in class AbstractBox
calculateOffset
public long calculateOffset()
- Specified by:
calculateOffset
in interface Box
- Overrides:
calculateOffset
in class AbstractBox
getOffset
public long getOffset()
- Specified by:
getOffset
in interface Box
- Overrides:
getOffset
in class AbstractBox
getIsoFile
public IsoFile getIsoFile()
- Specified by:
getIsoFile
in interface Box
- Specified by:
getIsoFile
in interface ContainerBox
- Overrides:
getIsoFile
in class AbstractBox
getHeaderSize
protected long getHeaderSize()
- Overrides:
getHeaderSize
in class AbstractBox
getHeader
public byte[] getHeader()
- Overrides:
getHeader
in class AbstractBox
getBoxParser
public BoxParser getBoxParser()
getOriginalIso
public IsoBufferWrapper getOriginalIso()
Copyright © 2011. All Rights Reserved.