@MediaClass(uuid1=218169857, uuid2=272, uuid3=256, uuid4={6,14,43,52,2,6,1,1}, definedName="IndexTableSegment", description="Index tables are represented as one or more index table segments.", namespace="http://www.smpte-ra.org/rp210", prefix="mxf", symbol="IndexTableSegment") public class IndexTableSegmentImpl extends Object implements MetadataObject, IndexTableSegment, Cloneable
Index tables are represented as index table segments, where a complete index table may comprise one or more index table segments.
IndexTableEDITUNITBYTECOUNT_DEFAULT, EXTSTARTOFFSET_DEFAULT, key, SLICECOUNT_DEFAULT, VBEBYTECOUNT_DEFAULT| Constructor and Description |
|---|
IndexTableSegmentImpl() |
IndexTableSegmentImpl(Rational indexEditRate,
long indexStartPosition,
long indexDuration,
int indexSID,
int bodySID) |
| Modifier and Type | Method and Description |
|---|---|
IndexTableSegmentImpl |
clone()
Creates a cloned copy of this index table segment.
|
static IndexTableSegment |
createFromBuffer(ByteBuffer buffer) |
boolean |
equals(Object o) |
int |
getBodySID()
Returns the stream identifier of the indexed essence container.
|
DeltaEntry[] |
getDeltaEntryArray()
Returns the array of delta entries for this index table segment that describe
the layout of each element stored within an edit unit.
|
int |
getEditUnitByteCount()
Returns the byte count of each and every edit unit in the indexed essence container,
which is greater than zero when this is a fixed size for all edit units.
|
long |
getExtStartOffset()
Get the external start offset property of this index table segment that the byte offset to the first
essence data in a CBE (Constant Bytes per Element) essence stream.
|
long |
getIndexDuration()
Returns the time duration of this table segment measured in number of edit units of
the referenced package.
|
Rational |
getIndexEditRate()
Returns the edit rate of the master track in the indexed essence container, measured in
hertz.
|
IndexEntry[] |
getIndexEntryArray()
Returns the array of index entries for this index table segment that describes the
stream offset of each edit unit.
|
int |
getIndexSID()
Returns the stream identifier for this index table.
|
long |
getIndexStartPosition()
Returns the first editable unit indexed by this index table segment measured
in file package edit units.
|
byte |
getPosTableCount()
Returns the number of entries in the position offsets table per edit unit, minus one as
only offsets are recorded in the array.
|
byte |
getSliceCount()
Returns the number of slices used to group the elements within an edit unit, minus one as
only slice offsets are recorded in an array.
|
UnitType |
getUnitType() |
long |
getVBEByteCount()
Get the VBE byte count value that gives the byte offset to the end of the final essence unit in a
VBE (Variable Bytes per Element) essence stream.
|
int |
hashCode() |
void |
setBodySID(int bodySID)
Sets the stream identifier of the indexed essence container.
|
void |
setDeltaEntries(int[] elementDeltas)
Sets the array of delta entries for this index table segment using
element delta offsets only.
|
void |
setDeltaEntryArray(DeltaEntry[] deltaEntryArray)
Sets the array of delta entries for this index table segment that describe
the layout of each element stored within an edit unit.
|
void |
setEditUnitByteCount(int editUnitByteCount)
Sets the byte count of each and every edit unit in the indexed essence container,
which is greater than zero when this is a fixed size for all edit units.
|
void |
setExtStartOffset(Long extStartOffset)
Sets the external start offset property of this index table segment that the byte offset to the first
essence data in a CBE (Constant Bytes per Element) essence stream.
|
void |
setIndexDuration(long indexDuration)
Sets the time duration of this table segment measured in number of edit units of
the referenced package.
|
void |
setIndexEditRate(Rational indexEditRate)
Sets the edit rate of the master track in the indexed essence container, measured in
hertz.
|
void |
setIndexEntryArray(IndexEntry[] indexEntryArray)
Sets the array of index entries for this index table segment that describes the
stream offset of each edit unit.
|
void |
setIndexSID(int indexSID)
Sets the stream identifier for this index table.
|
void |
setIndexStartPosition(long indexStartPosition)
Sets the first editable unit indexed by this index table segment measured
in file package edit units.
|
void |
setPosTableCount(Byte posTableCount)
Sets the number of entries in the position offsets table per edit unit, minus one as
only offsets are recorded in the array.
|
void |
setSliceCount(byte sliceCount)
Sets the number of slices used to group the elements within an edit unit, minus one as
only slice offsets are recorded in an array.
|
void |
setVBEByteCount(Long vbeByteCount)
Sets the VBE byte count value that gives the byte offset to the end of the final essence unit in a
VBE (Variable Bytes per Element) essence stream.
|
String |
toString() |
public IndexTableSegmentImpl()
public IndexTableSegmentImpl(Rational indexEditRate, @PositionType long indexStartPosition, @LengthType long indexDuration, @UInt32 int indexSID, @UInt32 int bodySID) throws NullPointerException, BadRateException, IllegalArgumentException
@MediaProperty(uuid1=87032838, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,5}, definedName="Index Edit Rate", typeName="Rational", optional=false, uniqueIdentifier=false, pid=16139, symbol="IndexEditRate") public Rational getIndexEditRate()
IndexTableSegmentReturns the edit rate of the master track in the indexed essence container, measured in hertz. If the container has only one track, this is the edit rate of that track. If the essence container interleaves video and audio, it is standard practice to use the picture track to provide the index edit rate.
getIndexEditRate in interface IndexTableSegment@MediaPropertySetter(value="Index Edit Rate") public void setIndexEditRate(Rational indexEditRate) throws NullPointerException, BadRateException
IndexTableSegmentSets the edit rate of the master track in the indexed essence container, measured in hertz. If the container has only one track, this is the edit rate of that track. If the essence container interleaves video and audio, it is standard practice to use the picture track to provide the index edit rate.
setIndexEditRate in interface IndexTableSegmentindexEditRate - Edit rate of the master track in the essence container, measured in
hertz.NullPointerException - Cannot set the index edit rate with a null value.BadRateException - The given rate is not acceptable because it is negative or has
a zero denominator.@MediaProperty(uuid1=117571843, uuid2=266, uuid3=0, uuid4={6,14,43,52,1,1,1,5}, definedName="Index Start Position", typeName="PositionType", optional=false, uniqueIdentifier=false, pid=16140, symbol="IndexStartPosition") @PositionType public long getIndexStartPosition()
IndexTableSegmentReturns the first editable unit indexed by this index table segment measured in file package edit units.
getIndexStartPosition in interface IndexTableSegment@MediaPropertySetter(value="Index Start Position") public void setIndexStartPosition(@PositionType long indexStartPosition)
IndexTableSegmentSets the first editable unit indexed by this index table segment measured in file package edit units.
setIndexStartPosition in interface IndexTableSegmentindexStartPosition - First editable unit indexed by this index table segment.@MediaProperty(uuid1=117572097, uuid2=258, uuid3=0, uuid4={6,14,43,52,1,1,1,5}, definedName="Index Duration", typeName="LengthType", optional=false, uniqueIdentifier=false, pid=16141, symbol="IndexDuration") @LengthType public long getIndexDuration()
IndexTableSegmentReturns the time duration of this table segment measured in number of edit units of the referenced package.
getIndexDuration in interface IndexTableSegment@MediaPropertySetter(value="Index Duration") public void setIndexDuration(@LengthType long indexDuration)
IndexTableSegmentSets the time duration of this table segment measured in number of edit units of the referenced package.
setIndexDuration in interface IndexTableSegmentindexDuration - Time duration of this table segment measured in number of edit units.@MediaProperty(uuid1=67502593, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,4}, definedName="Edit Unit Byte Count", typeName="UInt32", optional=false, uniqueIdentifier=false, pid=16133, symbol="EditUnitByteCount") @UInt32 public int getEditUnitByteCount()
IndexTableSegmentReturns the byte count of each and every edit unit in the indexed essence container, which is greater than zero when this is a fixed size for all edit units. The default value of 0 defines that the byte count for each edit unit may be variables and shall be looked up in the index entry array.
getEditUnitByteCount in interface IndexTableSegmentIndexTableSegment.EDITUNITBYTECOUNT_DEFAULT@MediaPropertySetter(value="Edit Unit Byte Count") public void setEditUnitByteCount(@UInt32 int editUnitByteCount) throws IllegalArgumentException
IndexTableSegmentSets the byte count of each and every edit unit in the indexed essence container, which is greater than zero when this is a fixed size for all edit units. The default value of 0 defines that the byte count for each edit unit may be variables and shall be looked up in the index entry array.
setEditUnitByteCount in interface IndexTableSegmenteditUnitByteCount - Byte count of each and every edit unit in the essence container.IllegalArgumentException - The edit unit byte count cannot be a negative value.IndexTableSegment.EDITUNITBYTECOUNT_DEFAULT@MediaProperty(uuid1=16974853, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,4}, definedName="IndexSID", aliases={"Index Stream ID","IndexStreamID"}, typeName="UInt32", optional=false, uniqueIdentifier=false, pid=16134, symbol="IndexSID") @UInt32 public int getIndexSID()
IndexTableSegmentReturns the stream identifier for this index table. A partition can only hold one index table. All index table segments within a partition and making up the same index table must have the same identifier. The identifier is unique within the scope of an MXF file.
getIndexSID in interface IndexTableSegment@MediaPropertySetter(value="IndexSID") public void setIndexSID(@UInt32 int indexSID) throws IllegalArgumentException
IndexTableSegmentSets the stream identifier for this index table. A partition can only hold one index table. All index table segments within a partition and making up the same index table must have the same identifier. The identifier is unique within the scope of an MXF file.
setIndexSID in interface IndexTableSegmentindexSID - Stream identifier for this index table.IllegalArgumentException - A stream identifier cannot be a negative value.@MediaProperty(uuid1=16974852, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,4}, definedName="BodySID", aliases={"Essence Stream ID","EssenceStreamID"}, typeName="UInt32", optional=false, uniqueIdentifier=false, pid=16135, symbol="BodySID") public int getBodySID()
IndexTableSegmentReturns the stream identifier of the indexed essence container. The indexed container may be in the same partition as the index or a different one, but the identifier is always unique within the scope of an MXF file.
getBodySID in interface IndexTableSegment@MediaPropertySetter(value="BodySID") public void setBodySID(@UInt32 int bodySID) throws IllegalArgumentException
IndexTableSegmentSets the stream identifier of the indexed essence container. The indexed container may be in the same partition as the index or a different one, but the identifier is always unique within the scope of an MXF file.
setBodySID in interface IndexTableSegmentbodySID - Stream identifier of the indexed essence container.IllegalArgumentException - Cannot set the stream identifier to a negative value.@MediaProperty(uuid1=67372033, uuid2=256, uuid3=0, uuid4={6,14,43,52,1,1,1,4}, definedName="Slice Count", typeName="UInt8", optional=false, uniqueIdentifier=false, pid=16136, symbol="SliceCount") @UInt8 public byte getSliceCount()
IndexTableSegmentReturns the number of slices used to group the elements within an edit unit, minus one as only slice offsets are recorded in an array. A new slice is required after any variable bit rate element in an interleaved stream of essence and the offset to the essence is recorded in the edit unit's index entry.
The default value for this property is 0.
Note that the slice count is required to resolve bytes to slice offsets for an index entry.
getSliceCount in interface IndexTableSegmentIndexTableSegment.SLICECOUNT_DEFAULT,
IndexEntry.getSliceOffset(),
IndexEntry.resolveBytes(IndexTableSegment)@MediaPropertySetter(value="Slice Count") public void setSliceCount(@UInt8 byte sliceCount) throws IllegalArgumentException
IndexTableSegmentSets the number of slices used to group the elements within an edit unit, minus one as only slice offsets are recorded in an array. A new slice is required after any variable bit rate element in an interleaved stream of essence and the offset to the essence is recorded in the edit unit's index entry.
The default value for this property is 0.
Note that the slice count is required to resolve bytes to slice offsets for an index entry.
setSliceCount in interface IndexTableSegmentsliceCount - Number of slices used to group the elements within an edit unit, minus one.IllegalArgumentException - Cannot set the slice count to a negative value.IndexTableSegment.SLICECOUNT_DEFAULT,
IndexEntry.getSliceOffset(),
IndexEntry.resolveBytes(IndexTableSegment)@MediaProperty(uuid1=67372033, uuid2=1792, uuid3=0, uuid4={6,14,43,52,1,1,1,5}, definedName="PosTableCount", typeName="UInt8", optional=true, uniqueIdentifier=false, pid=16142, symbol="PosTableCount") @UInt8 public byte getPosTableCount() throws PropertyNotPresentException
IndexTableSegmentReturns the number of entries in the position offsets table per edit unit, minus one as only offsets are recorded in the array. Position table offsets record the temporal fractional offset from the edit unit of the indexes master track, normally the picture track, and the start of other interleaved elements, such as sound tracks. This is an optional property that is omitted when all elements are temporally aligned or streams are not interleaved.
Note that the slice count is required to resolve bytes to slice offsets for an index entry.
getPosTableCount in interface IndexTableSegmentPropertyNotPresentException - The optional position table count property is not present for
this index table segment.IndexEntry.getPosTable(),
IndexEntry.resolveBytes(IndexTableSegment)@MediaPropertySetter(value="PosTableCount") public void setPosTableCount(@UInt8 Byte posTableCount) throws IllegalArgumentException
IndexTableSegmentSets the number of entries in the position offsets table per edit unit, minus one as only offsets are recorded in the array. Position table offsets record the temporal fractional offset from the edit unit of the indexes master track, normally the picture track, and the start of other interleaved elements, such as sound tracks. This is an optional property that is omitted when all elements are temporally aligned or streams are not interleaved.
Note that the slice count is required to resolve bytes to slice offsets for an index entry.
setPosTableCount in interface IndexTableSegmentposTableCount - Number of slices used to group the elements within an edit unit, minus one.IllegalArgumentException - Cannot set the position table count to a negative value.IndexEntry.getPosTable(),
IndexEntry.resolveBytes(IndexTableSegment)@MediaProperty(uuid1=67372033, uuid2=1536, uuid3=0, uuid4={6,14,43,52,1,1,1,5}, definedName="Delta Entry Array", typeName="DeltaEntryArray", optional=true, uniqueIdentifier=false, pid=16137, symbol="DeltaEntryArray") public DeltaEntry[] getDeltaEntryArray() throws PropertyNotPresentException
IndexTableSegmentReturns the array of delta entries for this index table segment that describe the layout of each element stored within an edit unit. This is an optional property and, when omitted, indicates only one element per edit unit.
getDeltaEntryArray in interface IndexTableSegmentPropertyNotPresentException - The optional delta entry array is not present for this index table
segment.IndexTableSegment.getSliceCount(),
TypeDefinitions.DeltaEntry,
TypeDefinitions.DeltaEntryArray@MediaPropertySetter(value="Delta Entry Array") public void setDeltaEntryArray(DeltaEntry[] deltaEntryArray) throws NullPointerException
IndexTableSegmentSets the array of delta entries for this index table segment that describe
the layout of each element stored within an edit unit. Set this optional property to null
to omit it, indicating that only one element exists per edit unit.
setDeltaEntryArray in interface IndexTableSegmentdeltaEntryArray - Array of delta entries for this index table segment.NullPointerException - One or more of the given delta elements is null.IndexTableSegment.setDeltaEntries(int[]),
IndexTableSegment.setSliceCount(byte),
MXFFactory.makeDeltaEntry(byte, byte, int),
MXFFactory.makeDeltaEntry(int)public void setDeltaEntries(int[] elementDeltas)
throws NullPointerException,
IllegalArgumentException
IndexTableSegmentSets the array of delta entries for this index table segment using element delta offsets only. The delta entries describe the layout of each element stored within an edit unit. Default values are set for the position table index and slice components of each entry.
setDeltaEntries in interface IndexTableSegmentelementDeltas - List of element delta offsets for the elements stored within each frame.NullPointerException - Cannot set the element deltas using a null array.IllegalArgumentException - Offsets cannot be negative values.IndexTableSegment.setDeltaEntryArray(DeltaEntry[])@MediaProperty(uuid1=67372034, uuid2=1280, uuid3=0, uuid4={6,14,43,52,1,1,1,5}, definedName="Index Entry Array", typeName="IndexEntryArray", optional=true, uniqueIdentifier=false, pid=16138, symbol="IndexEntryArray") public IndexEntry[] getIndexEntryArray() throws PropertyNotPresentException
IndexTableSegmentReturns the array of index entries for this index table segment that describes the stream offset of each edit unit. The index entry array is required when variable bit rate coding is in use. This is an optional property that is omitted when each edit unit can be found using a multiple of the edit unit byte count.
getIndexEntryArray in interface IndexTableSegmentPropertyNotPresentException - The optional index entry array property is not present for this index
table segment.IndexTableSegment.getEditUnitByteCount(),
IndexTableSegment.EDITUNITBYTECOUNT_DEFAULT,
TypeDefinitions.IndexEntry,
TypeDefinitions.IndexEntryArray@MediaPropertySetter(value="Index Entry Array") public void setIndexEntryArray(IndexEntry[] indexEntryArray) throws NullPointerException
IndexTableSegmentSets the array of index entries for this index table segment that describes the
stream offset of each edit unit. The index entry array is required when variable bit rate coding is in use.
Set this optional property to null to omit it, which should be the case when each edit unit
can be found using a multiple of the edit unit byte count.
setIndexEntryArray in interface IndexTableSegmentindexEntryArray - Array of index entries for this index table segment.NullPointerException - One or more of the given index entries in the given array is null.IndexTableSegment.setEditUnitByteCount(int),
IndexTableSegment.EDITUNITBYTECOUNT_DEFAULT@MediaProperty(uuid1=67502596, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,10}, definedName="ExtStartOffset", typeName="UInt64", optional=true, uniqueIdentifier=false, pid=16143, symbol="ExtStartOffset") @UInt64 public long getExtStartOffset() throws PropertyNotPresentException
IndexTableSegmentGet the external start offset property of this index table segment that the byte offset to the first essence data in a CBE (Constant Bytes per Element) essence stream. This is an optional property.
getExtStartOffset in interface IndexTableSegmentPropertyNotPresentExceptionIndexTableSegment.EXTSTARTOFFSET_DEFAULT@MediaPropertySetter(value="ExtStartOffset") public void setExtStartOffset(@UInt64 Long extStartOffset) throws IllegalArgumentException
IndexTableSegmentSets the external start offset property of this index table segment that the byte offset to the first
essence data in a CBE (Constant Bytes per Element) essence stream. Set this property to null to
omit it.
The default value for this property is 0L.
setExtStartOffset in interface IndexTableSegmentextStartOffset - External start offset of this index table segment.IllegalArgumentException - The external start offset property cannot be negative.IndexTableSegment.EXTSTARTOFFSET_DEFAULT@MediaProperty(uuid1=67502597, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,10}, definedName="VBEByteCount", typeName="UInt64", optional=true, uniqueIdentifier=false, pid=16144, symbol="VBEByteCount") @UInt64 public long getVBEByteCount() throws PropertyNotPresentException
IndexTableSegmentGet the VBE byte count value that gives the byte offset to the end of the final essence unit in a VBE (Variable Bytes per Element) essence stream. This value can be used to calculate the size of the final essence unit. This is an optional property.
The default value for this property is 0L.
getVBEByteCount in interface IndexTableSegmentPropertyNotPresentException - The optional VBE byte count property is not present.IndexTableSegment.VBEBYTECOUNT_DEFAULT@MediaPropertySetter(value="VBEByteCount") public void setVBEByteCount(@UInt64 Long vbeByteCount) throws IllegalArgumentException
IndexTableSegmentSets the VBE byte count value that gives the byte offset to the end of the final essence unit in a
VBE (Variable Bytes per Element) essence stream. This value can be used to calculate the size of the
final essence unit. Set this optional property to null to omit it.
The default value for this property is 0L.
setVBEByteCount in interface IndexTableSegmentvbeByteCount - VBE byte count for this index table segment.IllegalArgumentException - The VBE byte count property cannot be negative.IndexTableSegment.VBEBYTECOUNT_DEFAULTpublic static final IndexTableSegment createFromBuffer(ByteBuffer buffer) throws NullPointerException, BufferUnderflowException
public UnitType getUnitType()
getUnitType in interface MXFUnitpublic IndexTableSegmentImpl clone()
IndexTableSegmentCreates a cloned copy of this index table segment.
clone in interface IndexTableSegmentclone in class Object(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.