public interface PartitionPack extends MetadataObject, Cloneable, MXFUnit, Padded
Represents a partition pack that describes and starts every partition of an MXF file. The description includes:
With the exception of the body offset, all byte offsets are measured from the start of the header partition. If the file has no run-in, this is the first byte of the file.
The header partition starts at the end of the partition pack, found when decoding the length of the KLV data set that represents the parition pack. The index table starts at the end of the partition pack plus the size of any header metadata.
Partition.getPartitionPack()| Modifier and Type | Field and Description |
|---|---|
static int |
BODYSID_DEFAULT
Default value for the identity of any stream of essence (body) in
this partition, which is 0.
|
static long |
FOOTERPARTITION_DEFAULT
Default value for the byte offset to the
beginning of the footer partition, which is 0L.
|
static long |
HEADERBYTECOUNT_DEFAULT
Default value for the size of any header metadata
in the partition, which is 0L.
|
static long |
INDEXBYTECOUNT_DEFAULT
Default value for the size of any index table data in the partition,
which is 0L.
|
static int |
INDEXSID_DEFAULT
Default value for the identity of any stream of index table data
in this partition, which is 0.
|
static short |
MAJORVERSION_DEFAULT
Default value for the major version property,
which is 1.
|
static short |
MINORVERSION_DEFAULT
Default value for the minor version property,
which is 3.
|
static long |
PREVIOUSPARTITION_DEFAULT
Default value for the byte offset from the start of the file to the
beginning of the previous partition, which is 0L.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEssenceContainer(AUID essenceContainerID)
Add an identifier for the kinds of essence found in or referenced by the
MXF file containing this partition.
|
PartitionPack |
clone()
Create a cloned copy of this partition pack.
|
long |
getBodyOffset()
Returns the byte offset to the essence container in this partition
from the start of the partition pack.
|
int |
getBodySID()
Returns the identifier of the essence container in this partition.
|
int |
getEncodedSize()
Calculates the number of bytes it will take to encode this partition pack.
|
Set<AUID> |
getEssenceContainers()
Returns a set of identifiers for the kinds of essence found in or referenced
by the MXF file containing this partition.
|
long |
getFooterPartition()
Returns the byte offset of the footer partition in the file.
|
long |
getHeaderByteCount()
Returns the number of bytes used for header metadata
in this partition.
|
long |
getIndexByteCount()
Returns the number of bytes used for index table segments
in this partition.
|
int |
getIndexSID()
Returns the identifier of index table segments in
this partition.
|
int |
getKagSize()
Returns the key alignment grid size for KLV data triplets in this
partition.
|
short |
getMajorVersion()
Returns the major version number of the MXF byte-level format.
|
short |
getMinorVersion()
Returns the minor version number of the MXF byte-level format.
|
AUID |
getOperationalPattern()
Returns the operational pattern of the MXF file.
|
long |
getPreviousPartition()
Returns the byte offset of the previous partition in the file.
|
long |
getThisPartition()
Returns the byte offset of this partition in the file.
|
void |
setBodyOffset(long bodyOffset)
Sets byte offset to the essence container in this partition
from the start of the partition pack.
|
void |
setBodySID(int bodySID)
Sets the identifier of the essence container in this partition.
|
void |
setEssenceContainers(Set<AUID> essenceContainers)
Sets a set of identifiers for the kinds of essence found in or referenced
by the MXF file containing this partition.
|
void |
setFooterPartition(long footerPartition)
Sets the byte offset of the footer partition in the file.
|
void |
setHeaderByteCount(long headerByteCount)
Sets the number of bytes used for header metadata
in this partition.
|
void |
setIndexByteCount(long indexByteCount)
Sets the number of bytes used for index table segments
in this partition.
|
void |
setIndexSID(int indexSID)
Sets the identifier of index table segments in
this partition.
|
void |
setKagSize(int kagSize)
Sets the key alignment grid size for KLV data triplets in this
partition.
|
void |
setMajorVersion(short majorVersion)
Sets the major version number of the MXF byte-level format.
|
void |
setMinorVersion(short minorVersion)
Sets the minor version number of the MXF byte-level format.
|
void |
setOperationalPattern(AUID auid)
Sets the operational pattern of the MXF file containing
this partition.
|
void |
setPreviousPartition(long previousPartition)
Sets the byte offset of the previous partition in the file to this one.
|
void |
setThisPartition(long thisPartition)
Returns the byte offset of this partition in the file.
|
getUnitTypegetPaddingFillSize, setPaddingFillSizestatic final short MAJORVERSION_DEFAULT
Default value for the major version property, which is 1.
static final short MINORVERSION_DEFAULT
Default value for the minor version property, which is 3.
static final long PREVIOUSPARTITION_DEFAULT
Default value for the byte offset from the start of the file to the beginning of the previous partition, which is 0L.
static final long FOOTERPARTITION_DEFAULT
Default value for the byte offset to the beginning of the footer partition, which is 0L.
static final long HEADERBYTECOUNT_DEFAULT
Default value for the size of any header metadata in the partition, which is 0L. A value of zero indicates that no header metadata is present in this partition.
static final long INDEXBYTECOUNT_DEFAULT
Default value for the size of any index table data in the partition, which is 0L.
static final int INDEXSID_DEFAULT
Default value for the identity of any stream of index table data in this partition, which is 0. A value of zero indicates that no index table data is present for this partition.
getIndexSID(),
setIndexSID(int),
Constant Field Valuesstatic final int BODYSID_DEFAULT
Default value for the identity of any stream of essence (body) in this partition, which is 0. A value of zero indicates that no essence container data is present for this partition.
getBodySID(),
setBodySID(int),
Constant Field Values@UInt16 short getMajorVersion()
Returns the major version number of the MXF byte-level format. A change in number is a warning that the file may not be backward compatible.
MAJORVERSION_DEFAULT,
getMinorVersion()void setMajorVersion(@UInt16 short majorVersion)
Sets the major version number of the MXF byte-level format. A change in number is a warning that the file may not be backward compatible.
majorVersion - Major version number of the MXF byte-level format.MAJORVERSION_DEFAULT,
setMinorVersion(short)@UInt16 short getMinorVersion()
Returns the minor version number of the MXF byte-level format. Newer versions indicated by this number should be backward-compatible with previous versions.
MINORVERSION_DEFAULT,
getMajorVersion()void setMinorVersion(@UInt16 short minorVersion)
Sets the minor version number of the MXF byte-level format. Newer versions indicated by this number should be backward-compatible with previous versions.
minorVersion - Minor version number of the MXF byte-level format.MINORVERSION_DEFAULT,
setMajorVersion(short)@UInt32 int getKagSize()
Returns the key alignment grid size for KLV data triplets in this partition.
void setKagSize(@UInt32 int kagSize)
Sets the key alignment grid size for KLV data triplets in this partition.
kagSize - Key alignment grid size for KLV data triplets in this
partition.@UInt64 long getThisPartition()
Returns the byte offset of this partition in the file.
getPreviousPartition(),
getFooterPartition()void setThisPartition(@UInt64 long thisPartition)
Returns the byte offset of this partition in the file.
thisPartition - Byte offset of this partition in the file.setPreviousPartition(long),
setFooterPartition(long)@UInt64 long getPreviousPartition()
Returns the byte offset of the previous partition in the file.
PREVIOUSPARTITION_DEFAULT,
getThisPartition(),
getFooterPartition()void setPreviousPartition(@UInt64 long previousPartition)
Sets the byte offset of the previous partition in the file to this one.
previousPartition - byte offset of the previous partition in the file to this one.PREVIOUSPARTITION_DEFAULT,
setPreviousPartition(long),
setThisPartition(long)@UInt64 long getFooterPartition()
Returns the byte offset of the footer partition in the file.
FOOTERPARTITION_DEFAULT,
getThisPartition(),
getPreviousPartition()void setFooterPartition(@UInt64 long footerPartition)
Sets the byte offset of the footer partition in the file.
footerPartition - Byte offset of the footer partition in the file.FOOTERPARTITION_DEFAULT,
setThisPartition(long),
setPreviousPartition(long)@UInt64 long getHeaderByteCount()
Returns the number of bytes used for header metadata in this partition. The value includes any primer pack, metadata sets and trailing fill. A value of zero indicates that no header metadata is present in this partition.
HEADERBYTECOUNT_DEFAULTvoid setHeaderByteCount(@UInt64 long headerByteCount)
Sets the number of bytes used for header metadata in this partition. The value includes any primer pack, metadata sets and trailing fill. A value of zero indicates that no header metadata is present in this partition.
headerByteCount - Number of bytes used for header metadata
in this partition.HEADERBYTECOUNT_DEFAULT,
setIndexByteCount(long)@UInt64 long getIndexByteCount()
Returns the number of bytes used for index table segments in this partition. This includes the key for the first index table segment and any trailing fill.
Note that the presence of absence of index table data is determined from the index SID value.
INDEXBYTECOUNT_DEFAULT,
getHeaderByteCount(),
getIndexSID()void setIndexByteCount(@UInt64 long indexByteCount)
Sets the number of bytes used for index table segments in this partition. This includes the key for the first index table segment and any trailing fill.
Note that the presence of absence of index table data is determined from the index SID value.
indexByteCount - Number of bytes used for header metadata
in this partition.INDEXBYTECOUNT_DEFAULT,
setHeaderByteCount(long)@UInt32 int getIndexSID()
Returns the identifier of index table segments in this partition. A value of zero indicates that no index table data is present for this partition.
INDEXSID_DEFAULT,
getIndexByteCount()void setIndexSID(int indexSID)
Sets the identifier of index table segments in this partition. A value of zero indicates that no index table data is present for this partition.
indexSID - Identifier of index table segments in
this partition.INDEXSID_DEFAULT,
setIndexByteCount(long)@UInt64 long getBodyOffset()
Returns the byte offset to the essence container in this partition from the start of the partition pack.
getBodySID()void setBodyOffset(@UInt64 long bodyOffset)
Sets byte offset to the essence container in this partition from the start of the partition pack.
bodyOffset - Byte offset to the essence container in this partition
from the start of the partition pack.setBodySID(int)@UInt32 int getBodySID()
Returns the identifier of the essence container in this partition. A value of zero indicates that no essence container data is present for this partition.
BODYSID_DEFAULT,
getIndexSID(),
getBodyOffset()void setBodySID(@UInt32 int bodySID)
Sets the identifier of the essence container in this partition. A value of zero indicates that no essence container data is present for this partition.
bodySID - Identifier of the essence container in this partition.BODYSID_DEFAULT,
setIndexSID(int),
setBodyOffset(long)AUID getOperationalPattern()
Returns the operational pattern of the MXF file.
Preface.getOperationalPattern(),
OperationalPatternConstantvoid setOperationalPattern(AUID auid)
Sets the operational pattern of the MXF file containing this partition.
auid - Operational pattern of the MXF file.Preface.setOperationalPattern(AUID),
OperationalPatternConstantSet<AUID> getEssenceContainers()
Returns a set of identifiers for the kinds of essence found in or referenced by the MXF file containing this partition.
addEssenceContainer(AUID),
Preface.getEssenceContainers(),
ContainerConstant,
ContainerDefinitionvoid setEssenceContainers(Set<AUID> essenceContainers)
Sets a set of identifiers for the kinds of essence found in or referenced by the MXF file containing this partition.
essenceContainers - Set of identifiers for the kinds of essence found in or referenced
by the MXF file.addEssenceContainer(AUID),
Preface.getEssenceContainers(),
ContainerConstant,
ContainerDefinitionvoid addEssenceContainer(AUID essenceContainerID) throws NullPointerException
Add an identifier for the kinds of essence found in or referenced by the MXF file containing this partition.
essenceContainerID - Identifier for a kind of essence found of referenced by the
MXF file.NullPointerException - Cannot add a null identifier to the set of
container essence types.getEssenceContainers(),
Preface.getEssenceContainers(),
ContainerConstant,
ContainerDefinitionint getEncodedSize()
Calculates the number of bytes it will take to encode this partition pack.
PartitionPack clone()
Create a cloned copy of this partition pack.
(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.