@MediaClass(uuid1=218169857, uuid2=261, uuid3=256, uuid4={6,14,43,52,2,5,1,1}, definedName="PrimerPack", description="Table of local 2-byte tags mapped to defined identifiers.", symbol="PrimerPack", namespace="http://www.smpte-ra.org/rp210", prefix="mxf") public class PrimerPackImpl extends Object implements MetadataObject, FixedLengthPack, PrimerPack
| Constructor and Description |
|---|
PrimerPackImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLocalTagEntry(LocalTagEntry localTagEntry)
Create a cloned copy of this PrimerPackImpl.
|
void |
addLocalTagEntry(PropertyDefinition propertyDefinition)
Add a local tag entry based on the given property definition,
based on its local identification
and globally unique identification.
|
void |
addLocalTagEntry(short localTag,
AUID uid)
Create a cloned copy of this PrimerPackImpl.
|
static long |
addPropertiesForObject(PrimerPack primerPack,
MetadataObject mdObject) |
void |
clearLocalTagEntries()
Create a cloned copy of this PrimerPackImpl.
|
PrimerPack |
clone()
Create a cloned copy of this primer pack.
|
int |
countLocalTagEntries()
Create a cloned copy of this PrimerPackImpl.
|
static PrimerPack |
createFromBytes(ByteBuffer buffer) |
static PrimerPack |
createFromPreface(Preface preface) |
Set<LocalTagEntry> |
getLocalTagEntryBatch()
Create a cloned copy of this PrimerPackImpl.
|
short |
getNextLocalCounter() |
String[] |
getPackOrder()
Returns a list of property names in the order they need to be serialized
to a stream.
|
boolean |
isLocalTagEntryPresent(LocalTagEntry localTagEntry)
Create a cloned copy of this PrimerPackImpl.
|
static int |
lengthAsBytes(PrimerPack primerPack) |
Short |
lookupLocalTag(AUID uid)
Lookup the given property identifier and find its local tag in the key-to-tag reverse
lookup table of this primer pack.
|
Short |
lookupLocalTag(PropertyDefinition propertyDefinition)
Lookup the given property's local tag in the key-to-tag reverse lookup table of
this primer pack.
|
AUID |
lookupUID(short localTag)
Lookup the given tag in the tag-to-key lookup table of this primer pack, returning
the given key or
null if the tag is not known. |
static void |
main(String[] args) |
String |
toString() |
static void |
writeAsBytes(PrimerPack primerPack,
ByteBuffer buffer) |
public static final String[] packOrder
@MediaProperty(uuid1=100729095, uuid2=5376, uuid3=0, uuid4={6,14,43,52,1,1,1,5}, definedName="LocalTagEntry Batch", aliases="Local Tag Entries", typeName="LocalTagEntryBatch", optional=false, uniqueIdentifier=false, pid=0, symbol="LocalTagEntryBatch") public Set<LocalTagEntry> getLocalTagEntryBatch()
Create a cloned copy of this PrimerPackImpl.
getLocalTagEntryBatch in interface PrimerPackTypeDefinitions.LocalTagEntryReference,
TypeDefinitions.LocalTagEntryBatch@MediaSetAdd(value="LocalTagEntry Batch") public void addLocalTagEntry(LocalTagEntry localTagEntry) throws NullPointerException
Create a cloned copy of this PrimerPackImpl.
addLocalTagEntry in interface PrimerPacklocalTagEntry - Local tag entry to add to the lookup table.NullPointerException - Cannot add a null local tag entry.PrimerPack.addLocalTagEntry(short, AUID),
PrimerPack.addLocalTagEntry(PropertyDefinition)public void addLocalTagEntry(@UInt16 short localTag, AUID uid)
Create a cloned copy of this PrimerPackImpl.
addLocalTagEntry in interface PrimerPacklocalTag - Tag to add to the lookup table.uid - Corresponding key to add to the lookup table.PrimerPack.addLocalTagEntry(LocalTagEntry),
PrimerPack.addLocalTagEntry(PropertyDefinition)@MediaPropertyCount(value="LocalTagEntry Batch") public int countLocalTagEntries()
Create a cloned copy of this PrimerPackImpl.
countLocalTagEntries in interface PrimerPack@MediaPropertyClear(value="LocalTagEntry Batch") public void clearLocalTagEntries()
Create a cloned copy of this PrimerPackImpl.
clearLocalTagEntries in interface PrimerPackpublic AUID lookupUID(@UInt16 short localTag)
PrimerPackLookup the given tag in the tag-to-key lookup table of this primer pack, returning
the given key or null if the tag is not known.
lookupUID in interface PrimerPacklocalTag - Tag to find and resolve to a key in the lookup table.null if the tag is not
known.@MediaPropertyContains(value="LocalTagEntry Batch") public boolean isLocalTagEntryPresent(LocalTagEntry localTagEntry)
Create a cloned copy of this PrimerPackImpl.
isLocalTagEntryPresent in interface PrimerPacklocalTagEntry - Tag to check for.public 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 short getNextLocalCounter()
public void addLocalTagEntry(PropertyDefinition propertyDefinition) throws NullPointerException
PrimerPackAdd a local tag entry based on the given property definition, based on its local identification and globally unique identification. The two identifications add an entry to the tag-to-key lookup table that makes up this primer pack.
addLocalTagEntry in interface PrimerPackpropertyDefinition - Property definition to use to create an entry in the tag-to-key
lookup table.NullPointerException - Cannot use a null property definition.PrimerPack.addLocalTagEntry(LocalTagEntry),
PrimerPack.addLocalTagEntry(short, AUID)public Short lookupLocalTag(AUID uid) throws NullPointerException
PrimerPackLookup the given property identifier and find its local tag in the key-to-tag reverse lookup table of this primer pack.
lookupLocalTag in interface PrimerPackuid - Identifier to map to a local tag.null if the identifier is not recognized.NullPointerException - Cannot find a tag for a null value.PrimerPack.lookupLocalTag(PropertyDefinition)public Short lookupLocalTag(PropertyDefinition propertyDefinition) throws NullPointerException
PrimerPackLookup the given property's local tag in the key-to-tag reverse lookup table of this primer pack.
lookupLocalTag in interface PrimerPackpropertyDefinition - Definition to find the local tag for.null
if the property cannot be found.NullPointerException - Cannot find a tag for a null value.PrimerPack.addLocalTagEntry(PropertyDefinition),
PrimerPack.lookupLocalTag(AUID)public PrimerPack clone()
PrimerPackCreate a cloned copy of this primer pack.
clone in interface PrimerPackclone in class Objectpublic static final PrimerPack createFromBytes(ByteBuffer buffer) throws EndOfDataException
EndOfDataExceptionpublic static final int lengthAsBytes(PrimerPack primerPack) throws NullPointerException
NullPointerExceptionpublic static final void writeAsBytes(PrimerPack primerPack, ByteBuffer buffer) throws NullPointerException, InsufficientSpaceException
public static final PrimerPack createFromPreface(Preface preface) throws NullPointerException
NullPointerExceptionpublic static final long addPropertiesForObject(PrimerPack primerPack, MetadataObject mdObject) throws NullPointerException
NullPointerExceptionpublic static final void main(String[] args)
(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.