|
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.Mob
tv.amwa.maj.entity.SourceMob
@AAFClass(uuid1=218169601, uuid2=257, uuid3=14080, uuid4={6,14,43,52,2,6,1,1}, definedName="SourceMob", description="The SourceMob class describes essence that is either stored in a digital form in a file or stored on a physical media, such as tape or film.") public class SourceMob
Implements the description of essence that is either stored in a digital form in a file or stored on a physical media, such as tape or film. The description is provided by an essence descriptor, which is either a tape descriptor, file descriptor, film descriptor, or some extended descriptor.
THE COMMENTS FOR THIS CLASS ARE INCOMPLETE.
Nested Class Summary | |
---|---|
static class |
SourceMob.EssenceDescriptionXMLHandler
|
static class |
SourceMob.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 |
SOURCEMOB_TAG
|
Fields inherited from class tv.amwa.maj.entity.Mob |
---|
MOB_ITEM |
Fields inherited from interface tv.amwa.maj.iface.SourceMob |
---|
FULL_RANGE |
Constructor Summary | |
---|---|
SourceMob(MobID mobID,
String name,
EssenceDescriptor essenceDescription)
Creates and initializes a new source mob, which describes essence that is either stored in a digital form in a file or stored on a physical media, such as tape or film. |
Method Summary | |
---|---|
void |
addNilReference(int slotID,
long length,
DataDefinition dataDefinition,
Rational editRate)
Adds a slot containing an original source reference to this source mob. |
void |
addPulldownReference(AppendOption addType,
Rational editRate,
int slotID,
DataDefinition essenceKind,
SourceReferenceValue reference,
long sourceReferenceLength,
PulldownKindType pulldownKind,
int phaseFrame,
PulldownDirectionType direction)
Connects the given source mob with the physical source mob that describes the previous generation of essence, with an additional pulldown as part of the reference to indicate a non 1 to 1 relationship between the two. |
void |
addStaticNilReference(int slotId,
DataDefinition dataDefinition)
|
void |
appendEdgecodeSlot(Rational editRate,
int slotID,
long startEC,
long length,
FilmType filmKind,
EdgeType codeFormat,
byte[] header)
Creates and adds an edgecode slot to the film mob represented by this source mob, with the given starting edgecode, length and edit rate. |
void |
appendPhysicalSourceReference(Rational editRate,
int slotID,
DataDefinition essenceKind,
SourceReferenceValue reference,
long sourceReferenceLength)
Connects this source mob with the physical source mob that describes the previous generation of essence, appending it to the existing mob chain. |
void |
appendTimecodeSlot(Rational editRate,
int slotID,
TimecodeValue startTC,
long length)
Creates and adds a timecode slot to a tape mob represented by this source mob, with the given starting timecode, length and edit rate. |
void |
appendXMLChildren(Node parent)
Append child elements to the given parent node to serialize the value of an object to an XML fragment. |
SourceMob |
clone()
Creates a cloned copy of this entity. |
EssenceDescriptor |
getEssenceDescriptor()
Returns the essence descriptor of this source mob, which describes the format of the essence associated with the source mob. |
void |
newPhysicalSourceReference(Rational editRate,
int slotID,
DataDefinition essenceKind,
SourceReferenceValue reference,
long sourceReferenceLength)
Connects this source mob with the physical source mob that describes the previous generation of essence, appending it to the existing mob chain. |
List<FindSourceInformation> |
searchSource(int slotID,
long offset,
MobKind mobKind,
CriteriaType mediaCriteria,
OperationChoice operationChoice)
Returns the source information for a slot in a master mob or source mob. |
void |
setEssenceDescriptor(EssenceDescriptor essenceDescriptor)
Sets the essence descriptor of this source mob, which describes the format of the essence associated with the source mob. |
void |
setPropertiesFromInterface(SourceMob castFrom)
|
void |
specifyValidCodeRange(DataDefinition essenceKind,
int slotID,
Rational editRate,
long startOffset,
long length)
Creates and adds a slot containing source clips to the source mob to indicate that a (recently added) timecode slot or edgecode slot is valid for that channel. |
Methods inherited from class tv.amwa.maj.entity.Mob |
---|
appendAttribute, appendAttribute, appendComment, appendComment, appendKLVData, appendNewEventSlot, appendNewStaticSlot, appendNewTimelineSlot, 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 |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface tv.amwa.maj.iface.Mob |
---|
appendAttribute, appendAttribute, appendComment, appendComment, appendKLVData, appendNewEventSlot, appendNewStaticSlot, appendNewTimelineSlot, 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 |
---|
public static final String SOURCEMOB_TAG
Constructor Detail |
---|
public SourceMob(MobID mobID, @AAFString String name, EssenceDescriptor essenceDescription) throws NullPointerException
Creates and initializes a new source mob, which describes essence that is either stored in
a digital form in a file or stored on a physical media, such as tape or film. 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()
.
mobID
- Unique identifier for the mob.name
- Name of the composition mob.essenceDescription
- Describes the format of the essence associated with thw new source mob.
NullPointerException
- The mob id and/or essence description arguments are
null
.Method Detail |
---|
public final void setPropertiesFromInterface(SourceMob castFrom)
InterchangeObject.setPropertiesFromInterface(tv.amwa.maj.iface.InterchangeObject)
@AAFProperty(uuid1=100729092, uuid2=515, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="EssenceDescription", typeName="StrongReference to EssenceDescriptor", optional=false, uniqueIdentifier=false, pid=18177) public EssenceDescriptor getEssenceDescriptor()
SourceMob
Returns the essence descriptor of this source mob, which describes the format of the essence associated with the source mob.
getEssenceDescriptor
in interface SourceMob
public void setEssenceDescriptor(EssenceDescriptor essenceDescriptor) throws NullPointerException
SourceMob
Sets the essence descriptor of this source mob, which describes the format of the essence associated with the source mob.
setEssenceDescriptor
in interface SourceMob
essenceDescriptor
- Essence descriptor of this source mob.
NullPointerException
- The given essence descriptor is null
.public void addNilReference(int slotID, long length, DataDefinition dataDefinition, Rational editRate) throws NullPointerException, IllegalArgumentException, BadRateException, BadLengthException, SlotExistsException
SourceMob
Adds a slot containing an original source reference to this source mob. This special source id indicates that the mob chain ends here, which indicates that no further record exists of where the essence was derived from. Some source clip is still required on the track to indicate that the track exists and may be referenced from other mobs.
Examples of source mobs that are not derived from a previous source of essence are:
addNilReference
in interface SourceMob
slotID
- Slot id to be assigned to the new slot.length
- Duration of the source clip to be added to the new slot.dataDefinition
- Data definition for the new slot.editRate
- Edit rate for the new slot.
NullPointerException
- The given data definition and/or edit rate is/are
null
.
IllegalArgumentException
- The given slot identifier is null
BadLengthException
- The length cannot be a negative value.
BadRateException
- The edit rate is not valid.
SlotExistsException
- The given slot id matches that of a mob
slot already present in this source mob.SourceReferenceValue.isOriginalSource()
public void addStaticNilReference(int slotId, DataDefinition dataDefinition) throws NullPointerException, IllegalArgumentException, SlotExistsException
NullPointerException
IllegalArgumentException
SlotExistsException
public void addPulldownReference(AppendOption addType, Rational editRate, int slotID, DataDefinition essenceKind, SourceReferenceValue reference, long sourceReferenceLength, PulldownKindType pulldownKind, int phaseFrame, PulldownDirectionType direction) throws NullPointerException, PulldownDirectionException, BadLengthException, NotSourceClipException, SlotExistsException
SourceMob
Connects the given source mob with the physical source mob that describes the previous generation of essence, with an additional pulldown as part of the reference to indicate a non 1 to 1 relationship between the two.
This is a helper method to create a slot with a pulldown object which references a source clip, which references a particular piece of media. This method takes many parameters because the components of a pulldown have been broken out as separate parameters.
The ancestor of a source mob described by a tape descriptor is often a film descriptor.
addPulldownReference
in interface SourceMob
addType
- Overwrite existing slot sequence, or create a new sequence and append it.editRate
- Edit rate of slot to contain the reference.slotID
- Slot ID for the slot to contain the reference.essenceKind
- Data kind of slot to contain reference. Requires a data
kind valid for an essence stream. Valid data kinds are
DataDefinitionConstant.Picture and
DataDefinitionConstant.Sound.reference
- Reference to a physical source mob.sourceReferenceLength
- Length of the referenced physical source mob.pulldownKind
- Method of conversion used between this physical
source mob and this source mob.phaseFrame
- Phase of the first frame.direction
- Direction of the pulldown operation.
NullPointerException
- One or more of the nullable arguments is/are null
and all are required.
PulldownDirectionException
- The given pullown direction is
invalid in this context, for example
tape to film speed
when this is a tape source mob.
BadLengthException
- The given source reference length cannot is negative.
NotSourceClipException
- The existing contents of the given slot does not
contain a source clip to add a pulldown reference to.
SlotExistsException
- The given slot id matches that of a mob
slot already present in this source mob.SourceClip
,
Pulldown
,
Sequence
public void appendEdgecodeSlot(Rational editRate, int slotID, long startEC, long length, FilmType filmKind, EdgeType codeFormat, byte[] header) throws NullPointerException, IllegalArgumentException, BadLengthException, BadSizeException, FilmDescriptorOnlyException, SlotExistsException
SourceMob
Creates and adds an edgecode slot to the film mob represented by this
source mob, with the given starting edgecode, length and edit rate.
It is also necessary to then add an essence slot with
specifyValidCodeRange()
to make the new edgecode slot valid.
appendEdgecodeSlot
in interface SourceMob
editRate
- Edit rate for the new edgecode slot.startEC
- Starting edgecode of the new edgecode slot.length
- Length of the new edgecode slot.filmKind
- Film kind for the new edgecode slot.codeFormat
- Code for the new edgecode slot.header
- Edgecode 8-byte header for the new edgecode slot.
NullPointerException
- One or more of the arguments is null.
BadLengthException
- The length value is negative.
BadSizeException
- The size of the header is not the required 8 bytes.
FilmDescriptorOnlyException
- This operation is only valid
for a source mob referencing a film descriptor.
SlotExistsException
- The given slot id matches that of a mob
slot already present in this source mob.
IllegalArgumentException
makeEdgecodeValue()
,
EdgecodeValue specification
,
EdgecodeValue implementation
public void appendPhysicalSourceReference(Rational editRate, int slotID, DataDefinition essenceKind, SourceReferenceValue reference, long sourceReferenceLength) throws NullPointerException, BadLengthException, InvalidDataDefinitionException, SlotExistsException
SourceMob
Connects this source mob with the physical source mob that describes the previous generation of essence, appending it to the existing mob chain. 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.
This is a helper method to create a slot with a source clip referencing a particular piece of media.
The ancestor of a source mob with a file descriptor is often a tape descriptor.
The essenceKind
parameter requires a data kind
valid for an essence stream. Valid data kinds are:
appendPhysicalSourceReference
in interface SourceMob
editRate
- Edit rate of the slot to contain the reference.slotID
- Slot ID of the slot to contain the reference.essenceKind
- Data kind of the slot to contain the reference.reference
- Reference to a physical source mob.sourceReferenceLength
- Length of the referenced source clip.
NullPointerException
- One or more of the nullable parameters is/are
null
and all are required.
BadLengthException
- The source reference length is negative.
InvalidDataDefinitionException
- The given data definition is not
compatible with that of the slot this element will be appended to.
SlotExistsException
- The given slot id matches that of a mob
slot already present in this source mob.public void appendTimecodeSlot(Rational editRate, int slotID, TimecodeValue startTC, long length) throws NullPointerException, IllegalArgumentException, TapeDescriptorOnlyException, SlotExistsException
SourceMob
Creates and adds a timecode slot to a tape mob represented by this source
mob, with the given starting timecode, length and edit rate. It is then necessary to call
specifyValidCodeRange()
to add the filler to the
other essence slots to indicate that the timecode is valid for that
other slots (tracks) of this mob.
The start timecode parameter is expressed in frames
since midnight. The length parameter can be the value SourceMob.FULL_RANGE
,
in which case the length is 24 hours.
appendTimecodeSlot
in interface SourceMob
editRate
- Edit rate of the timecode slot.slotID
- Slot id for the new timecode slot.startTC
- Starting timecode for the timecode slot.length
- Duration of the new timecode slot.
NullPointerException
- One or both of the edit rate and/or start timecode arguments
is/are null
.
TapeDescriptorOnlyException
- This operation is only valid
for a source mob referencing a tape descriptor.
SlotExistsException
- The given slot id matches that of a mob
slot already present in this source mob.
IllegalArgumentException
SourceMob.FULL_RANGE
,
makeTimecodeValue()
,
TimecodeValue specification
,
TimecodeValue implementation
public void newPhysicalSourceReference(Rational editRate, int slotID, DataDefinition essenceKind, SourceReferenceValue reference, long sourceReferenceLength) throws NullPointerException, BadLengthException, SlotExistsException
SourceMob
Connects this source mob with the physical source mob that describes the previous generation of essence, appending it to the existing mob chain. 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 1 to 1 connection between the two.
This is a helper method to create a slot with a source clip referencing a particular piece of media.
The ancestor of a source mob with a file descriptor is often a tape descriptor.
The essence kind parameter requires a data kind valid for an essence stream. Valid data kinds are:
newPhysicalSourceReference
in interface SourceMob
editRate
- Edit rate of the slot to contain the reference.slotID
- Slot id of the slot to contain the reference.essenceKind
- Data kind of the slot to contain the reference.reference
- Reference to a physical source mob.sourceReferenceLength
- Length of the referenced source clip.
NullPointerException
- One or more of the nullable arguments is/are null
and all are required.
BadLengthException
- The given source reference length is negative.
SlotExistsException
- The given slot id matches that of a mob
slot already present in this source mob.SourceClip
public void specifyValidCodeRange(DataDefinition essenceKind, int slotID, Rational editRate, long startOffset, long length) throws NullPointerException, BadLengthException, SlotExistsException
SourceMob
Creates and adds a slot containing source clips to the source mob to indicate that a (recently added) timecode slot or edgecode slot is valid for that channel.
The essence kind parameter requires a data kind with valid for an essence stream. Valid data kinds are:
specifyValidCodeRange
in interface SourceMob
essenceKind
- Data kind for the slot to be added.slotID
- Slot id for the slot to be added.editRate
- Edit rate for the slot to be added.startOffset
- Start offset for the slot to be added.length
- Duration of the source clip in the slot.
NullPointerException
- One or both of the edit rate and/or essence kind arguments
is/are null
.
BadLengthException
- The given length for the new source clip is negative.
SlotExistsException
- The given slot id matches that of a mob
slot already present in this source mob.public List<FindSourceInformation> searchSource(int slotID, long offset, MobKind mobKind, CriteriaType mediaCriteria, OperationChoice operationChoice) throws NullPointerException, InvalidMobTypeException, TraversalNotPossibleException
SearchSource
Returns the source information for a slot in a master mob or source mob. The method follows the source clip references in the specified slot until it encounters the kind of mob specified in the mob kind parameter.
This function cannot be used on a composition mob and is not intended to be called iteratively.
searchSource
in interface SearchSource
slotID
- Slot to find source information for.offset
- Offset into the slot.mobKind
- Kind of mob to search for.mediaCriteria
- Media criteria to match in the search.operationChoice
- Operation choice.
NullPointerException
- One or more of the arguments is null
.
InvalidMobTypeException
- The given mob type is not valid.
TraversalNotPossibleException
- A mob of the given kind
cannot be found.public SourceMob 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 Mob
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 Mob
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 |