Media Authoring
with Java API

tv.amwa.maj.entity
Class MasterMob

java.lang.Object
  extended by tv.amwa.maj.entity.InterchangeObject
      extended by tv.amwa.maj.entity.Mob
          extended by tv.amwa.maj.entity.MasterMob
All Implemented Interfaces:
Serializable, Cloneable, MAJCommon, InterchangeObject, MasterMob, Mob, XMLSerializable

@AAFClass(uuid1=218169601,
          uuid2=257,
          uuid3=13824,
          uuid4={6,14,43,52,2,6,1,1},
          definedName="MasterMob",
          description="The MasterMob class provides access to the SourceMobs and EssenceData objects.")
public class MasterMob
extends Mob
implements MasterMob, Serializable, Cloneable, MAJCommon

Implements a material object that provides access to source mobs and essence data.

THE COMMENTS FOR THIS CLASS ARE INCOMPLETE. MOST OF THE METHODS OF THIS CLASS HAVE EMPTY IMPLEMENTATIONS.

Author:
Richard Cartwright
See Also:
Serialized Form

Nested Class Summary
static class MasterMob.XMLHandler
           
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.Mob
Mob.MobAttributesXMLHandler, Mob.MobKLVDataXMLHandler, Mob.MobUserCommentsXMLHandler, Mob.SlotsXMLHandler
 
Nested classes/interfaces inherited from class tv.amwa.maj.entity.InterchangeObject
InterchangeObject.InterchangeObjectXMLHandler
 
Field Summary
static String MASTERMOB_TAG
           
 
Fields inherited from class tv.amwa.maj.entity.Mob
MOB_ITEM
 
Constructor Summary
MasterMob(MobID mobID, String name)
          Creates and initializes a master mob, which provides access to associated source mob and essence data objects with its unique material identifier and name.
 
Method Summary
 void addMasterSlot(DataDefinition dataDef, int sourceSlotID, SourceMob sourceMob, int masterSlotID, String slotName)
          Adds a slot to this master mob that references the specified slot in the specified source mob.
 EventMobSlot appendNewEventSlot(Rational editRate, Segment segment, int slotID, String slotName)
           
 StaticMobSlot appendNewStaticSlot(Segment segment, int slotID, String slotName)
          Creates and returns a new static mob slot with the given property values, as well as appending it to the list of slots of this mob.
 TimelineMobSlot appendNewTimelineSlot(Rational editRate, Segment segment, int slotID, String slotName, long origin)
          Creates and returns a new timeline mob slot with the given property values, as well as appending it to this mob.
 void appendPhysSourceRef(Rational editrate, int mobSlot, DataDefinition essenceKind, SourceReferenceValue ref, long srcRefLength)
          Connects this Master Mob with the physical Source Mob that describes the previous generation of essence, appending it to existing Mob data.
 void appendXMLChildren(Node parent)
          Append child elements to the given parent node to serialize the value of an object to an XML fragment.
 MasterMob clone()
          Creates a cloned copy of this entity.
 short countChannels(int slotID, CriteriaType mediaCrit, DataDefinition mediaKind)
          Returns the number of interleaved essence channels of a given type in the essence stream referenced from the given slot of this master mob.
 tv.amwa.maj.io.file.EssenceAccess createEssence(int masterSlotID, DataDefinition mediaKind, AUID codecID, Rational editRate, Rational samplerate, CompressEnable enable, Locator destination, AUID fileFormat)
          Creates a single channel stream of essence in the given slot of this master mob.
 tv.amwa.maj.io.file.EssenceAccess createEventEssence(int masterSlotID, DataDefinition mediaKind, AUID codecID, Rational editRate, Rational sampleRate, CompressEnable enable, Locator destination, AUID fileFormat)
          Creates and initializes an event mob slot in a slot of this master mobs that represents a stream of events.
 tv.amwa.maj.io.file.EssenceMultiAccess createMultiEssence(AUID codecID, MultiCreateItem[] mediaArray, CompressEnable enable, Locator destination, AUID fileFormat)
          Creates a multi-channel interleaved stream of essence for this master mob.
 tv.amwa.maj.io.file.EssenceAccess createStaticEssence(int masterSlotID, DataDefinition mediaKind, AUID codecID, CompressEnable enable, Locator destination, AUID fileFormat)
          Creates and initializes static essence as a referenced slot of this master mob, returning access to them.
 tv.amwa.maj.io.file.EssenceAccess extendEssence(int masterSlotID, DataDefinition mediaKind, AUID codecID, Rational editRate, Rational sampleRate, CompressEnable enable, Locator destintation, AUID fileFormat)
          Extends a single stream of essence that was originally created using createEssence().
 tv.amwa.maj.io.file.EssenceMultiAccess extendMultiEssence(AUID codecID, MultiCreateItem[] mediaArray, CompressEnable enable, Locator destination, AUID fileFormat)
          Extends a multi-channel interleaved stream of essence that was originally created using createMultiEssence().
 Segment getCriteriaSegment(int slotID, CriteriaType criteria)
          Returns the segment on the specified slot of this master mob that references the source mob that best meets the specified criteria.
 int getNumberOfRepresentations(int slotID)
          This function returns the number of media representations available for the specified slot of this master mob.
 Segment getRepresentation(int slotID, int index)
          This method returns the indexed media representation for this master mob, for this given slot id and index through the different representations.
 String getTapeName(int masterSlotId)
          Finds the tape source mob associated with a slot of this master mob and returns the name of the tape, which is stored in the source mob's name property.
 void newPhysSourceRef(Rational editrate, int mobSlot, DataDefinition essenceKind, SourceReferenceValue ref, long srcRefLength)
          Connects this Source Mob with the physical Source Mob that describes the previous generation of essence, replacing any existing Mob data.
 tv.amwa.maj.io.file.EssenceAccess openEssence(int slotID, CriteriaType mediaCrit, MediaOpenMode openMode, CompressEnable compEnable)
          Opens a single channel of a file source mob referenced from a slot of this master mob.
 tv.amwa.maj.io.file.EssenceMultiAccess openMultiEssence(int slotID, CriteriaType mediaCrit, MediaOpenMode openMode, CompressEnable compEnable)
          Opens all channels associated with a file source mob referenced from this master mob.
 void setPropertiesFromInterface(MasterMob castFrom)
           
 
Methods inherited from class tv.amwa.maj.entity.Mob
appendAttribute, appendAttribute, appendComment, appendComment, appendKLVData, appendNewEventSlot, appendSlot, changeReference, cloneExternal, copy, countAttributes, countComments, countKLVData, countSlots, equals, getAttributes, getComments, getCreateTime, getKLVData, getMobID, getModTime, getName, getSlotAt, getSlots, getUsageCode, hashCode, insertSlotAt, lookupSlot, offsetToMobTimecode, prependSlot, removeAttribute, removeComment, removeKLVData, removeSlotAt, setCreateTime, setMobID, setModTime, setName, setPropertiesFromInterface, setUsageCode
 
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface tv.amwa.maj.iface.Mob
appendAttribute, appendAttribute, appendComment, appendComment, appendKLVData, appendNewEventSlot, appendSlot, changeReference, cloneExternal, copy, countAttributes, countComments, countKLVData, countSlots, getAttributes, getComments, getCreateTime, getKLVData, getMobID, getModTime, getName, getSlotAt, getSlots, getUsageCode, insertSlotAt, lookupSlot, offsetToMobTimecode, prependSlot, removeAttribute, removeComment, removeKLVData, removeSlotAt, setCreateTime, setMobID, setModTime, setName, setUsageCode
 
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
 

Field Detail

MASTERMOB_TAG

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

MasterMob

public MasterMob(MobID mobID,
                 @AAFString
                 String name)
          throws NullPointerException

Creates and initializes a master mob, which provides access to associated source mob and essence data objects with its unique material identifier and name. The required properties of creation time and last modified time will be set automatically to the time of calling this method. These timestamp values can be set manually by calling setCreateTime() and and setModTime().

Parameters:
mobID - Unique material identifier for the mob.
name - Name of the composition mob.
Throws:
NullPointerException - Unique material identifier is null.
Method Detail

setPropertiesFromInterface

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

addMasterSlot

public void addMasterSlot(DataDefinition dataDef,
                          int sourceSlotID,
                          SourceMob sourceMob,
                          int masterSlotID,
                          String slotName)
                   throws NullPointerException,
                          InvalidDataDefinitionException,
                          SlotNotFoundException,
                          SlotExistsException
Description copied from interface: MasterMob

Adds a slot to this master mob that references the specified slot in the specified source mob. The new slot in the master mob contains a source clip that specifies the source mob in its source reference properties.

Specified by:
addMasterSlot in interface MasterMob
Parameters:
dataDef - Essence kind of the new slot. Requires an essence kind valid for time-varying essence, such as: "Picture", "Sound".
sourceSlotID - Slot id of the source mob slot to be referenced from this master mob.
sourceMob - Source mob containing the slot to be referenced from this master mob.
masterSlotID - Slot id to be assigned to the new master mob slot.
slotName - Name to assign to new slot in master mob. Set this property to null to omit the optional mob slot name.
Throws:
NullPointerException - One or both of the data definition and/or source mob parameters is/are null.
InvalidDataDefinitionException - The data kind of the source MOB slot to be added to the Master Mob does not match what is specified in dataDef.
SlotNotFoundException - The given source mob slot was not found.
SlotExistsException - The given master slot id already identifies a slot in this master mob.
See Also:
SourceClip, TimelineMobSlot, Mob.getSlots()

appendPhysSourceRef

public void appendPhysSourceRef(Rational editrate,
                                int mobSlot,
                                DataDefinition essenceKind,
                                SourceReferenceValue ref,
                                long srcRefLength)
                         throws NullPointerException
Description copied from interface: MasterMob

Connects this Master Mob with the physical Source Mob that describes the previous generation of essence, appending it to existing Mob data. If a physical Source Mob, such as a File Source Mob or tape Source Mob, references another physical Source Mob as its ancestor, with no pulldown, then this function makes the connection between the two.

Functionally, this is a helper method to create a slot with an SourceClip referencing a particular piece of media. This method takes many parameters because the components of an SourceReferenceValue have been broken out as separate parameters.

The ancestor of a SourceMob with an AAFFileDescriptor is often a TapeDescriptor or null.

Specified by:
appendPhysSourceRef in interface MasterMob
Parameters:
editrate - Edit rate of slot to contain reference.
mobSlot - Slot ID of slot to contain reference.
essenceKind - Data kind of slot to contain reference. Requires a data kind valid for a essence stream. Valid data kinds are: "Picture", "Sound"
ref - Reference to a Physical Source Mob.
srcRefLength - Length of the Source Clip.
Throws:
NullPointerException - One or more of the arguments is null.

countChannels

public short countChannels(int slotID,
                           CriteriaType mediaCrit,
                           DataDefinition mediaKind)
                    throws NullPointerException,
                           SlotNotFoundException
Description copied from interface: MasterMob

Returns the number of interleaved essence channels of a given type in the essence stream referenced from the given slot of this master mob. This method is structured so that it can be called before essence is opened.

If the data format is not interleaved, then the answer will always be zero or one. This function correctly returns zero for essence types not handled by a given codec, and handles codecs which work with multiple essence types.

Specified by:
countChannels in interface MasterMob
Parameters:
slotID - Count channels on this slot of this master mob.
mediaCrit - Filter channels using this media criteria.
mediaKind - Count channels of this kind of essence.
Returns:
Number of channels in the given slot, matching the given media criteria and essence kind.
Throws:
NullPointerException - One or both of the media criteria and/or media kind arguments is/are null.
SlotNotFoundException - The specified slot does not exist in this master mob.

createEssence

public tv.amwa.maj.io.file.EssenceAccess createEssence(int masterSlotID,
                                                       DataDefinition mediaKind,
                                                       AUID codecID,
                                                       Rational editRate,
                                                       Rational samplerate,
                                                       CompressEnable enable,
                                                       Locator destination,
                                                       AUID fileFormat)
                                                throws NullPointerException
Description copied from interface: MasterMob

Creates a single channel stream of essence in the given slot of this master mob. Convenience functions exist to create audio or video essence, and a separate call (MasterMob.createMultiEssence(AUID, MultiCreateItem[], CompressEnable, Locator, AUID)) exists to create interleaved audio and video data.

The essence handle from this call can be used with EssenceAccess.writeSamples(int, byte[]), but not with EssenceMultiAccess.writeMultiSamples(MultiXferItem[]).

For video, the sample rate should be the edit rate of the file source mob. For audio, the sample rate should be the actual number of samples per second.

Specified by:
createEssence in interface MasterMob
Parameters:
masterSlotID - Master slot id for new essence.
mediaKind - Create essence of this type.
codecID - Create essence according to this codec.
editRate - Create essence with this edit rate.
samplerate - Create essence with this sample rate.
enable - Is compression enabled?
destination - Create the essence at this location, or null for the default location.
fileFormat - Create essence to this file format.
Returns:
Access to the created essence.
Throws:
NullPointerException - One or more of the required arguments is null.

createEventEssence

public tv.amwa.maj.io.file.EssenceAccess createEventEssence(int masterSlotID,
                                                            DataDefinition mediaKind,
                                                            AUID codecID,
                                                            Rational editRate,
                                                            Rational sampleRate,
                                                            CompressEnable enable,
                                                            Locator destination,
                                                            AUID fileFormat)
                                                     throws NullPointerException
Description copied from interface: MasterMob

Creates and initializes an event mob slot in a slot of this master mobs that represents a stream of events.

This method is broadly similar to createEssence() except that the essence is created in a event slot in this master mob.

The essence handle from this call can be used with EssenceAccess.writeSamples(int, byte[]) but not with EssenceMultiAccess.writeMultiSamples(MultiXferItem[]).

Specified by:
createEventEssence in interface MasterMob
Parameters:
masterSlotID - Slot of this master mob in which to create the event essence.
mediaKind - Create essence of this type.
codecID - Create essence with this codec.
editRate - Create essence with this edit rate.
sampleRate - Create essence with this sample rate.
enable - Compress the created essence?
destination - Optionally create a the essence file at this location.
fileFormat - If the file is created, use this file format, as specified by the identifier of a container definition.
Returns:
Access to the newly created essence.
Throws:
NullPointerException - One or more of the required arguments is/are null.
See Also:
ContainerConstant

createMultiEssence

public tv.amwa.maj.io.file.EssenceMultiAccess createMultiEssence(AUID codecID,
                                                                 MultiCreateItem[] mediaArray,
                                                                 CompressEnable enable,
                                                                 Locator destination,
                                                                 AUID fileFormat)
                                                          throws NullPointerException
Description copied from interface: MasterMob

Creates a multi-channel interleaved stream of essence for this master mob. The essence handle from this call can be used with EssenceAccess.writeSamples(int, byte[]) or EssenceMultiAccess.writeMultiSamples(MultiXferItem[]).

Specified by:
createMultiEssence in interface MasterMob
Parameters:
codecID - Create multi-essence using this codec.
mediaArray - Create multi-essence using this array of definitions.
enable - Is multi-essence compressed?
destination - Create the interleaved essence file at this location, or null for default location.
fileFormat - If a file is created, use this file format as specified by the identifier of a container definition.
Returns:
Access to the created multi-essence.
Throws:
NullPointerException - One or more of the required arguments is null.

createStaticEssence

public tv.amwa.maj.io.file.EssenceAccess createStaticEssence(int masterSlotID,
                                                             DataDefinition mediaKind,
                                                             AUID codecID,
                                                             CompressEnable enable,
                                                             Locator destination,
                                                             AUID fileFormat)
                                                      throws NullPointerException
Description copied from interface: MasterMob

Creates and initializes static essence as a referenced slot of this master mob, returning access to them.

This method is broadly similar to createEssence() except that the essence is created in a static mob slot in this master mob.

The essence handle from this call can be used with EssenceAccess.writeSamples(int, byte[]) but not with EssenceMultiAccess.writeMultiSamples(MultiXferItem[]).

Specified by:
createStaticEssence in interface MasterMob
Parameters:
masterSlotID - Slot of this master mob in which to create static essence.
mediaKind - Create essence of this type.
codecID - Create essence using this codec.
enable - Compress the created essence?
destination - Optionally create the essence file at this location.
fileFormat - If the file is created, use this file format, as specified by a container definition.
Returns:
Access to the newly created essence.
Throws:
NullPointerException - One or more of the required arguments is/are null.
See Also:
ContainerConstant

extendEssence

public tv.amwa.maj.io.file.EssenceAccess extendEssence(int masterSlotID,
                                                       DataDefinition mediaKind,
                                                       AUID codecID,
                                                       Rational editRate,
                                                       Rational sampleRate,
                                                       CompressEnable enable,
                                                       Locator destintation,
                                                       AUID fileFormat)
                                                throws NullPointerException
Description copied from interface: MasterMob

Extends a single stream of essence that was originally created using createEssence(). Extended essence is represented by a sequence of source clips. The first call to this method will cause the timeline mob slot's source clip object to be replaced by a sequence. The initial source clip becomes the first component of the new sequence.

Specified by:
extendEssence in interface MasterMob
Parameters:
masterSlotID - Slot id of the essence to be extended on this master mob.
mediaKind - Create the extended essence with this type.
codecID - Create the extended essence with this codec.
editRate - Create the extended essence with this edit rate.
sampleRate - Create the extended essence with this sample rage.
enable - Should the extended essence by compressed?
destintation - Optionally create a file of extended essence at this location.
fileFormat - If a file is created, use this file format, as specified by a the identifier of a container definition.
Returns:
Essence access to the newly extended essence.
Throws:
NullPointerException - One of more of the required arguments is/are null.

extendMultiEssence

public tv.amwa.maj.io.file.EssenceMultiAccess extendMultiEssence(AUID codecID,
                                                                 MultiCreateItem[] mediaArray,
                                                                 CompressEnable enable,
                                                                 Locator destination,
                                                                 AUID fileFormat)
                                                          throws NullPointerException
Description copied from interface: MasterMob

Extends a multi-channel interleaved stream of essence that was originally created using createMultiEssence(). Extended essence is represented by a sequence of source clips. The first call to this method will cause the timeline mob slot's source clip to be replaced by a sequence. The initial source clip becomes the first component of the new sequence.

Specified by:
extendMultiEssence in interface MasterMob
Parameters:
codecID - Extend the multi-channel essence using this codec.
mediaArray - Use these media definitions to extend the essence.
enable - Should the extension be done with compression enabled?
destination - Optionally create a file at this location.
fileFormat - If the file is created, use this format, as specified by the identifier of a container definition.
Returns:
Essence access to the extended essence.
Throws:
NullPointerException - One or more of the required arguments is/are null.
See Also:
MultiCreateItem, ContainerConstant

getCriteriaSegment

public Segment getCriteriaSegment(int slotID,
                                  CriteriaType criteria)
                           throws SlotNotFoundException,
                                  NullPointerException
Description copied from interface: MasterMob

Returns the segment on the specified slot of this master mob that references the source mob that best meets the specified criteria. This function will return a result whether multiple media representations exist or not, as one representation not matching a criteria is considered better than no representation for any given media criteria.

Specified by:
getCriteriaSegment in interface MasterMob
Parameters:
slotID - Slot id of a slot of this master mob to return a representation for.
criteria - Criteria for selecting one of the segments.
Returns:
Matching segment.
Throws:
SlotNotFoundException - The master slot specified by slot id was not found.
NullPointerException - One or both of the slot id and/or criteria is/are null.

getNumberOfRepresentations

public int getNumberOfRepresentations(int slotID)
                               throws SlotNotFoundException
Description copied from interface: MasterMob

This function returns the number of media representations available for the specified slot of this master mob. Each different representation will have a media criteria that can be used to select it. Use MasterMob.getCriteriaSegment(int, CriteriaType) to handle multiple representations.

Specified by:
getNumberOfRepresentations in interface MasterMob
Parameters:
slotID - Slot id the count of the number of representations are required for.
Returns:
Number of different media type representations in the slot.
Throws:
SlotNotFoundException - The master slot specified by slot is was not found for this master mob.

getRepresentation

public Segment getRepresentation(int slotID,
                                 int index)
                          throws SlotNotFoundException,
                                 IndexOutOfBoundsException
Description copied from interface: MasterMob

This method returns the indexed media representation for this master mob, for this given slot id and index through the different representations. This call is designed to work with MasterMob.getNumberOfRepresentations(int) so that the user can iterate through all of the choices. This method uses an integer index, not an iterator. The method takes an index between 0 and one less than the number of representations, and returns the source mob at that representation index.

Specified by:
getRepresentation in interface MasterMob
Parameters:
slotID - Slot id of this master mob to find a representation for.
index - Index of media representation in the given slot.
Returns:
Matching source clip.
Throws:
SlotNotFoundException - The master slot specified by slot id was not found in this master mob.
IndexOutOfBoundsException - No media representation is available at the specified index.
See Also:
CriteriaType

getTapeName

public String getTapeName(int masterSlotId)
                   throws SlotNotFoundException,
                          NotTapeMobException
Description copied from interface: MasterMob

Finds the tape source mob associated with a slot of this master mob and returns the name of the tape, which is stored in the source mob's name property. If the property name has not yet been set, a zero-length string will be returned.

A tape source mob is a source mob described by a tape descriptor.

Specified by:
getTapeName in interface MasterMob
Parameters:
masterSlotId - Slot id of this master mob slot to use to find the tape name.
Returns:
Tape name of the tape source mob in the given slot.
Throws:
SlotNotFoundException - The specified master mob slot was not found.
NotTapeMobException - The specified master mob slot does not contain a tape mob.
See Also:
TapeDescriptor, SourceMob.getEssenceDescriptor()

newPhysSourceRef

public void newPhysSourceRef(Rational editrate,
                             int mobSlot,
                             DataDefinition essenceKind,
                             SourceReferenceValue ref,
                             long srcRefLength)
                      throws NullPointerException
Description copied from interface: MasterMob

Connects this Source Mob with the physical Source Mob that describes the previous generation of essence, replacing any existing Mob data. If a physical Source Mob, such as a File Source Mob or tape Source Mob, references another physical Source Mob as its ancestor, with no pulldown, then this function makes the connection between the two.

Functionally, this is a helper method to create a slot with a SourceClip referencing a particular piece of media. This function takes many parameters because the components of a SourceReferenceValue have been broken out as separate parameters.

The ancestor of an AAFSourceMob with an AAFFileDescriptor is often an TapeDescriptor or null.

Specified by:
newPhysSourceRef in interface MasterMob
Throws:
NullPointerException

openEssence

public tv.amwa.maj.io.file.EssenceAccess openEssence(int slotID,
                                                     CriteriaType mediaCrit,
                                                     MediaOpenMode openMode,
                                                     CompressEnable compEnable)
                                              throws NullPointerException,
                                                     SlotNotFoundException
Description copied from interface: MasterMob

Opens a single channel of a file source mob referenced from a slot of this master mob. If the essence is interleaved, then it will be de-interleaved when samples are read. This routine follows the locator of the source mob's essence descriptor.

The essence handle from this call can be used with EssenceAccess.readSamples(int), but NOT with EssenceMultiAccess.readMultiSamples(MultiXferItem[]).

Specified by:
openEssence in interface MasterMob
Parameters:
slotID - Open essence on this slot.
mediaCrit - Select essence using this criteria.
openMode - Open essence with this mode, either read only or append.
compEnable - Should the essence be decompressed?
Returns:
Access to the essence.
Throws:
NullPointerException - One or more of the arguments was null.
SlotNotFoundException - The specified slot does not exist in the master mob.

openMultiEssence

public tv.amwa.maj.io.file.EssenceMultiAccess openMultiEssence(int slotID,
                                                               CriteriaType mediaCrit,
                                                               MediaOpenMode openMode,
                                                               CompressEnable compEnable)
                                                        throws NullPointerException,
                                                               SlotNotFoundException
Description copied from interface: MasterMob

Opens all channels associated with a file source mob referenced from this master mob. This routine follows the locator of the essence descriptor of the source mob.

The essence handle from this call can be used with EssenceMultiAccess.writeMultiSamples(MultiXferItem[]) but not with EssenceAccess.writeSamples(int, byte[]).

Specified by:
openMultiEssence in interface MasterMob
Parameters:
slotID - Slot id of this master mob referencing the essence to open.
mediaCrit - Select a kind of representation of the content in the slot using this criteria.
openMode - Open mode for essence access, either MediaOpenMode.ReadOnly or MediaOpenMode.Append.
compEnable - Should the essence be decompressed?
Returns:
Access to the multi-channel essence.
Throws:
NullPointerException - One or more of the media criteria, open mode or compress enable arguments is/are null.
SlotNotFoundException - The given slot does not exist in this master mob.

appendNewEventSlot

public EventMobSlot appendNewEventSlot(Rational editRate,
                                       Segment segment,
                                       int slotID,
                                       String slotName)
                                throws NullPointerException
Throws:
NullPointerException

appendNewStaticSlot

public StaticMobSlot appendNewStaticSlot(Segment segment,
                                         int slotID,
                                         String slotName)
                                  throws NullPointerException
Description copied from interface: Mob

Creates and returns a new static mob slot with the given property values, as well as appending it to the list of slots of this mob.

Specified by:
appendNewStaticSlot in interface Mob
Overrides:
appendNewStaticSlot in class Mob
Parameters:
segment - Segment to use to create a new static mob slot.
slotID - Slot id to assign to the new static mob slot.
slotName - Name for the new static mob slot, or null to omit this optional property.
Returns:
Newly created static mob slot, which is also appended to the list of mob slots of this mob.
Throws:
NullPointerException - The given segment is null.
See Also:
Mob.appendSlot(MobSlot), makeStaticMobSlot()

appendNewTimelineSlot

public TimelineMobSlot appendNewTimelineSlot(Rational editRate,
                                             Segment segment,
                                             int slotID,
                                             String slotName,
                                             long origin)
                                      throws NullPointerException
Description copied from interface: Mob

Creates and returns a new timeline mob slot with the given property values, as well as appending it to this mob.

Specified by:
appendNewTimelineSlot in interface Mob
Overrides:
appendNewTimelineSlot in class Mob
Parameters:
editRate - Units of time for the new timeline mob slot.
segment - Value for the new timeline mob slot.
slotID - Integer to be used to refer to the mob slot.
slotName - Name of the new timeline mob slot, or null to omit this optional property.
origin - Specifies the offset used to resolve source clip references to source material in the new timeline mob slot, measured in according to the edit rate of the new slot. A positive value means that the first sample of the essence is earlier than the zero position. A negative value of origin means that the zero position is earlier than the first sample of the essence.
Returns:
The newly created timeline mob slot, which is also appended to the list of mob slots of this mob.
Throws:
NullPointerException - One or more of the arguments is null.

clone

public MasterMob 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 Mob
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 Mob
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.