Media Authoring
with Java API

tv.amwa.maj.iface
Interface CodecDefinition

All Superinterfaces:
DefinitionObject, InterchangeObject
All Known Implementing Classes:
CodecDefinition

public interface CodecDefinition
extends DefinitionObject

Specifies 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.

Author:
Richard Cartwright
See Also:
CodecConstant, CodecFlavour, makeCodecDefinition(), CodecDefinition.forName(String), CodecDefinition.forIdentification(AUID), Dictionary.getCodecDefinitions()

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.
 boolean areThereFlavours()
          Find out whether the optional codec flavours property is present for the defined codec.
 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.
 Set<AUID> getCodecFlavours()
          Returns a list of supported codec flavours.
 Set<? extends 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.
 boolean isEssenceKindSupported(DataDefinition essenceKind)
          Returns true if the given codec supports transfers to essence of the given essence kind.
 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.
 
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
 

Method Detail

isEssenceKindSupported

@Bool
boolean isEssenceKindSupported(DataDefinition essenceKind)
                               throws NullPointerException

Returns true if the given codec supports transfers to essence of the given essence kind.

Parameters:
essenceKind - The essence kind to test.
Returns:
Is this essence kind supported by the codec?
Throws:
NullPointerException - The given essence kind is null.
See Also:
DataDefinitionConstant, AAFFactory.dataDefinitionForName(String)

addEssenceKind

void addEssenceKind(DataDefinition essenceKind)
                    throws NullPointerException,
                           DuplicateEssenceKindException

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.

Parameters:
essenceKind - The essence kind to append.
Throws:
NullPointerException - The given essence kind is null.
DuplicateEssenceKindException - The given essence kind is already contained.
See Also:
DataDefinitionConstant

removeEssenceKind

void removeEssenceKind(DataDefinition essenceKind)
                       throws NullPointerException,
                              ObjectNotFoundException,
                              IllegalArgumentException

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.

Parameters:
essenceKind - The essence kind to remove.
Throws:
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.
See Also:
DataDefinitionConstant

countEssenceKinds

@UInt32
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.

Returns:
The number of supported essence kinds.

getEssenceKinds

Set<? extends 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.

Returns:
Shallow copy of a set of the essence kinds that the defined codec processes.
See Also:
DataDefinitionConstant

areThereFlavours

@Bool
boolean areThereFlavours()

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.

Returns:
Are there any flavours?

getFileDescriptorClass

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.

Returns:
The class definition of the sub-class of FileDescriptor that identifies the essence format that the defined codec processes.

setFileDescriptorClass

void setFileDescriptorClass(ClassDefinition fileClass)
                            throws NullPointerException,
                                   IllegalArgumentException

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.

Parameters:
fileClass - Specifies the class definition of the sub-class of AAFFileDescriptor that identifies the essence format that the defined codec processes.
Throws:
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.
See Also:
CodecConstant

getCodecFlavours

Set<AUID> getCodecFlavours()

Returns a list of supported codec flavours.

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.

Returns:
List of supported codec flavours.
See Also:
CodecFlavour

Media Authoring
with Java API

(c) 2007-2008 Richard Cartwright, all rights reserved. Subject to the terms of the AAF SDK Public Source License.