|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tv.amwa.maj.entity.InterchangeObject tv.amwa.maj.entity.DefinitionObject tv.amwa.maj.entity.CodecDefinition
@AAFClass(uuid1=218169601, uuid2=257, uuid3=7936, uuid4={6,14,43,52,2,6,1,1}, definedName="CodecDefinition", description="The CodecDefinition specifies an essence codec.") public class CodecDefinition
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.
THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.
Nested Class Summary | |
---|---|
static class |
CodecDefinition.DataDefinitionHandler
|
static class |
CodecDefinition.XMLHandler
|
Nested classes/interfaces inherited from class tv.amwa.maj.entity.DefinitionObject |
---|
DefinitionObject.DefinitionObjectXMLHandler |
Nested classes/interfaces inherited from class tv.amwa.maj.entity.InterchangeObject |
---|
InterchangeObject.InterchangeObjectXMLHandler |
Field Summary |
---|
Fields inherited from interface tv.amwa.maj.constant.CodecConstant |
---|
AIFC, CDCI, JPEG, None, PCM, RGBA, WAVE |
Constructor Summary | |
---|---|
CodecDefinition(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. |
Method Summary | |
---|---|
void |
addEssenceKind(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 |
appendXMLChildren(Node parent)
Append child elements to the given parent node to serialize the value of an object to an XML fragment. |
boolean |
areThereFlavours()
Find out whether the optional codec flavours property is present for the defined codec. |
CodecDefinition |
clone()
Creates a cloned copy of this entity. |
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 |
forIdentification(AUID identification)
|
static CodecDefinition |
forName(String codecName)
|
Set<AUID> |
getCodecFlavours()
Returns null in this implementation. |
Set<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 |
getLocalizedUID()
|
boolean |
isEssenceKindSupported(DataDefinition essenceKind)
Returns true if the given codec supports transfers to essence
of the given essence kind. |
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 |
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. |
void |
setPropertiesFromInterface(CodecDefinition castFrom)
|
Methods inherited from class tv.amwa.maj.entity.DefinitionObject |
---|
equals, getAUID, getDescription, getName, hashCode, setDescription, setLocalizedUID, setName |
Methods inherited from class tv.amwa.maj.entity.InterchangeObject |
---|
castFromInterface, countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, registerImplementation, setPropertiesFromInterface, setPropertyValue, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface tv.amwa.maj.iface.DefinitionObject |
---|
getAUID, getDescription, getName, setDescription, setName |
Methods inherited from interface tv.amwa.maj.iface.InterchangeObject |
---|
countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, setPropertyValue |
Methods inherited from interface tv.amwa.maj.entity.MAJCommon |
---|
equals, hashCode, toString |
Constructor Detail |
---|
public CodecDefinition(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.Method Detail |
---|
public static final int registerCodecsFromClass(Class<?> classWithCodecs) throws NullPointerException
NullPointerException
public static final boolean registerCodecDefinition(CodecDefinition definedCodec) throws NullPointerException
NullPointerException
public static final CodecDefinition forName(String codecName) throws NullPointerException
NullPointerException
public static final CodecDefinition forIdentification(AUID identification) throws NullPointerException
NullPointerException
public final void setPropertiesFromInterface(CodecDefinition castFrom)
InterchangeObject.setPropertiesFromInterface(tv.amwa.maj.iface.InterchangeObject)
public void addEssenceKind(DataDefinition essenceKind) throws NullPointerException, DuplicateEssenceKindException
CodecDefinition
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. The content of the list is dependent upon the specified format for the codec, not on whether an implementation is implements all parts of the format.
addEssenceKind
in interface CodecDefinition
essenceKind
- The essence kind to append.
NullPointerException
- The given essence kind is null
.
DuplicateEssenceKindException
- The given essence kind is already
contained.DataDefinitionConstant
public boolean areThereFlavours()
CodecDefinition
Find out whether the optional codec flavours property is present for the defined codec. Flavours are used when a single codec can support multiple formats. An example would be a codec which would accept a "resolution id" for a particular manufacturer and set up all of the parameters. When a new resolution id is released, then a new codec plugin would give users the ability to use the new resolutions without upgrading the application.
areThereFlavours
in interface CodecDefinition
public int countEssenceKinds()
CodecDefinition
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.
countEssenceKinds
in interface CodecDefinition
public Set<AUID> getCodecFlavours()
Returns null
in this implementation.
getCodecFlavours
in interface CodecDefinition
CodecDefinition.getCodecFlavours()
@AAFProperty(uuid1=100729092, uuid2=769, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="DataDefinitions", typeName="WeakReferenceSet of DataDefinition", optional=false, uniqueIdentifier=false, pid=8962) public Set<DataDefinition> getEssenceKinds()
CodecDefinition
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.
getEssenceKinds
in interface CodecDefinition
DataDefinitionConstant
@AAFProperty(uuid1=100729092, uuid2=263, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="FileDescriptorClass", typeName="WeakReference to ClassDefinition", optional=false, uniqueIdentifier=false, pid=8961) public ClassDefinition getFileDescriptorClass()
CodecDefinition
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.
getFileDescriptorClass
in interface CodecDefinition
FileDescriptor
that identifies the essence format that the defined
codec processes.public void setFileDescriptorClass(ClassDefinition fileClass) throws NullPointerException, IllegalArgumentException
CodecDefinition
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.
setFileDescriptorClass
in interface CodecDefinition
fileClass
- 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
.CodecConstant
public boolean isEssenceKindSupported(DataDefinition essenceKind) throws NullPointerException
CodecDefinition
Returns true
if the given codec supports transfers to essence
of the given essence kind.
isEssenceKindSupported
in interface CodecDefinition
essenceKind
- The essence kind to test.
NullPointerException
- The given essence kind is null
.DataDefinitionConstant
,
AAFFactory.dataDefinitionForName(String)
public void removeEssenceKind(DataDefinition essenceKind) throws NullPointerException, ObjectNotFoundException, IllegalArgumentException
CodecDefinition
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.
removeEssenceKind
in interface CodecDefinition
essenceKind
- 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.DataDefinitionConstant
public CodecDefinition clone()
MAJCommon
Creates a cloned copy of this entity. The clone will be initialized to have the same value as this value but exists independently from then on. Changes to this value will not effect the clone and changes to the clone will not effect this. MAJ API clones are true deep clones with no shared references to areas of memory within the original.
This method does not throw a CloneNotSupportedException
as all
entity values must implement the Cloneable
interface. If a cloning
error does occur, a null
value will be returned but this is very unlikely
to happen.
clone
in interface MAJCommon
clone
in class DefinitionObject
Object.clone()
public String getLocalizedUID()
getLocalizedUID
in class DefinitionObject
public void appendXMLChildren(Node parent)
XMLSerializable
Append child elements to the given parent node to serialize the value of an object
to an XML fragment. Methods of the XMLBuilder
class are provided to help with this
process.
appendXMLChildren
in interface XMLSerializable
appendXMLChildren
in class DefinitionObject
parent
- XML parent element to append child nodes to.
|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |