Media Authoring
with Java API

tv.amwa.maj.entity
Class SoundDescriptor

java.lang.Object
  extended by tv.amwa.maj.entity.InterchangeObject
      extended by tv.amwa.maj.entity.EssenceDescriptor
          extended by tv.amwa.maj.entity.AAFFileDescriptor
              extended by tv.amwa.maj.entity.SoundDescriptor
All Implemented Interfaces:
Serializable, Cloneable, MAJCommon, AAFFileDescriptor, EssenceDescriptor, InterchangeObject, SoundDescriptor, XMLSerializable
Direct Known Subclasses:
PCMDescriptor

@AAFClass(uuid1=218169601,
          uuid2=257,
          uuid3=16896,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="SoundDescriptor",
          description="The SoundDescriptor class specifies that a File SourceMob is associated with audio essence.")
public class SoundDescriptor
extends AAFFileDescriptor
implements SoundDescriptor, Serializable, Cloneable, MAJCommon

Implements the description of a file source mob that is associated with audio essence.

THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.

Author:
Richard Cartwright
See Also:
Serialized Form

Nested Class Summary
static class SoundDescriptor.XMLHandler
           
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.AAFFileDescriptor
AAFFileDescriptor.FileDescriptorXMLHandler
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.EssenceDescriptor
EssenceDescriptor.EssenceDescriptorXMLHandler, EssenceDescriptor.LocatorXMLHandler, EssenceDescriptor.SubDescriptorXMLHandler
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.InterchangeObject
InterchangeObject.InterchangeObjectXMLHandler
 
Field Summary
static String SOUNDDESCRIPTOR_TAG
           
 
Fields inherited from class tv.amwa.maj.entity.AAFFileDescriptor
FILEDESCRIPTOR_ITEM
 
Fields inherited from class tv.amwa.maj.entity.EssenceDescriptor
ESSENCEDESCRIPTOR_ITEM
 
Constructor Summary
SoundDescriptor(ContainerDefinition containerFormat, Rational audioSamplingRate, int channels, int quantizationBits)
          Creates and initializes a new sound descriptor, which specifies that a file source mob is associated with audio essence.
 
Method Summary
 void appendXMLChildren(Node parent)
          Append child elements to the given parent node to serialize the value of an object to an XML fragment.
 SoundDescriptor clone()
          Creates a cloned copy of this entity.
 boolean equals(Object o)
          Tests to see if the given object is equal to this interchange object.
 byte getAudioRefLevel()
          Returns the audio reference level of this sound descriptor.
 Rational getAudioSamplingRate()
          Returns the audio sampling rate of audio essence described by this sound descriptor.
 int getChannelCount()
          Returns the number of audio channels described by this sound descriptor.
 AUID getCompression()
          Returns he kind of compression and format of compression information of this sound essence data.
 byte getDialNorm()
          Returns the dial norm property of this sound descriptor, which specifies the gain to be applied to normalize perceived loudness of the sound, as defined by ITU-R Recommendation BS.1196 (1dB per step).
 ElectroSpatialFormulation getElectroSpatialFormulation()
          Returns the electro-spatial formulation of the signal described by this sound descriptor.
 boolean getIsLocked()
           
 int getQuantizationBits()
          Returns the number of quantization bits used for the audio essence described by this sound descriptor.
 int hashCode()
          Returns a hash code value for this interchange object.
 boolean isLocked()
          Returns the locked flag for the audio essence described by this sound descriptor, which indicates whether the number of samples per frame is locked.
 void setAudioRefLevel(Byte level)
          Sets the audio reference level of the audio essence described by this sound descriptor.
 void setAudioSamplingRate(Rational rate)
          Sets the audio sampling rate of audio essence described by this sound descriptor.
 void setChannelCount(int channelCount)
          Sets the number of audio channels described by this sound descriptor.
 void setCompression(AUID compression)
          Sets the kind of compression and format of compression information of this sound essence data.
 void setDialNorm(Byte dialNorm)
          Sets the dial norm of this sound descriptor, which specifies the gain to be applied to normalize perceived loudness of the sound, as defined by ITU-R Recommendation BS.1196 (1dB per step).
 void setElectroSpatialFormulation(ElectroSpatialFormulation formulation)
          Sets the electro-spatial formulation of the signal of the audio essence described by this sound descriptor.
 void setIsLocked(Boolean locked)
          Sets the locked flag for the audio essence described this sound descriptor, which indicates whether the number of samples per frame is locked.
 void setPropertiesFromInterface(SoundDescriptor castFrom)
           
 void setQuantizationBits(int bitsCount)
          Sets the number of quantization bits used for the audio essence described by this sound descriptor.
 
Methods inherited from class tv.amwa.maj.entity.AAFFileDescriptor
describesStaticEssence, getCodecDefinition, getContainerFormat, getLength, getLinkedSlotID, getSampleRate, setCodecDefinition, setContainerFormat, setDescribesStaticEssence, setDescribesTimeVaryingEssence, setLength, setLinkedSlotID, setPropertiesFromInterface, setSampleRate
 
Methods inherited from class tv.amwa.maj.entity.EssenceDescriptor
appendLocator, appendSubDescriptor, countLocators, countSubDescriptors, getLocatorAt, getLocators, getSubDescriptorAt, getSubDescriptors, insertLocatorAt, insertSubDescriptorAt, prependLocator, prependSubDescriptor, removeLocatorAt, removeSubDescriptorAt, setPropertiesFromInterface
 
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, wait, wait, wait
 
Methods inherited from interface tv.amwa.maj.iface.AAFFileDescriptor
getCodecDefinition, getContainerFormat, getLength, getLinkedSlotID, getSampleRate, setCodecDefinition, setContainerFormat, setLength, setLinkedSlotID, setSampleRate
 
Methods inherited from interface tv.amwa.maj.iface.EssenceDescriptor
appendLocator, appendSubDescriptor, countLocators, countSubDescriptors, getLocatorAt, getLocators, getSubDescriptorAt, getSubDescriptors, insertLocatorAt, insertSubDescriptorAt, prependLocator, prependSubDescriptor, removeLocatorAt, removeSubDescriptorAt
 
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
toString
 

Field Detail

SOUNDDESCRIPTOR_TAG

public static final String SOUNDDESCRIPTOR_TAG
See Also:
Constant Field Values
Constructor Detail

SoundDescriptor

public SoundDescriptor(ContainerDefinition containerFormat,
                       Rational audioSamplingRate,
                       @UInt32
                       int channels,
                       @UInt32
                       int quantizationBits)
                throws NullPointerException,
                       IllegalArgumentException

Creates and initializes a new sound descriptor, which specifies that a file source mob is associated with audio essence.

Parameters:
containerFormat - Identifies the container mechanism used to store the essence.
audioSamplingRate - Sampling rate of the audio essence.
channels - Number of audio channels.
quantizationBits - Number of quantization bits.
Throws:
NullPointerException - One or both of the container format and/or sampling rate is null.
IllegalArgumentException - The channels and/or quantization bit values are negative.
Method Detail

setPropertiesFromInterface

public final void setPropertiesFromInterface(SoundDescriptor castFrom)
See Also:
InterchangeObject.setPropertiesFromInterface(tv.amwa.maj.iface.InterchangeObject)

getAudioRefLevel

@AAFProperty(uuid1=67240193,
             uuid2=768,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,1},
             definedName="AudioRefLevel",
             typeName="Int8",
             optional=true,
             uniqueIdentifier=false,
             pid=15620)
public byte getAudioRefLevel()
                      throws PropertyNotPresentException
Description copied from interface: SoundDescriptor

Returns the audio reference level of this sound descriptor. This specifies the number of dBm for 0VU. This property is optional.

Specified by:
getAudioRefLevel in interface SoundDescriptor
Returns:
Audio reference level property of this sound descriptor.
Throws:
PropertyNotPresentException - The optional audio reference level property is not present in this sound descriptor.

setAudioRefLevel

public void setAudioRefLevel(Byte level)
Description copied from interface: SoundDescriptor

Sets the audio reference level of the audio essence described by this sound descriptor. This property specifies the number of dBm for 0VU. Set this optional property to null to omit it.

Specified by:
setAudioRefLevel in interface SoundDescriptor
Parameters:
level - Audio reference level property of this sound descriptor.

getAudioSamplingRate

@AAFProperty(uuid1=67240705,
             uuid2=257,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,5},
             definedName="AudioSamplingRate",
             typeName="Rational",
             optional=false,
             uniqueIdentifier=false,
             pid=15619)
public Rational getAudioSamplingRate()
Description copied from interface: SoundDescriptor

Returns the audio sampling rate of audio essence described by this sound descriptor.

Specified by:
getAudioSamplingRate in interface SoundDescriptor
Returns:
Audio sampling rate of audio essence described by this sound descriptor.

setAudioSamplingRate

public void setAudioSamplingRate(Rational rate)
                          throws NullPointerException
Description copied from interface: SoundDescriptor

Sets the audio sampling rate of audio essence described by this sound descriptor.

Specified by:
setAudioSamplingRate in interface SoundDescriptor
Parameters:
rate - Audio sampling rate of the audio essence described by this sound descriptor.
Throws:
NullPointerException - The given audio sampling rate is null.

getChannelCount

@AAFProperty(uuid1=67240193,
             uuid2=1024,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,5},
             definedName="Channels",
             typeName="UInt32",
             optional=false,
             uniqueIdentifier=false,
             pid=15623)
public int getChannelCount()
Description copied from interface: SoundDescriptor

Returns the number of audio channels described by this sound descriptor.

Specified by:
getChannelCount in interface SoundDescriptor
Returns:
Number of audio channels described by this sound descriptor.

setChannelCount

public void setChannelCount(int channelCount)
                     throws IllegalArgumentException
Description copied from interface: SoundDescriptor

Sets the number of audio channels described by this sound descriptor.

Specified by:
setChannelCount in interface SoundDescriptor
Parameters:
channelCount - Number of audio channels described by this sound descriptor.
Throws:
IllegalArgumentException - The given channel count is negative.

getCompression

@AAFProperty(uuid1=67240962,
             uuid2=0,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,2},
             definedName="Compression",
             typeName="AUID",
             optional=true,
             uniqueIdentifier=false,
             pid=15622)
public AUID getCompression()
                    throws PropertyNotPresentException
Description copied from interface: SoundDescriptor

Returns he kind of compression and format of compression information of this sound essence data. This property is optional.

Specified by:
getCompression in interface SoundDescriptor
Returns:
The kind of compression and format of compression for the sound essence data.
Throws:
PropertyNotPresentException - The optional property is not present in the sound descriptor, indicating that the described sound essence is not compressed.

setCompression

public void setCompression(AUID compression)
Description copied from interface: SoundDescriptor

Sets the kind of compression and format of compression information of this sound essence data. This property is optional and if the property is not present then the described audio essence is not compressed. Set to null to indicate that the described audio essence is not compressed.

Specified by:
setCompression in interface SoundDescriptor
Parameters:
compression - Kind of compression and format of the compression for this sound essence data.

getDialNorm

@AAFProperty(uuid1=67241729,
             uuid2=0,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,5},
             definedName="DialNorm",
             typeName="Int8",
             optional=true,
             uniqueIdentifier=false,
             pid=15628)
public byte getDialNorm()
                 throws PropertyNotPresentException
Description copied from interface: SoundDescriptor

Returns the dial norm property of this sound descriptor, which specifies the gain to be applied to normalize perceived loudness of the sound, as defined by ITU-R Recommendation BS.1196 (1dB per step). This property is optional.

Specified by:
getDialNorm in interface SoundDescriptor
Returns:
Dial norm property of this sound descriptor.
Throws:
PropertyNotPresentException - This optional dial norm property is not present in this sound descriptor.

setDialNorm

public void setDialNorm(Byte dialNorm)
Description copied from interface: SoundDescriptor

Sets the dial norm of this sound descriptor, which specifies the gain to be applied to normalize perceived loudness of the sound, as defined by ITU-R Recommendation BS.1196 (1dB per step). Set this optional property to null to omit it.

Specified by:
setDialNorm in interface SoundDescriptor
Parameters:
dialNorm - Dial norm property of the sound descriptor.

getElectroSpatialFormulation

@AAFProperty(uuid1=67240193,
             uuid2=256,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,1},
             definedName="ElectroSpatial",
             typeName="ElectroSpatialFormulation",
             optional=true,
             uniqueIdentifier=false,
             pid=15621)
public ElectroSpatialFormulation getElectroSpatialFormulation()
                                                       throws PropertyNotPresentException
Description copied from interface: SoundDescriptor

Returns the electro-spatial formulation of the signal described by this sound descriptor. This property is optional.

Possible values for the electo-spatial formulation include:

Specified by:
getElectroSpatialFormulation in interface SoundDescriptor
Returns:
Electro-spatial formulation of the signal of this sound descriptor.
Throws:
PropertyNotPresentException - The optional electro-spatial formulation property is not present in this sound descriptor.

setElectroSpatialFormulation

public void setElectroSpatialFormulation(ElectroSpatialFormulation formulation)
Description copied from interface: SoundDescriptor

Sets the electro-spatial formulation of the signal of the audio essence described by this sound descriptor. Set this optional property to null to omit it.

Possible values for the electo-spatial formulation include:

Specified by:
setElectroSpatialFormulation in interface SoundDescriptor
Parameters:
formulation - Electro-spatial formulation of the signal described by this sound descriptor.

getQuantizationBits

@AAFProperty(uuid1=67240707,
             uuid2=1024,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,4},
             definedName="QuantizationBits",
             typeName="UInt32",
             optional=false,
             uniqueIdentifier=false,
             pid=15617)
public int getQuantizationBits()
Description copied from interface: SoundDescriptor

Returns the number of quantization bits used for the audio essence described by this sound descriptor.

Specified by:
getQuantizationBits in interface SoundDescriptor
Returns:
Number of quantization bits of this sound descriptor.

setQuantizationBits

public void setQuantizationBits(int bitsCount)
                         throws IllegalArgumentException
Description copied from interface: SoundDescriptor

Sets the number of quantization bits used for the audio essence described by this sound descriptor.

Specified by:
setQuantizationBits in interface SoundDescriptor
Parameters:
bitsCount - Number of quantization bits of this sound descriptor.
Throws:
IllegalArgumentException - The given quantization bits value is negative.

isLocked

public boolean isLocked()
                 throws PropertyNotPresentException
Description copied from interface: SoundDescriptor

Returns the locked flag for the audio essence described by this sound descriptor, which indicates whether the number of samples per frame is locked. This property is optional.

Specified by:
isLocked in interface SoundDescriptor
Returns:
Are the number of samples per frame locked?
Throws:
PropertyNotPresentException - The optional locked property is not present in this sound descriptor.

getIsLocked

@AAFProperty(uuid1=67240705,
             uuid2=1024,
             uuid3=0,
             uuid4={6,14,43,52,1,1,1,4},
             definedName="Locked",
             typeName="Boolean",
             optional=true,
             uniqueIdentifier=false,
             pid=15618)
public boolean getIsLocked()
                    throws PropertyNotPresentException
Throws:
PropertyNotPresentException

setIsLocked

public void setIsLocked(Boolean locked)
Description copied from interface: SoundDescriptor

Sets the locked flag for the audio essence described this sound descriptor, which indicates whether the number of samples per frame is locked. Set this optional property to null to omit it.

Specified by:
setIsLocked in interface SoundDescriptor
Parameters:
locked - Are the number of samples per frame locked?

equals

public boolean equals(Object o)
Description copied from interface: MAJCommon

Tests to see if the given object is equal to this interchange object. To be equal, the given value must be not null, share the same interface to its value and each of the properties of the value must each be equal.

Specified by:
equals in interface MAJCommon
Overrides:
equals in class AAFFileDescriptor
Parameters:
o - Object to test for equality with.
Returns:
Is the given object equals to this value?
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Description copied from interface: MAJCommon

Returns a hash code value for this interchange object.

Specified by:
hashCode in interface MAJCommon
Overrides:
hashCode in class AAFFileDescriptor
Returns:
Hash code value for this interchange object.
See Also:
Object.hashCode()

clone

public SoundDescriptor clone()
Description copied from interface: 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.

Specified by:
clone in interface MAJCommon
Overrides:
clone in class EssenceDescriptor
Returns:
Independent clone of this value, which is a deep copy.
See Also:
Object.clone()

appendXMLChildren

public void appendXMLChildren(Node parent)
Description copied from interface: 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.

Specified by:
appendXMLChildren in interface XMLSerializable
Overrides:
appendXMLChildren in class AAFFileDescriptor
Parameters:
parent - XML parent element to append child nodes to.

Media Authoring
with Java API

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