@MediaClass(uuid1=218169601, uuid2=257, uuid3=7936, uuid4={6,14,43,52,2,6,1,1}, definedName="CodecDefinition", description="The CodecDefinition specifies an essence codec.", symbol="CodecDefinition") public class CodecDefinitionImpl extends DefinitionObjectImpl implements CodecDefinition, Serializable, CodecConstant, Cloneable
Implements the definition of an essence codec. A codec is a program or system capable of performing encoding and decoding on a digital data stream, which is often the case for the data streams represented by essence data in the MAJ API.
ObjectClassPropertyID| Constructor and Description |
|---|
CodecDefinitionImpl()
Default constructor is not public to avoid unset required fields.
|
CodecDefinitionImpl(AUID identification,
String name,
ClassDefinition fileDescriptorClass,
Set<DataDefinition> dataDefinitions)
Create and initialize all the fields of the codec definition object, which
specifies an essence codec.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendEssenceKind(DataDefinition essenceKind)
Appends the given essence kind to the list of those supported by the codec, which
specify the data definitions of the
essence formats that the defined codec processes.
|
void |
clearEssenceKinds()
Clears the list of essence kinds for this codec definition.
|
CodecDefinitionImpl |
clone()
Create a cloned copy of this interchange object.
|
static int |
count() |
int |
countEssenceKinds()
Returns the number of supported essence kinds of this codec
definition, which specify the data definitions of the
essence formats that the defined codec processes.
|
static CodecDefinition |
forAUID(AUID identification) |
static CodecDefinition |
forIdentification(AUID identification) |
static CodecDefinition |
forName(String codecName) |
Set<AUID> |
getCodecFlavours()
Returns
null in this implementation. |
DataDefinition |
getEssenceKindAt(int index)
Returns the essence kind at the given index in the list of supported essence
kinds of this codec.
|
List<DataDefinition> |
getEssenceKinds()
Returns a set of the essence kinds for the defined codec, which
specify the data definitions of the
essence formats that the defined codec processes.
|
ClassDefinition |
getFileDescriptorClass()
Returns the file descriptor class object associated with the
defined codec, which specifies the class definition of the sub-class
of file descriptor that identifies the essence format that the defined
codec processes.
|
String |
getWeakTargetReference()
Provides a name that can be used to make a weak object reference to an
instance of the implementing class.
|
static List<DataDefinition> |
initializeCodecDataDefinitions() |
static ClassDefinition |
initializeFileDescriptorClass() |
void |
insertEssenceKind(int index,
DataDefinition essenceKind)
Inserts the given essence kind to the list of those supported by the codec at the given
index.
|
static Collection<String> |
inventory() |
boolean |
isEssenceKindSupported(DataDefinition essenceKind)
Returns
true if the given codec supports transfers to essence
of the given essence kind. |
void |
prependEssenceKind(DataDefinition essenceKind)
Prepends the given essence kind to the list of those supported by the codec, which
specify the data definitions of the
essence formats that the defined codec processes.
|
static boolean |
registerCodecDefinition(CodecDefinition definedCodec) |
static int |
registerCodecsFromClass(Class<?> classWithCodecs) |
void |
removeEssenceKind(DataDefinition essenceKind)
Removes the given essence kind from the list of those supported
by the codec, which specify the data definitions of the
essence formats that the defined codec processes.
|
void |
removeEssenceKindAt(int index)
Removes the essence kind at the given index in the list of essence kinds
for this codec definition.
|
void |
setFileDescriptorClass(ClassDefinition fileClass)
Sets the file descriptor class associated with this codec, which specifies
the class definition of the sub-class of
FileDescriptor that identifies the essence format
that the defined codec processes. |
getAUID, getDefinitionObjectIdentificationString, getDescription, getLocalizedUID, getName, initializeDefinitionObjectIdentification, initializeDefinitionObjectName, setAUID, setDefinitionObjectIdentificationString, setDescription, setLocalizedUID, setNameaddApplicationPlugin, appendXMLChildren, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getComment, getGeneration, getLinkedGenerationID, getLinkedGenerationIDString, getObjectClass, getPersistentID, getPersistentIndex, hashCode, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setLinkedGenerationIDString, setObjectClass, setPersistentID, setPersistentIndex, toStringgetAUID, getDescription, getName, setDescription, setNameaddApplicationPlugin, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getObjectClass, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setObjectClass, toStringgetPersistentID, setPersistentIndexpublic CodecDefinitionImpl()
public CodecDefinitionImpl(AUID identification, @AAFString String name, ClassDefinition fileDescriptorClass, Set<DataDefinition> dataDefinitions) throws NullPointerException, IllegalArgumentException
Create and initialize all the fields of the codec definition object, which
specifies an essence codec. The set of data definitions for essence kinds processed
by the codec must contain at least one item, otherwise an IllegalArgumentException
will be thrown.
identification - Unique identifier for new codec definition.name - Display name for the new codec definition.fileDescriptorClass - Class definition of the sub-class of file descriptor that identifies
the essence format that this codec processes.dataDefinitions - Data definitions of the essence formats that the new codec processes.NullPointerException - One or more of the arguments is null.IllegalArgumentException - Cannot crate a codec definition with and empty
set of data definitions.public static final int registerCodecsFromClass(Class<?> classWithCodecs) throws NullPointerException
NullPointerExceptionpublic static final boolean registerCodecDefinition(CodecDefinition definedCodec) throws NullPointerException
NullPointerExceptionpublic static final CodecDefinition forName(String codecName) throws NullPointerException
NullPointerExceptionpublic static final CodecDefinition forIdentification(AUID identification) throws NullPointerException
NullPointerExceptionpublic static final CodecDefinition forAUID(AUID identification) throws NullPointerException
NullPointerExceptionpublic static final Collection<String> inventory()
public static final int count()
@MediaListAppend(value="CodecDataDefinitions") public void appendEssenceKind(DataDefinition essenceKind) throws NullPointerException, DuplicateEssenceKindException
CodecDefinitionAppends the given essence kind to the list of those supported by the codec, which specify the data definitions of the essence formats that the defined codec processes. The content of the list is dependent upon the specified format for the codec, not on whether an implementation supports all parts of the format.
appendEssenceKind in interface CodecDefinitionessenceKind - The essence kind to append.NullPointerException - The given essence kind is null.DuplicateEssenceKindException - The given essence kind is already
contained.CodecDefinition.prependEssenceKind(DataDefinition),
CodecDefinition.insertEssenceKind(int, DataDefinition),
DataDefinitionConstant@MediaPropertyCount(value="CodecDataDefinitions") public int countEssenceKinds()
CodecDefinitionReturns the number of supported essence kinds of this codec definition, which specify the data definitions of the essence formats that the defined codec processes.
countEssenceKinds in interface CodecDefinitionpublic Set<AUID> getCodecFlavours()
Returns null in this implementation.
tv.amwa.maj.model.CodecDefinition#getCodecFlavours()@MediaProperty(uuid1=100729092, uuid2=769, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="CodecDataDefinitions", aliases={"DataDefinitions","CodecDefinitionDataDefinitions"}, typeName="DataDefinitionWeakReferenceVector", optional=false, uniqueIdentifier=false, pid=8962, symbol="CodecDataDefinitions") public List<DataDefinition> getEssenceKinds()
CodecDefinitionReturns a set of the essence kinds for the defined codec, which specify the data definitions of the essence formats that the defined codec processes.
getEssenceKinds in interface CodecDefinitionCodecDefinition.getEssenceKindAt(int),
DataDefinitionConstant,
TypeDefinitions.DataDefinitionWeakReferenceSet,
TypeDefinitions.DataDefinitionWeakReferenceVectorpublic static final List<DataDefinition> initializeCodecDataDefinitions()
@MediaProperty(uuid1=100729092, uuid2=263, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="FileDescriptorClass", typeName="ClassDefinitionWeakReference", optional=false, uniqueIdentifier=false, pid=8961, symbol="FileDescriptorClass") public ClassDefinition getFileDescriptorClass()
CodecDefinitionReturns the file descriptor class object associated with the defined codec, which specifies the class definition of the sub-class of file descriptor that identifies the essence format that the defined codec processes.
getFileDescriptorClass in interface CodecDefinitionFileDescriptor that identifies the essence format that the defined
codec processes.@MediaPropertySetter(value="FileDescriptorClass") public void setFileDescriptorClass(ClassDefinition fileClass) throws NullPointerException, IllegalArgumentException
CodecDefinitionSets the file descriptor class associated with this codec, which specifies
the class definition of the sub-class of
FileDescriptor that identifies the essence format
that the defined codec processes.
setFileDescriptorClass in interface CodecDefinitionfileClass - Specifies the class definition of the sub-class
of AAFFileDescriptor that identifies the essence format that the defined
codec processes.NullPointerException - The given class definition for a sub-class of file descriptor
is null.IllegalArgumentException - The given class definition is not for a sub-class of
FileDescriptor.CodecConstantpublic static final ClassDefinition initializeFileDescriptorClass()
@MediaPropertyContains(value="CodecDataDefinitions") public boolean isEssenceKindSupported(DataDefinition essenceKind) throws NullPointerException
CodecDefinitionReturns true if the given codec supports transfers to essence
of the given essence kind.
isEssenceKindSupported in interface CodecDefinitionessenceKind - The essence kind to test.NullPointerException - The given essence kind is null.DataDefinitionConstant@MediaPropertyRemove(value="CodecDataDefinitions") public void removeEssenceKind(DataDefinition essenceKind) throws NullPointerException, ObjectNotFoundException, IllegalArgumentException
CodecDefinitionRemoves the given essence kind from the list of those supported by the codec, which specify the data definitions of the essence formats that the defined codec processes.
removeEssenceKind in interface CodecDefinitionessenceKind - The essence kind to remove.NullPointerException - Argument is null.ObjectNotFoundException - The given kind of essence is not already
contained.IllegalArgumentException - Cannot remove an item from the set if it
will become empty.CodecDefinition.removeEssenceKindAt(int),
DataDefinitionConstant@MediaPropertyClear(value="CodecDataDefinitions") public void clearEssenceKinds()
CodecDefinitionClears the list of essence kinds for this codec definition. Note that the list of essence kinds is a required property and so a call to this method should be followed by a call to add another essence kind.
clearEssenceKinds in interface CodecDefinitionpublic CodecDefinitionImpl clone()
InterchangeObjectCreate a cloned copy of this interchange object.
clone in interface MediaEntityclone in interface CodecDefinitionclone in interface DefinitionObjectclone in interface InterchangeObjectclone in class DefinitionObjectImplpublic String getWeakTargetReference()
WeakReferenceTargetProvides a name that can be used to make a weak object reference to an instance of the implementing class.
getWeakTargetReference in interface WeakReferenceTargetgetWeakTargetReference in class DefinitionObjectImpl@MediaListGetAt(value="CodecDataDefinitions") public DataDefinition getEssenceKindAt(int index) throws IndexOutOfBoundsException
CodecDefinitionReturns the essence kind at the given index in the list of supported essence kinds of this codec.
getEssenceKindAt in interface CodecDefinitionindex - Index of the essence kind to retrieve.IndexOutOfBoundsException - The given index is outside the acceptable range for the
current list of supported essence kinds.CodecDefinition.getEssenceKinds()@MediaListInsertAt(value="CodecDataDefinitions") public void insertEssenceKind(int index, DataDefinition essenceKind) throws NullPointerException, DuplicateEssenceKindException, IndexOutOfBoundsException
CodecDefinitionInserts the given essence kind to the list of those supported by the codec at the given index. Essence kinds specify the data definitions of the essence formats that the defined codec processes. The content of the list is dependent upon the specified format for the codec, not on whether an implementation supports all parts of the format.
insertEssenceKind in interface CodecDefinitionindex - Index in the list where the essence kind is to be inserted.essenceKind - The essence kind to insert.NullPointerException - The given essence kind is null.DuplicateEssenceKindException - The given essence kind is already
contained.IndexOutOfBoundsException - The given index is outside the acceptable range for the
current list of supported essence kinds.CodecDefinition.appendEssenceKind(DataDefinition),
CodecDefinition.prependEssenceKind(DataDefinition),
DataDefinitionConstant@MediaListPrepend(value="CodecDataDefinitions") public void prependEssenceKind(DataDefinition essenceKind) throws NullPointerException, DuplicateEssenceKindException
CodecDefinitionPrepends the given essence kind to the list of those supported by the codec, which specify the data definitions of the essence formats that the defined codec processes. The content of the list is dependent upon the specified format for the codec, not on whether an implementation supports all parts of the format.
prependEssenceKind in interface CodecDefinitionessenceKind - The essence kind to prepend.NullPointerException - The given essence kind is null.DuplicateEssenceKindException - The given essence kind is already
contained.CodecDefinition.appendEssenceKind(DataDefinition),
CodecDefinition.insertEssenceKind(int, DataDefinition),
DataDefinitionConstant@MediaListRemoveAt(value="CodecDataDefinitions") public void removeEssenceKindAt(int index) throws IndexOutOfBoundsException
CodecDefinitionRemoves the essence kind at the given index in the list of essence kinds for this codec definition.
removeEssenceKindAt in interface CodecDefinitionindex - Index of the essence kind to remove.IndexOutOfBoundsException - The given index is outside the acceptable range for the
current list of supported essence kinds.CodecDefinition.removeEssenceKind(DataDefinition)(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.