public final class VisualSampleEntry extends AbstractSampleEntry implements Container
class VisualSampleEntry(codingname) extends AbstractSampleEntry (codingname){ unsigned int(16) pre_defined = 0; const unsigned int(16) reserved = 0; unsigned int(32)[3] pre_defined = 0; unsigned int(16) width; unsigned int(16) height; template unsigned int(32) horizresolution = 0x00480000; // 72 dpi template unsigned int(32) vertresolution = 0x00480000; // 72 dpi const unsigned int(32) reserved = 0; template unsigned int(16) frame_count = 1; string[32] compressorname; template unsigned int(16) depth = 0x0018; int(16) pre_defined = -1; }Format-specific information is appened as boxes after the data described in ISO/IEC 14496-12 chapter 8.16.2.
Modifier and Type | Field and Description |
---|---|
static String |
TYPE_ENCRYPTED
Identifier for an encrypted video track.
|
static String |
TYPE1 |
static String |
TYPE2 |
static String |
TYPE3 |
static String |
TYPE4 |
static String |
TYPE5 |
static String |
TYPE6 |
static String |
TYPE7 |
dataReferenceIndex
largeBox, type
boxParser, dataSource
Constructor and Description |
---|
VisualSampleEntry() |
VisualSampleEntry(String type) |
Modifier and Type | Method and Description |
---|---|
void |
getBox(WritableByteChannel writableByteChannel)
Writes the complete box - size | 4-cc | content - to the given
writableByteChannel . |
String |
getCompressorname() |
int |
getDepth() |
int |
getFrameCount() |
int |
getHeight() |
double |
getHorizresolution() |
long |
getSize() |
double |
getVertresolution() |
int |
getWidth() |
void |
parse(DataSource dataSource,
ByteBuffer header,
long contentSize,
BoxParser boxParser)
Parses the box excluding the already parsed header (size, 4cc, [long-size], [user-type]).
|
void |
setCompressorname(String compressorname) |
void |
setDepth(int depth) |
void |
setFrameCount(int frameCount) |
void |
setHeight(int height) |
void |
setHorizresolution(double horizresolution) |
void |
setType(String type) |
void |
setVertresolution(double vertresolution) |
void |
setWidth(int width) |
getDataReferenceIndex, setDataReferenceIndex
getHeader, getOffset, getParent, getType, initContainer, setParent
addBox, close, getBoxes, getBoxes, getBoxes, getByteBuffer, getContainerSize, hasNext, next, remove, setBoxes, toString, writeContainer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBoxes, getBoxes, getBoxes, getByteBuffer, setBoxes, writeContainer
getOffset, getParent, getType, setParent
forEachRemaining
public static final String TYPE1
public static final String TYPE2
public static final String TYPE3
public static final String TYPE4
public static final String TYPE5
public static final String TYPE6
public static final String TYPE7
public static final String TYPE_ENCRYPTED
public VisualSampleEntry()
public VisualSampleEntry(String type)
public void setType(String type)
public int getWidth()
public void setWidth(int width)
public int getHeight()
public void setHeight(int height)
public double getHorizresolution()
public void setHorizresolution(double horizresolution)
public double getVertresolution()
public void setVertresolution(double vertresolution)
public int getFrameCount()
public void setFrameCount(int frameCount)
public String getCompressorname()
public void setCompressorname(String compressorname)
public int getDepth()
public void setDepth(int depth)
public void parse(DataSource dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException
Box
contentSize
, contentSize
number of bytes should be read from the box source (readableByteChannel
).
If you need the header
buffer at a later stage you have to create a copy.parse
in interface Box
parse
in class AbstractSampleEntry
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.IOException
- in case of an error during a read operationpublic void getBox(WritableByteChannel writableByteChannel) throws IOException
Box
writableByteChannel
.getBox
in interface Box
getBox
in class AbstractSampleEntry
writableByteChannel
- the box's sinkIOException
- in case of problems with the Channel
public long getSize()
getSize
in interface Box
getSize
in class AbstractContainerBox
Copyright © 2017. All rights reserved.