@MediaClass(uuid1=218169857, uuid2=256, uuid3=0, uuid4={6,14,43,52,2,5,1,1}, definedName="PartitionPack", description="A partition pack describes a single partition within an MXF file.", namespace="http://www.smpte-ra.org/rp210", prefix="mxf", symbol="PartitionPack") public abstract class PartitionPackImpl extends Object implements MetadataObject, FixedLengthPack, PartitionPack, Cloneable, Padded
| Modifier and Type | Field and Description |
|---|---|
static String[] |
packOrder |
BODYSID_DEFAULT, FOOTERPARTITION_DEFAULT, HEADERBYTECOUNT_DEFAULT, INDEXBYTECOUNT_DEFAULT, INDEXSID_DEFAULT, MAJORVERSION_DEFAULT, MINORVERSION_DEFAULT, PREVIOUSPARTITION_DEFAULT| Constructor and Description |
|---|
PartitionPackImpl() |
PartitionPackImpl(int kagSize,
long thisPartition,
long bodyOffset,
AUID operationalPattern) |
| 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.
|
String[] |
getPackOrder()
Returns a list of property names in the order they need to be serialized
to a stream.
|
long |
getPaddingFillSize()
Returns the number of padding bytes following a significant entry in a partition,
such as a partition pack or index table.
|
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.
|
static long |
initializeBodyOffset() |
static int |
initializeBodySID() |
static Set<AUID> |
initializeEssenceContainers() |
static long |
initializeFooterPartition() |
static long |
initializeHeaderByteCount() |
static long |
initializeIndexByteCount() |
static int |
initializeIndexSID() |
static int |
initializeKAGSize() |
static short |
initializeMajorVersion() |
static short |
initializeMinorVersion() |
static AUID |
initializeOperationalPattern() |
static void |
initializePackClasses() |
static long |
initializePreviousPartition() |
static long |
initializeThisPartition() |
static PartitionPack |
readPartitionPack(MXFFileImpl material) |
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 operationalPattern)
Sets the operational pattern of the MXF file containing
this partition.
|
void |
setPaddingFillSize(long paddingFillSize)
Set the amount of padding to include after each significant entry in the partition,
allowing space for the metadata to expand over time.
|
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.
|
String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetUnitTypepublic static final String[] packOrder
public static final void initializePackClasses()
@MediaProperty(uuid1=50397697, uuid2=1536, uuid3=0, uuid4={6,14,43,52,1,1,1,4}, definedName="Major Version", typeName="UInt16", optional=false, uniqueIdentifier=false, pid=0, symbol="MajorVersion") @UInt16 public short getMajorVersion()
PartitionPackReturns 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.
getMajorVersion in interface PartitionPackPartitionPack.MAJORVERSION_DEFAULT,
PartitionPack.getMinorVersion()@MediaPropertySetter(value="Major Version") public void setMajorVersion(@UInt16 short majorVersion)
PartitionPackSets 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.
setMajorVersion in interface PartitionPackmajorVersion - Major version number of the MXF byte-level format.PartitionPack.MAJORVERSION_DEFAULT,
PartitionPack.setMinorVersion(short)@MediaProperty(uuid1=50397697, uuid2=1792, uuid3=0, uuid4={6,14,43,52,1,1,1,4}, definedName="Minor Version", typeName="UInt16", optional=false, uniqueIdentifier=false, pid=0, symbol="MinorVersion") @UInt16 public short getMinorVersion()
PartitionPackReturns the minor version number of the MXF byte-level format. Newer versions indicated by this number should be backward-compatible with previous versions.
getMinorVersion in interface PartitionPackPartitionPack.MINORVERSION_DEFAULT,
PartitionPack.getMajorVersion()@MediaPropertySetter(value="Minor Version") public void setMinorVersion(@UInt16 short minorVersion)
PartitionPackSets the minor version number of the MXF byte-level format. Newer versions indicated by this number should be backward-compatible with previous versions.
setMinorVersion in interface PartitionPackminorVersion - Minor version number of the MXF byte-level format.PartitionPack.MINORVERSION_DEFAULT,
PartitionPack.setMajorVersion(short)@MediaProperty(uuid1=50397697, uuid2=2304, uuid3=0, uuid4={6,14,43,52,1,1,1,4}, definedName="KAGSize", aliases="KAG Size", typeName="UInt32", optional=false, uniqueIdentifier=false, pid=0, symbol="KAGSize") @UInt32 public int getKagSize()
PartitionPackReturns the key alignment grid size for KLV data triplets in this partition.
getKagSize in interface PartitionPack@MediaPropertySetter(value="KAGSize") public void setKagSize(@UInt32 int kagSize)
PartitionPackSets the key alignment grid size for KLV data triplets in this partition.
setKagSize in interface PartitionPackkagSize - Key alignment grid size for KLV data triplets in this
partition.@MediaProperty(uuid1=101715971, uuid2=256, uuid3=0, uuid4={6,14,43,52,1,1,1,4}, definedName="ThisPartition", aliases="Current Number in Sequence", typeName="UInt64", optional=false, uniqueIdentifier=false, pid=0, symbol="ThisPartition") @UInt64 public long getThisPartition()
PartitionPackReturns the byte offset of this partition in the file.
getThisPartition in interface PartitionPackPartitionPack.getPreviousPartition(),
PartitionPack.getFooterPartition()@MediaPropertySetter(value="ThisPartition") public void setThisPartition(@UInt64 long thisPartition)
PartitionPackReturns the byte offset of this partition in the file.
setThisPartition in interface PartitionPackthisPartition - Byte offset of this partition in the file.PartitionPack.setPreviousPartition(long),
PartitionPack.setFooterPartition(long)@MediaProperty(uuid1=101715970, uuid2=256, uuid3=0, uuid4={6,14,43,52,1,1,1,4}, definedName="PreviousPartition", aliases="Previous Number in Sequence", typeName="UInt64", optional=false, uniqueIdentifier=false, pid=0, symbol="PreviousPartition") @UInt64 public long getPreviousPartition()
PartitionPackReturns the byte offset of the previous partition in the file.
getPreviousPartition in interface PartitionPackPartitionPack.PREVIOUSPARTITION_DEFAULT,
PartitionPack.getThisPartition(),
PartitionPack.getFooterPartition()@MediaPropertySetter(value="PreviousPartition") public void setPreviousPartition(@UInt64 long previousPartition)
PartitionPackSets the byte offset of the previous partition in the file to this one.
setPreviousPartition in interface PartitionPackpreviousPartition - byte offset of the previous partition in the file to this one.PartitionPack.PREVIOUSPARTITION_DEFAULT,
PartitionPack.setPreviousPartition(long),
PartitionPack.setThisPartition(long)@MediaProperty(uuid1=101715973, uuid2=256, uuid3=0, uuid4={6,14,43,52,1,1,1,4}, definedName="FooterPartition", aliases="Last Number in Sequence", typeName="UInt64", optional=false, uniqueIdentifier=false, pid=0, symbol="FooterPartition") @UInt64 public long getFooterPartition()
PartitionPackReturns the byte offset of the footer partition in the file.
getFooterPartition in interface PartitionPackPartitionPack.FOOTERPARTITION_DEFAULT,
PartitionPack.getThisPartition(),
PartitionPack.getPreviousPartition()@MediaPropertySetter(value="FooterPartition") public void setFooterPartition(@UInt64 long footerPartition)
PartitionPackSets the byte offset of the footer partition in the file.
setFooterPartition in interface PartitionPackfooterPartition - Byte offset of the footer partition in the file.PartitionPack.FOOTERPARTITION_DEFAULT,
PartitionPack.setThisPartition(long),
PartitionPack.setPreviousPartition(long)@MediaProperty(uuid1=67504385, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,4}, definedName="HeaderByteCount", aliases="Header Byte Count", typeName="UInt64", optional=false, uniqueIdentifier=false, pid=0, symbol="HeaderByteCount") @UInt64 public long getHeaderByteCount()
PartitionPackReturns 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.
getHeaderByteCount in interface PartitionPackPartitionPack.HEADERBYTECOUNT_DEFAULT@MediaPropertySetter(value="HeaderByteCount") public void setHeaderByteCount(@UInt64 long headerByteCount)
PartitionPackSets 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.
setHeaderByteCount in interface PartitionPackheaderByteCount - Number of bytes used for header metadata
in this partition.PartitionPack.HEADERBYTECOUNT_DEFAULT,
PartitionPack.setIndexByteCount(long)@MediaProperty(uuid1=67504386, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,4}, definedName="IndexByteCount", aliases="Index Byte Count", typeName="UInt64", optional=false, uniqueIdentifier=false, pid=0, symbol="IndexByteCount") @UInt64 public long getIndexByteCount()
PartitionPackReturns 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.
getIndexByteCount in interface PartitionPackPartitionPack.INDEXBYTECOUNT_DEFAULT,
PartitionPack.getHeaderByteCount(),
PartitionPack.getIndexSID()@MediaPropertySetter(value="IndexByteCount") public void setIndexByteCount(@UInt64 long indexByteCount)
PartitionPackSets 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.
setIndexByteCount in interface PartitionPackindexByteCount - Number of bytes used for header metadata
in this partition.PartitionPack.INDEXBYTECOUNT_DEFAULT,
PartitionPack.setHeaderByteCount(long)@MediaProperty(uuid1=16974853, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,4}, definedName="IndexSID", aliases="Index Stream ID", typeName="UInt32", optional=false, uniqueIdentifier=false, pid=0, symbol="IndexSID") @UInt32 public int getIndexSID()
PartitionPackReturns the identifier of index table segments in this partition. A value of zero indicates that no index table data is present for this partition.
getIndexSID in interface PartitionPackPartitionPack.INDEXSID_DEFAULT,
PartitionPack.getIndexByteCount()@MediaPropertySetter(value="IndexSID") public void setIndexSID(int indexSID)
PartitionPackSets the identifier of index table segments in this partition. A value of zero indicates that no index table data is present for this partition.
setIndexSID in interface PartitionPackindexSID - Identifier of index table segments in
this partition.PartitionPack.INDEXSID_DEFAULT,
PartitionPack.setIndexByteCount(long)@MediaProperty(uuid1=101187842, uuid2=259, uuid3=0, uuid4={6,14,43,52,1,1,1,4}, definedName="BodyOffset", aliases="Stream Position Indicator", typeName="UInt64", optional=false, uniqueIdentifier=false, pid=0, symbol="BodyOffset") @UInt64 public long getBodyOffset()
PartitionPackReturns the byte offset to the essence container in this partition from the start of the partition pack.
getBodyOffset in interface PartitionPackPartitionPack.getBodySID()@MediaPropertySetter(value="BodyOffset") public void setBodyOffset(@UInt64 long bodyOffset)
PartitionPackSets byte offset to the essence container in this partition from the start of the partition pack.
setBodyOffset in interface PartitionPackbodyOffset - Byte offset to the essence container in this partition
from the start of the partition pack.PartitionPack.setBodySID(int)@MediaProperty(uuid1=16974852, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,4}, definedName="BodySID", aliases="Essence Stream ID", typeName="UInt32", optional=false, uniqueIdentifier=false, pid=0, symbol="BodySID") @UInt32 public int getBodySID()
PartitionPackReturns the identifier of the essence container in this partition. A value of zero indicates that no essence container data is present for this partition.
getBodySID in interface PartitionPackPartitionPack.BODYSID_DEFAULT,
PartitionPack.getIndexSID(),
PartitionPack.getBodyOffset()@MediaPropertySetter(value="BodySID") public void setBodySID(@UInt32 int bodySID)
PartitionPackSets the identifier of the essence container in this partition. A value of zero indicates that no essence container data is present for this partition.
setBodySID in interface PartitionPackbodySID - Identifier of the essence container in this partition.PartitionPack.BODYSID_DEFAULT,
PartitionPack.setIndexSID(int),
PartitionPack.setBodyOffset(long)@MediaProperty(uuid1=16908803, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,5}, definedName="Operational Pattern", typeName="AUID", optional=false, uniqueIdentifier=false, pid=0, symbol="OperationalPattern") public AUID getOperationalPattern()
PartitionPackReturns the operational pattern of the MXF file.
getOperationalPattern in interface PartitionPackPreface.getOperationalPattern(),
OperationalPatternConstant@MediaPropertySetter(value="Operational Pattern") public void setOperationalPattern(AUID operationalPattern)
PartitionPackSets the operational pattern of the MXF file containing this partition.
setOperationalPattern in interface PartitionPackoperationalPattern - Operational pattern of the MXF file.Preface.setOperationalPattern(AUID),
OperationalPatternConstant@MediaProperty(uuid1=16908816, uuid2=513, uuid3=0, uuid4={6,14,43,52,1,1,1,5}, definedName="EssenceContainers", typeName="AUIDSet", optional=false, uniqueIdentifier=false, pid=0, symbol="EssenceContainers") public Set<AUID> getEssenceContainers()
PartitionPackReturns a set of identifiers for the kinds of essence found in or referenced by the MXF file containing this partition.
getEssenceContainers in interface PartitionPackPartitionPack.addEssenceContainer(AUID),
Preface.getEssenceContainers(),
ContainerConstant,
ContainerDefinition@MediaPropertySetter(value="EssenceContainers") public void setEssenceContainers(Set<AUID> essenceContainers)
PartitionPackSets a set of identifiers for the kinds of essence found in or referenced by the MXF file containing this partition.
setEssenceContainers in interface PartitionPackessenceContainers - Set of identifiers for the kinds of essence found in or referenced
by the MXF file.PartitionPack.addEssenceContainer(AUID),
Preface.getEssenceContainers(),
ContainerConstant,
ContainerDefinition@MediaSetAdd(value="EssenceContainer") public void addEssenceContainer(AUID essenceContainerID) throws NullPointerException
PartitionPackAdd an identifier for the kinds of essence found in or referenced by the MXF file containing this partition.
addEssenceContainer in interface PartitionPackessenceContainerID - 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.PartitionPack.getEssenceContainers(),
Preface.getEssenceContainers(),
ContainerConstant,
ContainerDefinitionpublic String[] getPackOrder()
FixedLengthPackReturns a list of property names in the order they need to be serialized to a stream.
getPackOrder in interface FixedLengthPackMXFBuilder.readFixedLengthPack(tv.amwa.maj.record.AUID, java.nio.ByteBuffer),
MXFBuilder.writeFixedLengthPack(FixedLengthPack, java.nio.ByteBuffer)public long getPaddingFillSize()
PaddedReturns the number of padding bytes following a significant entry in a partition, such as a partition pack or index table.
getPaddingFillSize in interface Paddedpublic int getEncodedSize()
PartitionPackCalculates the number of bytes it will take to encode this partition pack.
getEncodedSize in interface PartitionPackpublic void setPaddingFillSize(long paddingFillSize)
throws IllegalArgumentException
PaddedSet the amount of padding to include after each significant entry in the partition, allowing space for the metadata to expand over time.
setPaddingFillSize in interface PaddedpaddingFillSize - Size of padding to include after the partition.IllegalArgumentException - Cannot set the padding size to a negative value.Partition.setPartitionPackPadding(long)public PartitionPack clone()
PartitionPackCreate a cloned copy of this partition pack.
clone in interface PartitionPackclone in class Objectpublic static final PartitionPack readPartitionPack(MXFFileImpl material) throws EndOfDataException
EndOfDataExceptionpublic static final short initializeMajorVersion()
public static final short initializeMinorVersion()
public static final int initializeKAGSize()
public static final long initializeThisPartition()
public static final long initializePreviousPartition()
public static final long initializeFooterPartition()
public static final long initializeHeaderByteCount()
public static final long initializeIndexByteCount()
public static final int initializeIndexSID()
public static final long initializeBodyOffset()
public static final int initializeBodySID()
public static final AUID initializeOperationalPattern()
(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.