public interface IndexEntry extends Cloneable
Element of an array that provides stream offsets and other description of an edit unit along an incrementing timeline.
| Modifier and Type | Field and Description |
|---|---|
static byte |
EDITFLAG_BACKWARD_PREDICTION
Set this bit on an edit unit flag to indicate backward prediction from
a future frame is in use.
|
static byte |
EDITFLAG_FORWARD_PREDICTION
Set this bit on an edit unit flag to indicate forward prediction from the
previous frame is in use.
|
static byte |
EDITFLAG_RANDOM_ACCESS
Set this bit on an edit unit flag to indicate that it is a bona fide random
access point in the stream.
|
static byte |
EDITFLAG_SEQUENCE_HEADER
Set this bit on an edit unit flag to indicate that the edit unit contains
an MPEG sequence header.
|
static byte |
FLAGS_DEFAULT
Default value for the flags stating what kind of frame this is.
|
static byte |
KEYFRAMEOFFSET_DEFAULT
Default value for the offset from the indexed frame to the previous key frame.
|
static byte |
TEMPORALOFFSET_DEFAULT
Default value for the offset from the display order to the coded order.
|
| Modifier and Type | Method and Description |
|---|---|
IndexEntry |
clone()
Create a cloned copy of this index entry.
|
byte |
getFlags()
Returns the edit flags that indicate the coding of the edit unit associated with the index
entry.
|
byte |
getKeyFrameOffset()
Returns the offset measured in edit units to the previous key frame for this index entry,
which may be the preceding I-frame for an MPEG stream.
|
Rational[] |
getPosTable()
Returns the array of fractional position offsets from the start of the content package to the
synchronized sample in the content package.
|
int[] |
getSliceOffset()
Returns the array of byte offsets from the stream offset of the edit unit to each slice.
|
long |
getStreamOffset()
Returns the offset of the edit unit within the container stream relative to the start of
that container stream, measured in bytes.
|
byte |
getTemporalOffset()
Returns the offset measured in edit units from the display order to the coded order
for this index entry.
|
void |
resolveBytes(IndexTableSegment parentSegment)
Resolves any bytes that could not be parsed initially without the context of an index
table segment in the context of the given index table segment.
|
void |
setFlags(byte flags)
Sets the edit flags that indicate the coding of the edit unit associated with the index
entry.
|
void |
setKeyFrameOffset(byte keyFrameOffset)
Sets the offset measured in edit units to the previous key frame for this index entry,
which may be the preceding I-frame for an MPEG stream.
|
void |
setPosTable(Rational[] posTable)
Sets the array of fractional position offsets from the start of the content package to the
synchronized sample in the content package.
|
void |
setSliceOffset(int[] sliceOffset)
Sets the array of byte offsets from the stream offset of the edit unit to each slice.
|
void |
setStreamOffset(long streamOffset)
Sets the offset of the edit unit within the container stream relative to the start of
that container stream, measured in bytes.
|
void |
setTemporalOffset(byte temporalOffset)
Sets the offset measured in edit units from the display order to the coded order
for this index entry.
|
@Int8 static final byte TEMPORALOFFSET_DEFAULT
Default value for the offset from the display order to the coded order.
@Int8 static final byte KEYFRAMEOFFSET_DEFAULT
Default value for the offset from the indexed frame to the previous key frame.
@UInt8 static final byte FLAGS_DEFAULT
Default value for the flags stating what kind of frame this is. The value represents a bona fide random access frame with no forward or backward predicition, e.g. for MPEG-2 the frame is an I-frame.
static final byte EDITFLAG_RANDOM_ACCESS
Set this bit on an edit unit flag to indicate that it is a bona fide random access point in the stream.
getFlags(),
setFlags(byte),
FLAGS_DEFAULT,
Constant Field Valuesstatic final byte EDITFLAG_SEQUENCE_HEADER
Set this bit on an edit unit flag to indicate that the edit unit contains an MPEG sequence header.
getFlags(),
setFlags(byte),
Constant Field Valuesstatic final byte EDITFLAG_FORWARD_PREDICTION
Set this bit on an edit unit flag to indicate forward prediction from the previous frame is in use.
getFlags(),
setFlags(byte),
Constant Field Valuesstatic final byte EDITFLAG_BACKWARD_PREDICTION
Set this bit on an edit unit flag to indicate backward prediction from a future frame is in use.
getFlags(),
setFlags(byte),
Constant Field Values@Int8 byte getTemporalOffset()
Returns the offset measured in edit units from the display order to the coded order for this index entry.
TEMPORALOFFSET_DEFAULT,
DeltaEntry.getPosTableIndex()void setTemporalOffset(@Int8 byte temporalOffset)
Sets the offset measured in edit units from the display order to the coded order for this index entry.
temporalOffset - Offset measured in edit units from the display order to the coded order.TEMPORALOFFSET_DEFAULT,
DeltaEntry.setPosTableIndex(byte)@Int8 byte getKeyFrameOffset()
Returns the offset measured in edit units to the previous key frame for this index entry, which may be the preceding I-frame for an MPEG stream. The value is zero if this is a key frame.
KEYFRAMEOFFSET_DEFAULTvoid setKeyFrameOffset(@Int8 byte keyFrameOffset)
Sets the offset measured in edit units to the previous key frame for this index entry, which may be the preceding I-frame for an MPEG stream. The value is zero if this is a key frame.
keyFrameOffset - Offset measured in edit units to the previous key frame.KEYFRAMEOFFSET_DEFAULT@EditUnitFlag byte getFlags()
Returns the edit flags that indicate the coding of the edit unit associated with the index entry.
Note the following about prediction flags:
FLAGS_DEFAULT,
EDITFLAG_RANDOM_ACCESS,
EDITFLAG_SEQUENCE_HEADER,
EDITFLAG_FORWARD_PREDICTION,
EDITFLAG_BACKWARD_PREDICTIONvoid setFlags(@EditUnitFlag byte flags)
Sets the edit flags that indicate the coding of the edit unit associated with the index entry.
Note the following about prediction flags:
flags - Edit flags that indicate the coding of the edit unit.FLAGS_DEFAULT,
EDITFLAG_RANDOM_ACCESS,
EDITFLAG_SEQUENCE_HEADER,
EDITFLAG_FORWARD_PREDICTION,
EDITFLAG_BACKWARD_PREDICTION@UInt64 long getStreamOffset()
Returns the offset of the edit unit within the container stream relative to the start of that container stream, measured in bytes.
void setStreamOffset(@UInt64 long streamOffset) throws IllegalArgumentException
Sets the offset of the edit unit within the container stream relative to the start of that container stream, measured in bytes.
streamOffset - offset of the edit unit within the container stream relative to the start of
that container stream, measured in bytes.IllegalArgumentException - Stream offset values cannot be negative.@UInt32Array int[] getSliceOffset()
Returns the array of byte offsets from the stream offset of the edit unit to each slice. Other than the first slice always starts at the beginning of the edit unit, a slice offset indicates the start of a group of sections following a variable bitrate encoded item.
DeltaEntry.getSlice()void setSliceOffset(@UInt32Array int[] sliceOffset) throws IllegalArgumentException
Sets the array of byte offsets from the stream offset of the edit unit to each slice. Other than the first slice always starts at the beginning of the edit unit, a slice offset indicates the start of a group of sections following a variable bitrate encoded item.
sliceOffset - Array of byte offsets from the stream offset of the edit unit to each slice.IllegalArgumentException - Slice offset values cannot be negative.DeltaEntry.setSlice(byte)Rational[] getPosTable()
Returns the array of fractional position offsets from the start of the content package to the synchronized sample in the content package. Fractional offsets are required when a difference exists between the frame size of content, such as between audio and video.
For example, the audio may only be synchronized with the video every few frames. In this case the fraction indicates how much of a fraction differece exists between the start of the audio frame and the start of the video frame.
DeltaEntry.getPosTableIndex()void setPosTable(Rational[] posTable) throws NullPointerException
Sets the array of fractional position offsets from the start of the content package to the synchronized sample in the content package. Fractional offsets are required when a difference exists between the frame size of content, such as between audio and video.
For example, the audio may only be synchronized with the video every few frames. In this case the fraction indicates how much of a fraction differece exists between the start of the audio frame and the start of the video frame.
posTable - Array of fractional position offsets from the start of the content package to the
synchronized sample in the content package.NullPointerException - Cannot create a position table with null elements.DeltaEntry.setPosTableIndex(byte)IndexEntry clone()
Create a cloned copy of this index entry.
void resolveBytes(IndexTableSegment parentSegment) throws NullPointerException, EndOfDataException
Resolves any bytes that could not be parsed initially without the context of an index table segment in the context of the given index table segment. The result of calling this method is to set the slice offset and position table properties using the slice count and position table count of the index table segment.
parentSegment - Segment that owns the index entry and provides the slice count and position table count values.NullPointerException - The given parent segment is null.EndOfDataException - Insufficient data in the unresolved bytes of each index entry to be resolved to arrays of
the required size.IndexTableSegment.getSliceCount(),
IndexTableSegment.getPosTableCount()(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.