Media Authoring
with Java API

tv.amwa.maj.argument
Class MultiCreateItem

java.lang.Object
  extended by tv.amwa.maj.argument.MultiCreateItem
All Implemented Interfaces:
Serializable, Cloneable, MultiCreateItem

public class MultiCreateItem
extends Object
implements MultiCreateItem, Serializable, Cloneable

Implementation of an element of an array used to create interleaved audio and video essence.

Interleaved-essence: An essence format that combines two or more channels of audio or video data into a single essence stream.

Author:
Richard Cartwright
See Also:
MasterMob.createMultiEssence(AUID, tv.amwa.maj.record.MultiCreateItem[], tv.amwa.maj.enumeration.CompressEnable, tv.amwa.maj.iface.Locator, AUID), MasterMob.extendMultiEssence(AUID, tv.amwa.maj.record.MultiCreateItem[], tv.amwa.maj.enumeration.CompressEnable, tv.amwa.maj.iface.Locator, AUID), EssenceData, Serialized Form

Constructor Summary
MultiCreateItem(AUID mediaKind, short subTrackNum, int slotID, Rational sampleRate)
          Create an element of interleaved essence.
 
Method Summary
 MultiCreateItem clone()
           
 boolean equals(Object o)
           
 AUID getMediaKind()
          Returns the kind of media represented by this item.
 Rational getSampleRate()
          Returns the sample rate of this item.
 int getSlotID()
          Returns the slot id of this item within its mob.
 short getSubTrackNum()
          Returns the sub track number associated with this item, which is the physical output channel.
 int hashCode()
           
 void setMediaKind(AUID mediaKind)
          Sets the kind of media represented by this item.
 void setSampleRate(Rational sampleRate)
          Sets the sample rate of this item.
 void setSlotID(int slotID)
          Sets the slot id of this item within its mob.
 void setSubTrackNum(short subTrackNum)
          Sets the sub track number associated with this item, which is the physical output channel.
 String toString()
          Pseudo-XML representation of this multi-create item.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiCreateItem

public MultiCreateItem(AUID mediaKind,
                       @Int16
                       short subTrackNum,
                       @SlotID
                       int slotID,
                       Rational sampleRate)
                throws NullPointerException,
                       IllegalArgumentException

Create an element of interleaved essence.

Parameters:
mediaKind - Kind of media represented by this item.
subTrackNum - Sub track number associated with this item - the physical output channel.
slotID - Slot id for this item within the essence.
sampleRate - Sample rate of this item.
Throws:
NullPointerException - One or both of the given media kind or sample rates is null.
IllegalArgumentException - The given sample rate for this multi-create item has a zero demoninator or is negative.
Method Detail

getMediaKind

public AUID getMediaKind()
Description copied from interface: MultiCreateItem

Returns the kind of media represented by this item.

Specified by:
getMediaKind in interface MultiCreateItem
Returns:
Kind of media represented by this item.

setMediaKind

public void setMediaKind(AUID mediaKind)
                  throws NullPointerException
Description copied from interface: MultiCreateItem

Sets the kind of media represented by this item.

Specified by:
setMediaKind in interface MultiCreateItem
Parameters:
mediaKind - Kind of media represented by this item.
Throws:
NullPointerException - The given media kind is null.

getSampleRate

public Rational getSampleRate()
Description copied from interface: MultiCreateItem

Returns the sample rate of this item.

Specified by:
getSampleRate in interface MultiCreateItem
Returns:
Sample rate of this item.

setSampleRate

public void setSampleRate(Rational sampleRate)
                   throws NullPointerException,
                          IllegalArgumentException
Description copied from interface: MultiCreateItem

Sets the sample rate of this item.

Specified by:
setSampleRate in interface MultiCreateItem
Parameters:
sampleRate - Sample rate of this item.
Throws:
NullPointerException - The given sample rate for the item is null.
IllegalArgumentException - The given sample rate for this multi-create item has a zero denominator or is negative.

getSlotID

@SlotID
public int getSlotID()
Description copied from interface: MultiCreateItem

Returns the slot id of this item within its mob.

Specified by:
getSlotID in interface MultiCreateItem
Returns:
Slot id of this item.

setSlotID

public void setSlotID(@SlotID
                      int slotID)
               throws IllegalArgumentException
Description copied from interface: MultiCreateItem

Sets the slot id of this item within its mob.

Specified by:
setSlotID in interface MultiCreateItem
Parameters:
slotID - Slot id of this item.
Throws:
IllegalArgumentException - The given slot id for this multi-create item is negative.

getSubTrackNum

@Int16
public short getSubTrackNum()
Description copied from interface: MultiCreateItem

Returns the sub track number associated with this item, which is the physical output channel.

Specified by:
getSubTrackNum in interface MultiCreateItem
Returns:
Sub track number associated with this item.

setSubTrackNum

public void setSubTrackNum(@Int16
                           short subTrackNum)
Description copied from interface: MultiCreateItem

Sets the sub track number associated with this item, which is the physical output channel.

Specified by:
setSubTrackNum in interface MultiCreateItem
Parameters:
subTrackNum - Sub track number associated with this item.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()

Pseudo-XML representation of this multi-create item. No associated XML schema or DTD exists. For example:

 <MultiCreateItem>
   <MediaKind>urn:x-ul:060e2b34.0401.0101.01030202.0100.0000</MediaKind>
   <SlotID>3</SlotID>
   <SubTrackNum>7</SubTrackNum>
   <SampleRate>24/60</SampleRate>
 </MultiCreateItem>
 

Overrides:
toString in class Object
Returns:
Pseudo-XML representation of this multi-create item.

clone

public MultiCreateItem clone()
                      throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Media Authoring
with Java API

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