|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttv.amwa.maj.entity.InterchangeObject
tv.amwa.maj.entity.EssenceDescriptor
tv.amwa.maj.entity.AAFFileDescriptor
tv.amwa.maj.entity.SoundDescriptor
tv.amwa.maj.entity.PCMDescriptor
tv.amwa.maj.entity.AES3PCMDescriptor
@AAFClass(uuid1=218169601, uuid2=257, uuid3=18176, uuid4={6,14,43,52,2,6,1,1}, definedName="AES3PCMDescriptor", description="Describes audio essence in the AES3 audio file format.") public class AES3PCMDescriptor
Implements an AES3 PCM descriptor that describes audio essence in the AES/EBU audio file format, as defined in the EBU/AES digital audio interface specification.
THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.
Nested Class Summary | |
---|---|
static class |
AES3PCMDescriptor.ByteDataXMLHandler
|
static class |
AES3PCMDescriptor.ChannelStatusModeXMLHandler
|
static class |
AES3PCMDescriptor.FixedChannelDataXMLHandler
|
static class |
AES3PCMDescriptor.FixedUserDataXMLHandler
|
static class |
AES3PCMDescriptor.UserDataModeXMLHandler
|
static class |
AES3PCMDescriptor.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 |
AES3PCMDESCRIPTOR_TAG
|
Fields inherited from class tv.amwa.maj.entity.PCMDescriptor |
---|
PCMDESCRIPTOR_TAG |
Fields inherited from class tv.amwa.maj.entity.SoundDescriptor |
---|
SOUNDDESCRIPTOR_TAG |
Fields inherited from class tv.amwa.maj.entity.AAFFileDescriptor |
---|
FILEDESCRIPTOR_ITEM |
Fields inherited from class tv.amwa.maj.entity.EssenceDescriptor |
---|
ESSENCEDESCRIPTOR_ITEM |
Fields inherited from interface tv.amwa.maj.iface.AES3PCMDescriptor |
---|
AES3DefaultUserData, AES3Minimum, AUXBITSMODE_DEFAULT, BLOCKSTARTOFFSET_DEFAULT, EMPHASIS_DEFAULT |
Constructor Summary | |
---|---|
AES3PCMDescriptor(ContainerDefinition containerFormat,
Rational audioSamplingRate,
int channels,
int quantizationBits,
short blockAlign,
int averageBPS)
Creates and initializes a new PCM sound descriptor, which is associated with audio essence formatted according to the BWF File Format. |
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. |
AES3PCMDescriptor |
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. |
AuxBitsModeType |
getAuxBitsMode()
Returns the AES3 use of auxiliary bits in the associated audio essence. |
short |
getBlockStartOffset()
Returns the AES3 position of the first Z preamble in the associated sound essence stream. |
ChannelStatusModeType[] |
getChannelStatusMode()
|
ChannelStatusModeType |
getChannelStatusModeAt(int index)
Returns the AES3 enumerated mode of carriage of channel status data for the associated audio essence for the given channel number. |
EmphasisType |
getEmphasis()
Returns the AES3 emphasis of the associated sound essence. |
byte[] |
getFixedChannelStatusData()
|
byte[] |
getFixedChannelStatusDataAt(int index)
Returns the AES3 fixed channel status data for the channel referenced by the given index in the associated audio essence. |
byte[] |
getFixedUserData()
|
byte[] |
getFixedUserDataAt(int index)
Returns the AES3 fixed user data for the given channel in the associated audio essence. |
UserDataModeType[] |
getUserDataMode()
|
UserDataModeType |
getUserDataModeAt(int index)
Returns the user data mode for the channel of the associated audio essence referenced by the given channel index. |
int |
hashCode()
Returns a hash code value for this interchange object. |
void |
omitChannelStatusData()
Omits the optional fixed channel status data and channel status mode properties from this AES3 PCM descriptor. |
void |
omitUserData()
Omit the optional fixed user data and user data mode properties from this AES3 PCM descriptor. |
void |
setAuxBitsMode(AuxBitsModeType auxBitsMode)
Sets the AES3 use of auxiliary bits in the associated audio essence. |
void |
setBlockStartOffset(Short blockStartOffset)
Sets the AES3 position of the first Z preamble in the associated sound essence stream. |
void |
setChannelStatusMode(ChannelStatusModeType[] channelStatusMode)
|
void |
setChannelStatusModeAt(int index,
ChannelStatusModeType channelStatusMode)
Sets the AES3 enumerated mode of carriage of channel status data for the associated audio essence at the given channel number. |
void |
setEmphasis(EmphasisType emphasisType)
Sets the AES3 emphasis property of the associated sound essence. |
void |
setFixedChannelStatusData(byte[] fixedChannelStatusData)
|
void |
setFixedChannelStatusDataAt(int index,
byte[] fixedChannelStatusData)
Sets the AES3 fixed channel status data for the channel referenced by the given index in the associated audio essence. |
void |
setFixedUserData(byte[] fixedUserData)
|
void |
setFixedUserDataAt(int index,
byte[] fixedUserData)
Sets the AES3 fixed user data for the given channel in the associated audio essence. |
void |
setPropertiesFromInterface(AES3PCMDescriptor castFrom)
|
void |
setUserDataMode(UserDataModeType[] userDataMode)
|
void |
setUserDataModeAt(int index,
UserDataModeType userDataMode)
Sets the user data mode for the channel of the associated audio essence referenced by the given channel index. |
Methods inherited from class tv.amwa.maj.entity.SoundDescriptor |
---|
getAudioRefLevel, getAudioSamplingRate, getChannelCount, getCompression, getDialNorm, getElectroSpatialFormulation, getIsLocked, getQuantizationBits, isLocked, setAudioRefLevel, setAudioSamplingRate, setChannelCount, setCompression, setDialNorm, setElectroSpatialFormulation, setIsLocked, setPropertiesFromInterface, setQuantizationBits |
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, toString, wait, wait, wait |
Methods inherited from interface tv.amwa.maj.iface.SoundDescriptor |
---|
getAudioRefLevel, getAudioSamplingRate, getChannelCount, getCompression, getDialNorm, getElectroSpatialFormulation, getQuantizationBits, isLocked, setAudioRefLevel, setAudioSamplingRate, setChannelCount, setCompression, setDialNorm, setElectroSpatialFormulation, setIsLocked, setQuantizationBits |
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 |
---|
public static final String AES3PCMDESCRIPTOR_TAG
Constructor Detail |
---|
public AES3PCMDescriptor(ContainerDefinition containerFormat, Rational audioSamplingRate, @UInt32 int channels, @UInt32 int quantizationBits, @UInt16 short blockAlign, @UInt32 int averageBPS) throws NullPointerException, IllegalArgumentException
Creates and initializes a new PCM sound descriptor, which is associated with audio essence formatted according to the BWF File Format.
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.blockAlign
- Sample block alignment.averageBPS
- Average bytes per second.
NullPointerException
- The container format or sampling rate properties are
null
.
IllegalArgumentException
- Cannot set the channels, quantization bits, block align
or average bits per second values to negative values.Method Detail |
---|
public final void setPropertiesFromInterface(AES3PCMDescriptor castFrom)
InterchangeObject.setPropertiesFromInterface(tv.amwa.maj.iface.InterchangeObject)
@AAFProperty(uuid1=67241217, uuid2=256, uuid3=0, uuid4={6,14,43,52,1,1,1,5}, definedName="AuxBitsMode", typeName="AuxBitsModeType", optional=true, uniqueIdentifier=false, pid=15624) public AuxBitsModeType getAuxBitsMode()
AES3PCMDescriptor
Returns the AES3 use of auxiliary bits in the associated audio
essence. If this optional property is not present, the default value of
AuxBitsModeType.NotDefined
is returned.
getAuxBitsMode
in interface AES3PCMDescriptor
AES3PCMDescriptor.AUXBITSMODE_DEFAULT
public void setAuxBitsMode(AuxBitsModeType auxBitsMode)
AES3PCMDescriptor
Sets the AES3 use of auxiliary bits in the associated audio
essence. To omit this optional property, call this method with
null
.
setAuxBitsMode
in interface AES3PCMDescriptor
auxBitsMode
- AES3 use of auxiliary bits in the associated audio
essence.AES3PCMDescriptor.AUXBITSMODE_DEFAULT
@AAFProperty(uuid1=67240706, uuid2=768, uuid3=0, uuid4={6,14,43,52,1,1,1,5}, definedName="BlockStartOffset", typeName="UInt16", optional=true, uniqueIdentifier=false, pid=15631) public short getBlockStartOffset()
AES3PCMDescriptor
Returns the AES3 position of the first Z preamble in the associated sound essence stream. If this optional property is not present, the default value of 0 is returned.
getBlockStartOffset
in interface AES3PCMDescriptor
AES3PCMDescriptor.BLOCKSTARTOFFSET_DEFAULT
public void setBlockStartOffset(Short blockStartOffset) throws IllegalArgumentException
AES3PCMDescriptor
Sets the AES3 position of the first Z preamble in the associated sound
essence stream. The default value of this optional property is 0.
To omit this optional property, call this method with null
.
setBlockStartOffset
in interface AES3PCMDescriptor
blockStartOffset
- AES3 position of the first Z preamble in the associated sound
essence stream.
IllegalArgumentException
- The block start offset is negative.AES3PCMDescriptor.BLOCKSTARTOFFSET_DEFAULT
@AAFProperty(uuid1=67241217, uuid2=512, uuid3=0, uuid4={6,14,43,52,1,1,1,5}, definedName="ChannelStatusMode", typeName="ChannelStatusModeArray", optional=true, uniqueIdentifier=false, pid=15632) public ChannelStatusModeType[] getChannelStatusMode()
public void setChannelStatusMode(ChannelStatusModeType[] channelStatusMode) throws NullPointerException, BadSizeException
NullPointerException
BadSizeException
public ChannelStatusModeType getChannelStatusModeAt(int index) throws IndexOutOfBoundsException
AES3PCMDescriptor
Returns the AES3 enumerated mode of carriage of channel status data for the
associated audio essence for the given channel number. If the channel status
mode property is not present, the default value of ChannelStatusModeType.None
is returned.
getChannelStatusModeAt
in interface AES3PCMDescriptor
index
- Index into the AES3 channel status mode array.
IndexOutOfBoundsException
- The given index is outside the acceptable range
for the current channel status mode array.SoundDescriptor.getChannelCount()
public void setChannelStatusModeAt(int index, ChannelStatusModeType channelStatusMode) throws IndexOutOfBoundsException
AES3PCMDescriptor
Sets the AES3 enumerated mode of carriage of channel status data for the associated audio essence at the given channel number.
If the channel status mode property is not present at the time of calling
the method, after completion of the method the property becomes
present and properties at other indexes are initialized to
ChannelStatusModeType.None
.
setChannelStatusModeAt
in interface AES3PCMDescriptor
index
- Index of the channel status mode array to set the channel status for.channelStatusMode
- Channel status for the given index.
IndexOutOfBoundsException
- The given index is outside the acceptable range
for the current channel status mode array.SoundDescriptor.getChannelCount()
@AAFProperty(uuid1=67241217, uuid2=1536, uuid3=0, uuid4={6,14,43,52,1,1,1,5}, definedName="Emphasis", typeName="EmphasisType", optional=true, uniqueIdentifier=false, pid=15629) public EmphasisType getEmphasis()
AES3PCMDescriptor
Returns the AES3 emphasis of the associated sound essence. If this optional property is not present, the default value of this property is returned.
getEmphasis
in interface AES3PCMDescriptor
AES3PCMDescriptor.EMPHASIS_DEFAULT
public void setEmphasis(EmphasisType emphasisType)
AES3PCMDescriptor
Sets the AES3 emphasis property of the associated sound essence. Calling
this method with null
will omit this optional property.
setEmphasis
in interface AES3PCMDescriptor
emphasisType
- AES3 emphasis property of the associated sound essence.AES3PCMDescriptor.EMPHASIS_DEFAULT
@AAFProperty(uuid1=67241217, uuid2=768, uuid3=0, uuid4={6,14,43,52,1,1,1,5}, definedName="FixedChannelStatusData", typeName="UInt8Array", optional=true, uniqueIdentifier=false, pid=15633) public byte[] getFixedChannelStatusData()
public void setFixedChannelStatusData(byte[] fixedChannelStatusData) throws BadSizeException
BadSizeException
public byte[] getFixedChannelStatusDataAt(int index) throws IndexOutOfBoundsException
AES3PCMDescriptor
Returns the AES3 fixed channel status data for the channel referenced by the given index in the associated audio essence. The value returned is a 24-byte array.
The default value is the AES3 minimum, which codes the most significant
bit of the first byte as 1
and all other bits as 0
. If this
optional property is omitted, the default value will be returned.
getFixedChannelStatusDataAt
in interface AES3PCMDescriptor
index
- Channel index to retrieve the fixed channel status data for.
IndexOutOfBoundsException
- The given index is outside the acceptable range
for the current range of channels for which fixed status data is represented.SoundDescriptor.getChannelCount()
public void setFixedChannelStatusDataAt(int index, byte[] fixedChannelStatusData) throws NullPointerException, IndexOutOfBoundsException, BadSizeException
AES3PCMDescriptor
Sets the AES3 fixed channel status data for the channel referenced by the given index in the associated audio essence. The data must take the form of a 24-byte array.
setFixedChannelStatusDataAt
in interface AES3PCMDescriptor
index
- Channel number to set the AES3 fixed channel status data for.fixedChannelStatusData
- Fixed channel status array.
NullPointerException
- The fixed channel status data argument is null
.
IndexOutOfBoundsException
- The given channel index is outside the acceptable
range for the associated audio essence.
BadSizeException
- The fixed channel status data must be an array of 24-bytes
exactly.SoundDescriptor.getChannelCount()
public void omitChannelStatusData()
AES3PCMDescriptor
Omits the optional fixed channel status data and channel status mode properties from this
AES3 PCM descriptor. To make them present again, call AES3PCMDescriptor.setFixedChannelStatusDataAt(int, byte[])
and AES3PCMDescriptor.setChannelStatusModeAt(int, ChannelStatusModeType)
.
omitChannelStatusData
in interface AES3PCMDescriptor
@AAFProperty(uuid1=67241217, uuid2=1280, uuid3=0, uuid4={6,14,43,52,1,1,1,5}, definedName="FixedUserData", typeName="UInt8Array", optional=true, uniqueIdentifier=false, pid=15635) public byte[] getFixedUserData()
public void setFixedUserData(byte[] fixedUserData) throws BadSizeException
BadSizeException
public byte[] getFixedUserDataAt(int index) throws IndexOutOfBoundsException
AES3PCMDescriptor
Returns the AES3 fixed user data for the given channel in the associated audio essence. The value is always a 24-byte array.
The default value for fixed user data on a channel is all zero values, as
represented by AES3PCMDescriptor.AES3DefaultUserData
. If this optional property is not
present, the default value will be returned.
getFixedUserDataAt
in interface AES3PCMDescriptor
index
- Channel index of the fixed user data to retrieve.
IndexOutOfBoundsException
- The channel number is outside the acceptable range
for the associated audio essence.SoundDescriptor.getChannelCount()
public void setFixedUserDataAt(int index, byte[] fixedUserData) throws NullPointerException, IndexOutOfBoundsException, BadSizeException
AES3PCMDescriptor
Sets the AES3 fixed user data for the given channel in the associated audio essence. The value is always a 24-byte array.
setFixedUserDataAt
in interface AES3PCMDescriptor
index
- Channel index of the fixed user data to set.fixedUserData
- Fixed user data for the given channel number of the associated
audio essence.
NullPointerException
- Cannot set fixed user data to null
.
IndexOutOfBoundsException
- The channel number is outside the acceptable range
for the associated audio essence.
BadSizeException
- The fixed user data value must by a 24-byte array.SoundDescriptor.getChannelCount()
@AAFProperty(uuid1=67241217, uuid2=1024, uuid3=0, uuid4={6,14,43,52,1,1,1,5}, definedName="UserDataMode", typeName="UserDataModeArray", optional=true, uniqueIdentifier=false, pid=15634) public UserDataModeType[] getUserDataMode()
public void setUserDataMode(UserDataModeType[] userDataMode) throws NullPointerException, BadSizeException
NullPointerException
BadSizeException
public UserDataModeType getUserDataModeAt(int index) throws IndexOutOfBoundsException
AES3PCMDescriptor
Returns the user data mode for the channel of the associated audio essence referenced by the given channel index.
The default value for each element of this property is
UserDataModeType.NotDefined
. If this optional property is omitted, the default
value will be returned.
getUserDataModeAt
in interface AES3PCMDescriptor
index
- Channel index to identify the channel to retrieve the user data mode for.
IndexOutOfBoundsException
- The given channel index is outside the acceptable
range for the associated audio essence.SoundDescriptor.getChannelCount()
public void setUserDataModeAt(int index, UserDataModeType userDataMode) throws NullPointerException, IndexOutOfBoundsException
AES3PCMDescriptor
Sets the user data mode for the channel of the associated audio essence referenced by the given channel index.
setUserDataModeAt
in interface AES3PCMDescriptor
index
- Channel index to identify the channel to set the user data mode for.userDataMode
- Type of user data for the given channel.
NullPointerException
- Cannot set the user data mode for a channel to
null
.
IndexOutOfBoundsException
- The given channel index is outside the acceptable
range for the associated audio essence.SoundDescriptor.getChannelCount()
public void omitUserData()
AES3PCMDescriptor
Omit the optional fixed user data and user data mode properties from this AES3 PCM descriptor. To make them
present again, call AES3PCMDescriptor.setFixedUserDataAt(int, byte[])
and AES3PCMDescriptor.setUserDataModeAt(int, UserDataModeType)
.
omitUserData
in interface AES3PCMDescriptor
public boolean equals(Object o)
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.
equals
in interface MAJCommon
equals
in class PCMDescriptor
o
- Object to test for equality with.
Object.equals(Object)
public int hashCode()
MAJCommon
Returns a hash code value for this interchange object.
hashCode
in interface MAJCommon
hashCode
in class PCMDescriptor
Object.hashCode()
public AES3PCMDescriptor 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 PCMDescriptor
Object.clone()
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 PCMDescriptor
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 |